Under linux, can I use GDB to debug a process that is currently running?
You can attach to a running process with gdb -p PID.
gdb -p PID