-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 Capstone plugin #110
base: main
Are you sure you want to change the base?
Fix Capstone plugin #110
Conversation
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.
The documentation refers to the alias "cs," but the alias being registered in the code is "cs-dis"
https://hugsy.github.io/gef-extras/commands/capstone-disassemble/
@@ -182,7 +182,7 @@ def do_invoke(self, _: List[str], **kwargs: Any) -> None: | |||
args = kwargs["arguments"] | |||
show_opcodes = args.show_opcodes | |||
length = args.length or gef.config["context.nb_lines_code"] | |||
location = parse_address(args.location) | |||
location = int(gdb.parse_and_eval(args.location).address) |
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.
location = int(gdb.parse_and_eval(args.location).address) | |
location = parse_address(args.location) |
@hugsy int(gdb.parse_and_eval(args.location).address) is not working on my setup (GDB 13.1 Python engine 3.11), with this suggestion cs-dis command works again:
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.
The value from the configuration file is not taken into account.
So, capstone-disassemble.use-capstone is always False (on every boot)
here my conf file:
[capstone-disassemble]
use-capstone = True
gef➤ gef config capstone-disassemble.use-capstone
──────────────────────────────────────── GEF configuration setting: capstone-disassemble.use-capstone ────────────────────────────────────────
capstone-disassemble.use-capstone (bool) = False
Description:
Replace the GDB disassembler in the `context` with Capstone
gef➤
@hugsy Is it possible that this issue is happening with more plugins?
This is what I explained to you and partially fixed in #1090 All gef-extras settings are impacted |
And what can we do to fix this? I wouldn’t like to release the next version with this issue... And I know you don’t like dirty hacks |
But I think this should not happen with the latest change to gef because now loading gef-extras with |
I am using the last version (GEF+EXTRAS) and the problem is still here :\ |
Description/Motivation/Screenshots
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.