Skip to content

Set breapoints using function names. - #7

Merged
joekain merged 16 commits into
masterfrom
object-files
Jul 28, 2025
Merged

Set breapoints using function names.#7
joekain merged 16 commits into
masterfrom
object-files

Conversation

@joekain

@joekain joekain commented Jul 28, 2025

Copy link
Copy Markdown
Owner

Use the object crate to look up symbols name from the symbol table when setting breakpoints.

joekain added 16 commits July 26, 2025 13:21
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.
@joekain
joekain merged commit 455b1af into master Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant