-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
memory: Allow info proc mapping on older gdb #1073
Conversation
This works now that we assume rwx if the Perms column is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks backward-compat with older GDB
@@ -10590,9 +10590,6 @@ def parse_procfs_maps(cls) -> Generator[Section, None, None]: | |||
@classmethod | |||
def parse_gdb_info_proc_maps(cls) -> Generator[Section, None, None]: | |||
"""Get the memory mapping from GDB's command `maintenance info sections` (limited info).""" | |||
if GDB_VERSION < (11, 0): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's what you meant to do: on older versions, Perms
is not exposed at all by GDB even on live process, for which we can know the permissions from procfs
However, removing this - and because parse_gdb_info_proc_maps
is the first to be invoked when parsing mem mapping - it'll end up giving rwx
to everything, which the unittest failures show quickly.
The reason it was mocked for version higher than 11 was to restore support for coredumps where this info is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
This works now that we assume rwx if the Perms column is missing