[lug] OT: Dumping gdb backtrace data to a file?
Scott Herod
herod at dimensional.com
Fri Oct 25 08:18:45 MDT 2002
Thanks for the responses, Tom and Dan. Since I was actually cutting and
pasting from the xterm into an Xemacs window, I thumped myself and
started running gdb in Xemacs instead. :-) (It appears that someone is
eating a mutex between the time that a pointer to it is tested for null
and the time that the pointer is used. Since that code is deep in an
SDL lib. I've now got to figure out who is doing the eating.)
Thanks,
Scott
Tom Tromey wrote:
>>>>>>"Scott" == Scott Herod <herod at dimensional.com> writes:
>>>>>>
>
>Scott> A quick gdb question: Is it possible to dump the results of a gdb
>Scott> command to a file? I'm trying debug a massively multi-threaded
>Scott> app. which, not surprisingly, seems to have a problem with
>Scott> thread-death. The results of "thread apply all bt" goes on for
>Scott> hundreds of lines. Is there some way to dump all of that to a file so
>Scott> I can diff. multiple crashes?
>
>You can run gdb under Emacs or script. That's the easiest way.
>
>Redirecting gdb's command output occasionally comes up on the gdb
>list. I thought I saw a completed patch for this but then it didn't
>go in :-(. Anyway, I have a patch that works but isn't perfect. I
>could send it to you if you want it. The UI works like this:
>
> (gdb) transcript > output-file
> (gdb) ... stuff
> (gdb) transcript # stop the redirection
>
>Tom
>
More information about the LUG
mailing list