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

Fix: Allow setting attributes on gdb Breakpoints #2339

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

Nils1729
Copy link
Contributor

This PR enables write access to breakpoint attributes declared writeable in the docs. It fixes #2096 and other use cases, such as disabling a breakpoint.

Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for debugging this!

pwnlib/gdb.py Show resolved Hide resolved
@Nils1729 Nils1729 force-pushed the fix/gdb-api-breakpoint-setattr branch from 1e3188c to 08d1055 Compare January 26, 2024 13:49
pwnlib/gdb.py Outdated Show resolved Hide resolved
Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example from the original issue works for me now. Thank you!

from pwn import *
p = gdb.debug('chall', api=True)
b = p.gdb.Breakpoint('main')
b.commands = 'echo commands are working'
p.gdb.continue_nowait()
p.interactive()

@peace-maker peace-maker merged commit 171d9df into Gallopsled:dev Jan 29, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to set breakpoint commands from GDB Python API?
2 participants