So you want to script gdb with python ... Gdb provides a python scripting interface. However the documentation is highly technical and not at a level that is easily accessible. This post should read as a tutorial, to help you understand the interface and work toward creating your own python debuging tools to help make gdb usage somewhat "less" painful. The problem I have created a problem program called "naughty". You can find it here . You can compile this with the following command: gcc -g ...