Skip to content
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

Add gdb scripts for memquery and drsymload #4505

Merged
merged 3 commits into from
Oct 30, 2020
Merged

Conversation

derekbruening
Copy link
Contributor

Adds two gdb python scripts I've developed that may be useful to others:

  1. drsymload: loads DR symbols regardless of gdb's current state,
    which may include having DR symbols at the wrong address. It does
    this by reading /proc/self/maps and running objdump on
    libdynamorio.so. Ideally this would be integrated into a revived
    libdynamorio.so-gdb.py: that's part of tools/libdynamorio.so-gdb.py causes "RuntimeError: Cannot access memory at address 0x712fd867" #2100.

  2. memquery: prints the /proc/self/maps line for a given address.
    I'm still shocked gdb doesn't provide such a command natively.

Issue: #2100

Adds two gdb python scripts I've developed that may be useful to others:

1) drsymload: loads DR symbols regardless of gdb's current state,
which may include having DR symbols at the wrong address.  It does
this by reading /proc/self/maps and running objdump on
libdynamorio.so.  Ideally this would be integrated into a revived
libdynamorio.so-gdb.py: that's part of #2100.

2) memquery: prints the /proc/self/maps line for a given address.
I'm still shocked gdb doesn't provide such a command natively.

Issue: #2100
tools/gdb-scripts/gdb-drsymload.py Outdated Show resolved Hide resolved
@derekbruening derekbruening merged commit 94bc69a into master Oct 30, 2020
@derekbruening derekbruening deleted the iX-gdb-scripts branch October 30, 2020 17:31
@derekbruening
Copy link
Contributor Author

I updated https://github.com/DynamoRIO/dynamorio/wiki/Debugging to point to these.

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.

2 participants