OetkenPurveyorOfCode
OetkenPurveyorOfCode

Reputation: 51

How can I debug with lldb on windows using the regular clang compiler driver?

This works:

clang-cl -MTd -Z7 -fuse-ld=lld main.c -o main.exe
lldb main.exe

And lldb finds the debug symbols.

But I want to use clang and not clang-cl as its command line syntax is the same on all platforms.

So how do I debug with clang on windows?

This does not work:

clang -g main.c -o main.exe
lldb main.exe

As it does not find the debug info.

Is there a way to get something like -Z7 for regular clang? Clang generates the PDB but as a separate file, so lldb can't find it.

Or, alternatively, is there a way to tell lldb where to look for the PDB (something akin to lldb --path-to-pdb="./main.pdb" main.exe)?

Upvotes: 2

Views: 38

Answers (0)

Related Questions