Don't fail on unknown (numeric) ELF segment types#633
Closed
mickael9 wants to merge 1 commit intoGallopsled:masterfrom
Closed
Don't fail on unknown (numeric) ELF segment types#633mickael9 wants to merge 1 commit intoGallopsled:masterfrom
mickael9 wants to merge 1 commit intoGallopsled:masterfrom
Conversation
Contributor
|
@zachriggle: Is this still relevant after #636? |
Member
|
This is superceded by #647 |
Kyle-Kyle
pushed a commit
to Kyle-Kyle/pwntools
that referenced
this pull request
Apr 25, 2021
GDB's `up` and `down` commands trigger internal notification about changed frame. It does not happen for `gdb.Frame.select()` which we use in our own overrides for `up` and `down` commands. Because of that, the `list` GDB command does not show proper source code lines. This can be worked around by firing `frame` command and this is what this workaround/PR adds. This bug has also been reported to GDB bugzilla at https://sourceware.org/bugzilla/show_bug.cgi?id=24534
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.
Some executables can have unknown/non-standard ELF segment types (like
PT_PAX_FLAGS) which show up as a numericp_type, this makes the ELF class fail upon loading one of those files.This uses an exact match (on
'PT_GNU_STACK'and'PT_GNU_RELRO') rather than a substring match so the comparison doesn't fail on integers.