programming.nbk: Home | Index | Next Page: utimbuf | Previous Page: User Code
using gdb
http://users.actcom.co.il/~choo/lupg/tutorials/debugging/debugging-with-gdb.html
start from command line with:
gdb <program_name>
Include the extention
Commands:
- Run - run the program
- break filename.cpp:line_number - set breakpoint
- break function_name - set breakpoint at start of function
- continue - continue running after a breakpoint.
- next - execute next line of code. If the line contains a function
call, it is treated as a single line.
- step - execute next line of code. If the line contains a function
call, it is stepped into.
- print i - display contents of variable
- where - display function call stack
- frame n - switch to call stack frame n. 0 is the current stack frame.
- set args - to set command line arguements.
programming.nbk: Home | Index | Next Page: utimbuf | Previous Page: User Code
Notebook exported on Monday, 7 July 2008, 18:56:06 PM Eastern Daylight Time