Getting a stack trace of a hung process running in GDB
Domanda
I am trying to figure out why a program I am using is hanging.
I initially thought the problem was "solved" by running it through GDB but I am getting the exact same symptoms as before - is there any way I can send a signal or something to GDB to print off the stack trace so I can try to see what is happening?
I am using FreeBSD-9.0.
Soluzione 2
I ended up getting a backtrace by creating a coredump using gcore(1) and then starting myprogram with the coredump created in GDB.
Altri suggerimenti
You can interrupt a running process within GDB by simply pressing Control-C.
You can then get a backtrace with the backtrace
command.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow