Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* export backtrace
@ 2007-06-25 15:07 Bram Kuijper
  2007-06-25 15:09 ` Bob Rossi
  2007-06-25 18:14 ` Dan Kegel
  0 siblings, 2 replies; 5+ messages in thread
From: Bram Kuijper @ 2007-06-25 15:07 UTC (permalink / raw)
  To: gdb

Hi all,
A veeeery simple question with an unfindable answer: how do I export a 
backtrace to a file so that I can search through it outside gdb?

(gdb) backtrace ./program > my_file obviously isn't working, so what 
should be the alternative?

thanks,
Bram


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: export backtrace
  2007-06-25 15:07 export backtrace Bram Kuijper
@ 2007-06-25 15:09 ` Bob Rossi
  2007-06-25 15:15   ` Andreas Schwab
  2007-06-25 18:14 ` Dan Kegel
  1 sibling, 1 reply; 5+ messages in thread
From: Bob Rossi @ 2007-06-25 15:09 UTC (permalink / raw)
  To: Bram Kuijper; +Cc: gdb

On Mon, Jun 25, 2007 at 05:07:29PM +0200, Bram Kuijper wrote:
> Hi all,
> A veeeery simple question with an unfindable answer: how do I export a 
> backtrace to a file so that I can search through it outside gdb?
> 
> (gdb) backtrace ./program > my_file obviously isn't working, so what 
> should be the alternative?

One alternative would be to use the logging feature of gdb. That will
log the entire session, and will include the backtrace.

Bob Rossi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: export backtrace
  2007-06-25 15:09 ` Bob Rossi
@ 2007-06-25 15:15   ` Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2007-06-25 15:15 UTC (permalink / raw)
  To: Bob Rossi; +Cc: Bram Kuijper, gdb

Bob Rossi <bob_rossi@cox.net> writes:

> On Mon, Jun 25, 2007 at 05:07:29PM +0200, Bram Kuijper wrote:
>> Hi all,
>> A veeeery simple question with an unfindable answer: how do I export a 
>> backtrace to a file so that I can search through it outside gdb?
>> 
>> (gdb) backtrace ./program > my_file obviously isn't working, so what 
>> should be the alternative?
>
> One alternative would be to use the logging feature of gdb. That will
> log the entire session, and will include the backtrace.

Or use Emacs as a frontend.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: export backtrace
  2007-06-25 15:07 export backtrace Bram Kuijper
  2007-06-25 15:09 ` Bob Rossi
@ 2007-06-25 18:14 ` Dan Kegel
  2007-06-25 19:19   ` Jim Ingham
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Kegel @ 2007-06-25 18:14 UTC (permalink / raw)
  To: Bram Kuijper; +Cc: gdb

On 6/25/07, Bram Kuijper <a.l.w.kuijper@rug.nl> wrote:
> (gdb) backtrace ./program > my_file

Another workaround: run it in a window, then copy and paste.  Yuckky, but works.

But y'know, that would be a nice feature, so I filed a feature request
with summary "Please allow redirection of individual command output to files".


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: export backtrace
  2007-06-25 18:14 ` Dan Kegel
@ 2007-06-25 19:19   ` Jim Ingham
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Ingham @ 2007-06-25 19:19 UTC (permalink / raw)
  To: Dan Kegel; +Cc: Bram Kuijper, gdb

Just define pre & post hooks for the command, and turn logging on in  
the pre hook, and off in the post hook.  Or define you own "logged"  
version of the command and stash that in your .gdbinit file.

Jim

On Jun 25, 2007, at 11:14 AM, Dan Kegel wrote:

> On 6/25/07, Bram Kuijper <a.l.w.kuijper@rug.nl> wrote:
>> (gdb) backtrace ./program > my_file
>
> Another workaround: run it in a window, then copy and paste.   
> Yuckky, but works.
>
> But y'know, that would be a nice feature, so I filed a feature request
> with summary "Please allow redirection of individual command output  
> to files".


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-25 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25 15:07 export backtrace Bram Kuijper
2007-06-25 15:09 ` Bob Rossi
2007-06-25 15:15   ` Andreas Schwab
2007-06-25 18:14 ` Dan Kegel
2007-06-25 19:19   ` Jim Ingham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox