Coder Social home page Coder Social logo

gdbpy's Introduction

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!

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()

gdbpy's People

Contributors

marcobalossini avatar

Stargazers

Claudio Migliorelli avatar Federico Villa avatar Lorenzo Zane avatar  avatar Erica_c avatar Tito Sacchi avatar  avatar Chino avatar  avatar

Watchers

Alessandro avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.