Getting a stack trace of a hung process running in GDB

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.

Answers


You can interrupt a running process within GDB by simply pressing Control-C.

You can then get a backtrace with the backtrace command.


I ended up getting a backtrace by creating a coredump using gcore(1) and then starting myprogram with the coredump created in GDB.


Need Your Help

C# project/solution structure for easy CI building

c# .net msbuild continuous-integration teamcity

We have around ~ 80 C# projects in a single Git repository.

Angular DRY Templates

angularjs

I am new to angular and I realized that there is a lot of duplicated code in my templates, for example for a single field.