Software development in LINUX/UNIX
From GHER
Debugging in Linux/UNIX
Debugging run-time errors:
- recompile your code with "-g -C"
- enable cores
ulimit -c 10000000
This allows core with a maximum size of 10M.
- run your program
- run the debugger
gdb <executable> core
inside the debugger you can use the commands such as "where", "print", "up",... See man gdb.
The command
gdb -p pid#
allows one to see what a program is doing while it executes.
