Skip to content

liqingqiya/debugger-utils

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utilities for extending gdb with python

Usage

  1. Download debugger-utils to directory X
  2. Put these to your ~/.gdbinit:
python import sys; sys.path.append('$X/debugger-utils')

$X is where debugger-utils lies in. 3. import gdb_utils in your python script.

Example

# Create a gdb commands in hello.py
import gdb_utils


def hello(who, *args):
    """
    Say hello.
    """
    print('hello %s', who)
gdb_utils.define(hello)
#(gdb) so hello.py
#(gdb) hello 'world'

For more examples, see example.

API

GDB commands:

  • break
  • clear
  • commands
  • delete
  • disable
  • define
  • enable
  • info
  • thread
  • thread_name
  • watch

Other API:

  • get_breakpoint
  • function
  • stop
  • register_pprinter
  • build_pprinter
  • globval
  • ty

For more info, see API.md.

About

Utils collection for extending gdb with python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%