-
-
Notifications
You must be signed in to change notification settings - Fork 50
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 path syscall-args search #107
Conversation
path = CURRENT_DIRECTORY / "syscall-tables" | ||
self["path"] = (str(path.absolute()), | ||
"Path to store/load the syscall tables files") | ||
caller_frame = inspect.stack()[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.
you might want to using prefer pathlib.Path(__file__)
"Path to store/load the syscall tables files") | ||
caller_frame = inspect.stack()[0] | ||
path = caller_frame.filename | ||
path = os.path.join(os.path.dirname(os.path.abspath(path)), "syscall-tables") |
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.
same, prefer pathlib
over legacy os.path
From @therealdreg Repro:
Re-posting reply here for tracking:
This PR fixes the visible side-effect rather than the root cause of the issue. One possible way to address this would be to force |
thx for your research @hugsy |
## Description This PR fixes some issues in the setting loading process resulting in the default value always being taken for gef-extras scripts (as underlined by hugsy/gef-extras#107 `GefSetting` now offers the possibility to trigger a callback, `on_changed` which behaves just like `on_write` but only if the value was changed.
Description/Motivation/Screenshots
fix syscall-args path search
How Has This Been Tested ?
"Tested" indicates that the PR works and the unit test (i.e.
make test
) run passes without issue.Checklist
adequate tests have been added.
CONTRIBUTING document.