Skip to content

WIP process debugger for linux, written in Python and C.

License

Notifications You must be signed in to change notification settings

sw1tchbl4d3r/pdbg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdbg

WIP process debugger for linux, written in Python and C.

Usage

$ pip install -r requirements.txt
$ make
$ ./main.py
dbg> help

Currently it can attach to/seize processes, get and set registers, and singlestep. Backend functions for memory read/write are implemented and are a WIP.

The main focus lies on extendability. Adding a new command is as easy as leaving a py file with a command that inherits from the Command class.

Let's take the simple print command.

class PrintCommand(Command):
    names = ["print"]
    requires_tracee = False
    help_string = "Just prints."

    def invoke(self, *args: bytes, argv0="print"):
        log_info(b" ".join(args).decode())

This class already tells the debugger that this is a command with the name print, which does not require to be attached to a tracee.

The function signature is taken from python, here a function which takes a variable amount of bytes to print.

The help string is printed when help print or help is invoked, and usage information is automatically generated.

//TODO:

  • Debugger interface
  • Process attaching
  • Register manipulation
  • Backtrace unwinding
  • Memory manipulation
  • Floating point registers
  • capstone disassembler integration

About

WIP process debugger for linux, written in Python and C.

Topics

Resources

License

Stars

Watchers

Forks