From f2acb1fa1e37af910fc25da14879543f58c5356d Mon Sep 17 00:00:00 2001 From: Tatyana Krasnukha Date: Tue, 5 Oct 2021 23:25:03 +0300 Subject: [PATCH] [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)). --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d5fb7d9..bcd7ad3 100644 --- a/README.md +++ b/README.md @@ -61,4 +61,13 @@ cmake -DLLVM_ENABLE_PROJECTS="clang;lldb;libcxx;libcxxabi" -DCMAKE_INSTALL_PREFI // Building lldb-mi cmake -DCMAKE_PREFIX_PATH=~/buildspace/llvm-inst/ -DUSE_LLDB_FRAMEWORK=1 -GNinja .. -``` \ No newline at end of file +``` + +# Notes + +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: +```bash +process launch failed: unable to locate lldb-server +``` + +The workaraund is to set LLDB_DEBUGSERVER_PATH environment variable before running LLDB-MI.