-
Notifications
You must be signed in to change notification settings - Fork 260
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
Enable debugging with LLDB (Xcode, Qt Creator, etc) #932
Conversation
* Print line directives before function definitions * Add command line option to enable absolute paths in line directives (defaults to off) These changes are required to enable debugging with LLDB (turn on absolute paths). Update test-results with line directives before function definitions
Is it really an issue with LLDB? |
Yeah, supplying an absolute path as the argument to |
It still boggles my mind that lldb won't work properly without redundant #line specifiers. They truly are redundant. Every single one of them has absolutely zero effect on the effective line number based on the previous #line specifiers in the file. Has this been reported to lldb as a bug? |
I haven't investigated further to find out whether the problem is with clang+lldb or just lldb. What I found on macOS with Xcode and Qt Creator is that the line directives preceding function declarations were not enough for breakpoints and stepping to work, and the workaround I found was to put the directives before each function definition. |
The same issue exists with GDB. I had to copy the |
Yeah, that's what I (and QtCreator) use, not LLDB. |
Looks good -- do I need to worry about the 3 failing tests before merging, or are those failures spurious-ish/otherwise-non-blocking? |
Those are the same failures happening in ‘main’ and I created #933 to fix that. |
Thanks! |
Debugging with LLDB (used by Xcode and Qt Creator) requires the following:
Changes in this PR
test-results
with the new line directives preceding function definitionsI manually verified the line numbers in the updated
test-results
and also tested the debugging experience.The implementation in this PR is significantly simpler than the previous one (#785, now closed) thanks to the recent refactoring that Herb made in
to_cpp1.h
.