-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
fix/remote-vmmap-updates #1070
fix/remote-vmmap-updates #1070
Conversation
Thanks for the PR, but there are several things to point out:
For now there are a lot of info missing from not using
There was an issue with bad sync for the memory mapping, but I think this bug has been fixed by #1047 Have you tried on this branch ? |
Yes, the memory mapping behavior is fixed in #1047 via an alternative approach here where f07035f#diff-938d7f70ced09ad19db4c7483448b0814adafb564d10c9a3c04ed5e8a6357123R10469 |
What do you mean by a non-gef gdb remote session? |
gdb connects via Full example of behavior that motivated PR is shown in attached file. |
I suspected so, great to know you could confirm that fixes it. @Grazfather #1047 is ready for merge, fixes this bug (and restores |
We warn against doing this and don't support it. Why don't you just use |
The true use-case is using the python library pwntools to launch a process and debug it in gdb. Pwntools performs the steps as I have shown in the example to remote attach. While not expressly supported by GEF, this has worked with GEF for many years. I use GEF in an educational setting, and currently have several learners that observe older material or online examples where this behavior works as expected. It would be one thing if this outright errored, but displaying stale/incorrect information is the least-helpful action that could occur. Yes, I can ask learners to not perform this exact series of steps, but now I am actively working against a common approach found all over the internet. A small PR that restores this behavior seemed a preferable solution. As mentioned above, it looks like this behavior will be changed when PR #1047 is merged in as that PR also changes the behavior of the vmmap command such that it will prioritize |
OK but FYI you can set up a dot file that will get picked up for the debug functionality. I used to use it to auto-split a tmux pane and debug in the new pane. Even if the above PR fixes it, you might want to include this in your setup for your students so that you get more consistent behaviour. |
PR has been merged. @robwaz can you please confirm that your flow works now? |
I checked behavior on a couple boxes. Behavior is still present on ubuntu 20.04 because the packaged gdb version is 9.2. The following check skips using Line 10588 in 0fca698
|
OK. Removed that here #1073 |
So it seems solved, can we close this PR? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You can reopen it by adding a comment to this issue. |
This issue has been automatically closed because it has not had recent activity. If you are the owner of this issue, you can either re-open it and provide a more complete description; or create a new issue. Thank you for your contributions. |
Description
Adds objfile handlers to non gef-remote remote sessions. Handler re-syncs
/proc/maps
when new objects are loaded.Currently, if a non-gef gdb remote session is started (such as via pwntools
gdb.debug
), thevmmap
command does not refresh when new libraries are loaded including libc. This breaksvmmap
and other gef functionality that relies upon the newly mapped memory.