-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
WIP - Rewrite of parts of the breakpoint and stepping implementation. #2288
base: master
Are you sure you want to change the base?
Conversation
…etween `Sequence` and `Instruction`.
…ng.rs` Move canonical_unit_path_eq out of debug_info module.
…lementation.StepOver works, with outstanding TODO's
@SergioGasquez If you have the time/inclination to do so, I'd appreciate if you can do some testing with this branch. Hint: You can install it with I am confident that it fixes your #2180, even though there are still a few stepping scenarios I know need work. |
Just tried your branch, and I was able to step into the method that was previously ignored! Thanks for working on this fix! |
…li::DebugInfoRef`
@noppej just FYI this PR has merge conflicts now that should be resolved. Other than that, are the TODOs in the PR description still unresolved? |
Is this branch functional? I just installed the plugin, and I dunno if I'm just encountering a particular set of edge cases, but it's nearly unusable. Only like 1 in 10 lines accept a breakpoint, and stepping forward (or even stepping out) almost always lands me e.g. at some |
Oh, phew. I installed this branch, and immediately things work properly. (So far as my 5 seconds of testing indicate.) |
@Erhannis This is a bit of an 'experimental' branch. Doing breakpoints and stepping is rather tricky with the available debuginfo, and I really appreciate your positive feedback. I'm in the middle of finalizing another PR, and hopefully in the next day or so I will bring this branch up to date with the latest improvements on 'master'. That should give you something worthwhile to work with. Any specific use cases where things are still wonky will be much appreciated :) |
@noppej Nothing too specific that I've noticed - some lines don't accept breakpoints where I might expect them to, and a time or two stepping has landed me in a weird place, but usually I can work around it without too much trouble. While I'm not sure the following is relevant to this branch, in the "variables" list I've been getting some "unsupported memory implementation" messages, as well as "Location Value not supported for referenced variables" which at least has pretty clear intent, and also, with a |
@Erhannis ... I can't reproduce this. I get Are you able to log a reproduce-able test case as a new issue? |
…/probe-rs into breakpoint_and_stepping
This is a fairly large PR, because some 'missing' / 'unreliable' functionalities required new infrastructure before they could be reimplemented, and required some 'experimentation', so I was not able to break it into smaller PR's.
In summary, the limitations I focussed on were as follows:
The approach to addressing these, was as follows:
debug::halting
.Block
's, as an intermediate betweenSequence
's andInstruction
's. These blocks are a heuristic based approximation of thebasic block
as described in the DWARF spec (Section 6.2.1). There are some limitations where the implementation errs on the side of caution (e.g. unless we disassemble per platform, we don't know which instructions are branching, so don't assume sequential instructions are in the same block).Sequence
->Block
->Instruction
structures.Status after the rewrite:
TODO
comments in the code.List of tests required for stepping code:
... wip ...