[lldb-dev] LLDB not loading any debug information on windows

Christoph Baumann via lldb-dev lldb-dev at lists.llvm.org
Mon Mar 4 11:00:33 PST 2019


Hey,

in order to try lldb on windows, i built (with clang compiler and lld linker
(v7.0.1)) llvm, clang, lld and of course lldb from latest source with the
following command line:

 

> cmake -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
-DCMAKE_LINKER=lld-link -DLLDB_RELOCATABLE_PYTHON=1
-DLLDB_PYTHON_HOME="C:\program files\python37" -DLLVM_BUILD_TESTS=0
-DLLVM_BUILD_BENCHMARKS=0 -DLLVM_BUILD_EXAMPLES=0 -DCMAKE_BUILD_TYPE=Release
-DLLVM_TARGET_ARCH=host -DCMAKE_INSTALL_PREFIX="..\release" ..\src\llvm

>ninja install

 

Here my little program i used to test lldb:

 

> //main.c

> #include <stdio.h>

> 

> int a=10;

> 

> int main(int argc, char *argv[]){

>             for(int i=0;i<argc;i++){

>                           printf("%s\n", argv[i]);

>             }

>             return(0);

> }

 

I compiled the above with "clang main.c -glldb -o a.exe", which generated
the executable a.exe and corresponding debug information a.pdb.

I launched lldb with "lldb a.exe" and tried to load the debug information
with "target symbols add a.pdb", however this resulted in "error: symbol
file [..]\a.pdb does not match any existing module".

 

I am using Windows 10 pro 64bit, my both, my test program and lldb were
compiled for x64 target.

 

I have also tried the prebuilt llvm/lldb binaries (v8.0.0, v7.0.1) found on
llvm.org, same result.

 

I feel like i am missing something (unless lldb just does not work on
windows yet).

 

(On a sidenote, compiling with -gdwarf-5 makes clang crash. I can send the
debug information clang spits out once my debug build finishes.)

 

Greetings

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20190304/c9b4ac18/attachment.html>


More information about the lldb-dev mailing list