Debugging a running program in GDB

Get process id with
> ps g
And then,
> gdb -p PID
don't forget to compile with -g!

Some GDB tips:
http://linux.byexamples.com/archives/147/some-tips-of-gdb/
http://www-128.ibm.com/developerworks/linux/library/l-debug/
http://www-128.ibm.com/developerworks/library/l-gdb/
http://www.cs.cmu.edu/~fp/courses/15213-s06/misc/gdb-commands.txt

No comments: