start gdb using a pid

Vijay picture Vijay · Jan 28, 2010 · Viewed 60.7k times · Source

In general i see the process's pid which is running in the background and start dbx on that process using the command dbx -a <pid>

similarly how could i do it using gdb?

Answer

zakkak picture zakkak · Oct 2, 2012

In addition to the previous you can directly use

gdb -p <pid>