Skip to main content

License: GPL v3 made-with-python Downloads

gdbPy

Not so many people are skilled in the dark arts of gdb scripting... and I'm not one of those! gdbPy is an attempt to help all this people to write a higher level gdb scripts.
gdbPy relies on GNU Python APIs for gdb to do the work, but without the need of installing gdb module on python (more on this matter)

Installation

The project is on Pypi. Install with:

python3 -m pip install gdbPy

GDB module for Python

The major dependency (and major problem) of gdbPy is gdb module for Python: it cannot be easily installed as a normal module but, as far as I know, there's only one online guide (written in 2008 and never updated) to install it.
In short gdb it's not a Python library, and its import will work only if it's running within the gdb process. Fortunately gdb embeds python interpreter, so we can rerun the scripts importing gdbPy like

gdb -q -x script.py

Don't worry, gdbPy will do it for you!

Doc

Here

Examples

from gdbPy import *

set_file("exFile")

# Breakpoints
set_breakpoint("main+42")
set_breakpoint(0xdeadbeef)
set_breakpoint("*0xdeadbeef")

# Start execution
start()/run()

# Debugging actions
next_instruction()/next_instruction(repeat=2)
step_in()
countinue_exec()

# Can't find the command you need?
res = execute("command")

# Now quit gdb
quit()

Metadata

Release files for gdbPy 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gdbPy 0.1.2
File Size Uploaded
gdbPy-0.1.2.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gdbPy 0.1.2
File Interpreter ABI Platform
gdbPy-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 43.9 kB

Release files / gdbPy-0.1.2.tar.gz

Download URL gdbPy-0.1.2.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
25158172accfd4eba0061ba368ac63d4244a8aeb4d3c7909b7822beeefe5cd62
BLAKE2b-256 checksum
How to use checksums
1b74053bde0b6663030cc661432e9f1ee0d67ea68a0fa0ca3fdd9082e755f04d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / gdbPy-0.1.2-py3-none-any.whl

Download URL gdbPy-0.1.2-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9db08c274950eb43f169e1b16b3ed5b2731d9f02fecf7d830ea8ffcf42714fc5
BLAKE2b-256 checksum
How to use checksums
2c41cab0c3193abafbf8cb15cb79e938b4f6c523115016ba88ac6d71873751ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page