[lug] OT: Dumping gdb backtrace data to a file?

D. Stimits stimits at attbi.com
Thu Oct 24 19:29:08 MDT 2002


Scott Herod wrote:

> Hello,
>
> A quick gdb question:  Is it possible to dump the results of a gdb
> command to a file?  I'm trying debug a massively multi-threaded app.
> which, not surprisingly, seems to have a problem with thread-death.  The
> results of "thread apply all bt" goes on for hundreds of lines. Is there
> some way to dump all of that to a file so I can diff. multiple crashes?
>
> Thanks,
>
> Scott


Haven't tried, but some interactive apps you can redirect via use of 
"tee". Just pipe both stdin and stdout to "tee filename.txt". In some 
cases it interferes with data entry, but in many it works.

D. Stimits, stimits AT attbi.com




More information about the LUG mailing list