Skip to content

Commit f2acb1f

Browse files
committed
[Docs] Describe gdbserver lookup issue and a workaround
LLDB uses `dladdr` function to discover the path to liblldb and looks there for lldb-server. However, sometimes this function returns the path to the executable that loaded this dll - lldb-mi executable in this case (see section BUGS of [the function's man](https://man7.org/linux/man-pages/man3/dladdr.3.html)).
1 parent db5db4a commit f2acb1f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,13 @@ cmake -DLLVM_ENABLE_PROJECTS="clang;lldb;libcxx;libcxxabi" -DCMAKE_INSTALL_PREFI
6161
// Building lldb-mi
6262
cmake -DCMAKE_PREFIX_PATH=~/buildspace/llvm-inst/ -DUSE_LLDB_FRAMEWORK=1 -GNinja ..
6363
64-
```
64+
```
65+
66+
# Notes
67+
68+
On some architectures (e. g. Linux, x86-64), LLDB dinamic library fails to determine its location. That results to inability of locating a gdbserver stub:
69+
```bash
70+
process launch failed: unable to locate lldb-server
71+
```
72+
73+
The workaraund is to set LLDB_DEBUGSERVER_PATH environment variable before running LLDB-MI.

0 commit comments

Comments
 (0)