Set breapoints using function names. - #7
Merged
Merged
Conversation
These were the same thing and having both is just annoying.
- Change `trap_inferior_set_breakpoint` so that it takes a symbol name (string) as the location rather than a u64 for an address. - Update the tests - Extract set_breakpoint_at_address as this will still be needed. - Set breakpoint with placeholder address. Tests fail because this address is a placeholder.
- Use the `object::File` to look up a symbol name and get the offset when setting a breakpoint. - Use the `rustc_demangle` crate to demangle the names when searching. - Temporarily hardcode the base address.
Look up the base address of the inferior by scanning the maps file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the
objectcrate to look up symbols name from the symbol table when setting breakpoints.