By default gdb shows the stack trace for the active thread when examining a core dump (I mean the thread that took the signal). You can get its stack trace with 'bt' or 'where', but when you need to get the stack trace for all threads you need to run 'thread apply all [cmd]'. In this case, 'thread apply all bt'.
If there are lots of threads in the process, it's useful to log the output to a file. You can set the log file with 'set logging file [file name]' and then enable logging with 'set logging on'.
No comments:
Post a Comment