Skip to content

Don't fail on unknown (numeric) ELF segment types#633

Closed
mickael9 wants to merge 1 commit intoGallopsled:masterfrom
mickael9:patch-1
Closed

Don't fail on unknown (numeric) ELF segment types#633
mickael9 wants to merge 1 commit intoGallopsled:masterfrom
mickael9:patch-1

Conversation

@mickael9
Copy link
Copy Markdown

@mickael9 mickael9 commented Jun 24, 2016

Some executables can have unknown/non-standard ELF segment types (like PT_PAX_FLAGS) which show up as a numeric p_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.

@TethysSvensson
Copy link
Copy Markdown
Contributor

@zachriggle: Is this still relevant after #636?

@zachriggle
Copy link
Copy Markdown
Member

This is superceded by #647

@zachriggle zachriggle closed this Jul 26, 2016
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
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.

3 participants