New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LLDB fails to skip prologue with clang generated PDB #56288
Comments
@llvm/issue-subscribers-lldb |
What's your lldb version? I tried it on trunk lldb, and it stops at the memset line.
|
I have tried it with TOT LLVM built using clang-cl 14.0.0. Verfied on both Arm and x86_64 Windows platform. This PDB/Windows specific issue. |
Kindly share compiler commandline used to build this above code. |
I used the same command line: |
Are you using LLDB_USE_NATIVE_PDB_READER=1 ? Because it is specific to MS DIA SDK and works fine when LLDB's native pdb reader is used. |
Oh, I'm using native pdb reader. Probably it's better to just use native pdb reader rather than DIA. |
LLDB is expected to skip prologue and advance to the breakpoint location to the first source line in the function when you have debug information. For example consider following code:
Compile with
clang-cl /Zi skip_prolog.cpp
. Clang will generate PDB debug info by default.Start LLDB and set breakpoint on main. LLDB is expected to stop at line memset which is the first executable line of the function main. However LLDB stops at first assembly instruction stopping at main brace without skipping the prologue.
This is architecture independent so it happens on both x86_64 and AArch64.
This works fine when PDB is generated by
cl.exe
.Also works fine when clang compiles with dwarf debug info.
The text was updated successfully, but these errors were encountered: