descriptionnone
repository URLhttps://github.com/rofl0r/gdbpimp.git
ownerretnyg@gmx.net
last changeSun, 14 Mar 2021 17:43:40 +0000 (14 17:43 +0000)
last refreshSat, 27 Apr 2024 11:57:47 +0000 (27 13:57 +0200)
content tags
add:
README.md

gdbpimp - a console gui for gdb

screenshot

unlike the other gdb guis, like gdbgui, pwndbg, peda, etc this one works with a plain gdb binary, regardless of whether built with or without shared libs and python scripting support. and regardless of version. the ones mentioned here tend to only work properly with the latest and greatest gdb, while this here was tested with gdb 7.6 and should work with older and newer versions as well, because it works on stdin/stdout of gdb.

additionally it doesn't have a shitload of library dependencies. you only need prompt-toolkit and pygments.

you also dont need to install a .gdbinit file which overrides normal functioning of gdb.

whereas pwndbg, peda, gef and gdb-dashboard focus on assembly level debugging, this one is focused on source-level C debugging.

usage:

python2 gdb.py /bin/program arg1 arg2

keyboard shortcuts:

these last ones are likely to change in future versions.

other functionality

gdb prompt: you can enter arbitrary gdb command in the gdb prompt in the bottom line.

python prompt: you can toggle the gdb prompt to a python repl prompt with F1. This allows to execute code in the context of gdbpimp, can be useful for debugging.

expression sidebar: you can add expressions to the expr sidebar, e.g. the value of a struct member, some memory region etc. to add an expression, write :expr add name expression in the gdb prompt. expression can be any expression understood by gdb that returns a string, for instance p/x mystruct.member. The expression will be evaluated on every step in the program and the actual contents displayed. an expression can be removed via :expr del name. expressions are saved to a file if not removed and loaded next time you debug the same binary.

Dependencies

This app was written for and with python2. I don't plan on porting it to python 3. I will however accept a PR that can make it work on both py2 and py3, if it's reasonably clean.

required python libs are prompt-toolkit 2.x; it was developed with 2.0.6 but should work with 2.0.10 (last py2 compatible release) too. prompt-toolkit itself depends on pygments and wcwidth packages, tested are version 2.2.0 and 0.1.7, respectively.

TODO

shortlog
2021-03-14 rofl0rimprove source file lookupmaster
2021-03-14 rofl0ron segfault, do not call finish
2021-03-14 rofl0rstartup: sleep until data is available on either stdout...
2021-03-13 rofl0radd :expr del
2021-03-13 rofl0rREADME: add screenshot
2021-03-13 rofl0rupdate README
2021-03-13 rofl0radd new args view to sidebar showing function arguments
2021-03-13 rofl0rlocals: don't print string buffer contents after \0
2021-03-13 rofl0rlocals: fix printing of some string buffers
2021-03-13 rofl0rrun 'finish' if we step into a function without sources
2021-03-13 rofl0rfix some unicode vs ascii codec shit
2018-11-25 rofl0rfix source code lookup, use absolute path
2018-11-25 rofl0rlocals: fix display of fixed-size string buffers
2018-11-25 rofl0rgdb view: wrap lines, hscroll annoys
2018-11-25 rofl0rrecognize more 'step commands'
2018-11-25 rofl0radd save/load config ability
...
heads
3 years ago master