Skip to content
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

context in gdb event handlers #2424

Open
Angelo942 opened this issue Jul 6, 2024 · 0 comments
Open

context in gdb event handlers #2424

Angelo942 opened this issue Jul 6, 2024 · 0 comments
Labels

Comments

@Angelo942
Copy link

Angelo942 commented Jul 6, 2024

Hi,

I'm trying to work with gdb and set callbacks on gdb.events.stop and gdb.events.new_inferior that use pwnlib.context, but it is always using an empty context. Is it possible to make gdb use a specific context ?

For exemple:

from pwn import *

exe  = ELF("./challenge")
context.binary = exe
p = gdb.debug(exe.path, api=True)
gdb = p.gdb

gdb.events.stop.connect(lambda event: print(context))
gdb.execute("si")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant