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

gdb api documentation not showing on readthedocs #2286

Closed
peace-maker opened this issue Oct 4, 2023 · 1 comment
Closed

gdb api documentation not showing on readthedocs #2286

peace-maker opened this issue Oct 4, 2023 · 1 comment

Comments

@peace-maker
Copy link
Member

The documentation for gdb.debug and gdb.attach are missing the examples for using the gdb api. Something with skipping the doctests on python 2?

pwntools/pwnlib/gdb.py

Lines 464 to 487 in 48fbffe

.. doctest
:skipif: six.PY2
Debug a new process
>>> io = gdb.debug(['echo', 'foo'], api=True)
Stop at 'write'
>>> bp = io.gdb.Breakpoint('write', temporary=True)
>>> io.gdb.continue_and_wait()
Dump 'count'
>>> count = io.gdb.parse_and_eval('$rdx')
>>> long = io.gdb.lookup_type('long')
>>> int(count.cast(long))
4
Resume the program
>>> io.gdb.continue_nowait()
>>> io.recvline()
b'foo\n'

@peace-maker
Copy link
Member Author

Fixed in #2355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant