Bug ID 18797
Summary ‘image list’ command is not listing modules in lldb-gdbserver on Ubuntu 12.04 x86_64
Component All Bugs
Repro steps: 1. build lldb and lldb-gdbserver on Ubuntu 12.04 x86_64 using either autoconf or cmake/ninja. 2. change to the build dir, and run './lldb ./lldb-gdbserver' 3. At the (lldb) prompt, run 'image list' Expected result: See roughly 14 modules listed, including liblldb.so. Actual result: (lldb) image list [ 0] 8248772F-0000-0000-0000-000000000000 ./lldb-gdbserver I found this when tracking down the gold linker issue I reported when post-mortem debugging an assert in lldb-gdbserver. What I've found so far is that when Target::SetExecutableModule (...) loops over its dependent modules, there is no directory resolved for the module names, and thus the file operations fail, causing the module loading to short circuit and delete the module. I've tried this with the following configurations: A. cmake/ninja with gold linker (sudo apt-get install binutils-gold) B. cmake/ninja without gold linker (sudo apt-get remove binutils-gold) C. autoconf (configure/(g)make) without gold linker. In all 3 cases, the module was destroyed because the file name for the dependent module couldn't be found due to a missing directory element. In case A. above, I verified that setting the target directly to the liblldb.so file did work and was able to read/handle the elf file. In that case, though, the directory was provided to it so the file resolution methods worked as expected.