-
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) v2 #785
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).
Why do you think it's a bug? The It should either be this:
or this:
|
If I put a breakpoint on line 3 in the
then I want the debugger to break at the beginning of the function. So if there are multiple But your example here:
seems ideal to me and would remove all ambiguity. I'm not sure which part of cppfront puts a newline before the generated return but I think it's separate to the line directive changes I made. |
If it can't handle multiple line directives pointing at the same line, then it has no hope of properly debugging this, as those end up all over the place.
That may be true, but it would be good to know exactly why this PR removes an existing correct line number, so it doesn't cause another issue later. |
Restores the original behaviour in the `pure2-bugfix-for-memberwise-base-assignment` regression test where a line directive is emitted after the return statement and before the closing brace.
I've updated the PR to restore the original behaviour of inserting the line directive prior to the closing brace in these emitted assignment operators. As a result, the changes to the regression tests in this PR only involve inserting new line directives prior to function definitions. |
This PR has been replaced by PR #932. |
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
test-results
. I also tested these changes with Visual Studio and the debugging experience continues to work as before, as well as with Xcode/Qt Creator after the changes.Changes to test-results
New line directives have been inserted before function definitions.
EDIT: The following no longer applies (see comment history)
Bugfix?There's one change that appears to be a bug fix.
See
pure2-bugfix-for-memberwise-base-assignment.cpp
:Before this PR:
That second
#line 3
appears to be a bug.After this PR: