Search code examples
c++llvmbreakpointslldb

LLDB warning: Unable to resolve breakpoint to any actual locations on Windows 10


after compiling my hello world program with clang -g .\main.cpp -o .\main.exe I then run and try to set a breakpoint but it does not resolve.

lldb .\main.exe
(lldb) target create ".\\main.exe"
(lldb) Current executable set to 'C:\Hello World\src\main.exe' (x86_64).
(lldb) b main
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

What am I doing wrong? Also I installed LLVM through chocolatey and I am running windows 10.


Solution

  • I fixed it. I just needed to register two dlls with regsvr32, C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\bin\msdia140.dll & C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\bin\amd64\msdia140.dll