-
-
Notifications
You must be signed in to change notification settings - Fork 732
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
GEF code quality improvement, with support with GDB 8+ and Python3.6+ #779
Conversation
…used to make the API simpler and more Pythonic. Also adds memory access (via `gef.memory`) and settings (via `gef.config`)
- creates a `GefHeapManager` class - deprecates many functions to an equivalent more readable - made `GlibcArena` and `GlibcChunk` classes iterable
- Add `gef.session` which includes many runtime info (`.pagesize`, `.canary`, `.constants`, etc.) - Add more docstrings - The GDB command objects are now in the namespace `gef.gdb` - Adjust some gef functions to check result - Make `endian_str`, `gef_pagesize`, `gef_read_canary`, `set_gef_setting` and `get_gef_setting` deprecated APIs
- new context manager for output redirection: `RedirectOutputContext`
* refactor: use dict comprehension (PEP 274) * refactor: use generator expressions (PEP 289) * refactor: use yield from syntax (PEP 380)
…gdb_8_py36_code_refactor
… session using `pi reset()`
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.
Missed these earlier
I'll remove all my type hint suggestions from this review as I'm feeling like I'm creating more confusion then helping with them here and go back to the initial plan of making a new PR once this one has been merged to get the type hints finalized. |
Good idea @theguy147 (although I already fixed some yesterday). Like I mentioned, I don't see any problem for adding (or fixing) the type hinting gradually. Also this PR is big enough with changes on its own (which need to be reviewed and tested). Please refrain from just commenting for just basic linting changes that can be fixed any time. Not everything has to be done in this PR. |
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.
in regards to the heap bins
commands...
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.
Found some deprecated stuff still being actively used inside GEF
Done my review! |
Co-authored-by: theguy147 <37738506+theguy147@users.noreply.github.com> Co-authored-by: Grazfather <grazfather@gmail.com>
e978144
to
fa28aa2
Compare
8ccccad
to
e4a77aa
Compare
Description/Motivation/Screenshots
Brace yourselves, this is a damn big PR.
It aims to improve the code quality and readability that are allowed by bumping our minimum version requirement for GDB.
This PR:
gef
root namespace allowing to simplify the session information through sub-namespaces likegef.config
gef.heap
gef.session
gef.memory
gef.ui
pathlib.Path
objectsdocs/api.md
and created a newdocs/api/gef.md
with the entire API of functions/classes exposed by GEF to facilitate even more 3rd party command developmentgef-extras/os
Fixes #316
Fixes #536
Fixes #767
How Has This Been Tested?
make test
Checklist
dev
branch, notmaster
.