This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Redirect GDB command output?


On Fri, Oct 05, 2001 at 05:12:25PM +0200, Orjan Friberg wrote:
> Grant Edwards wrote:
> > 
> > On Wed, Oct 03, 2001 at 03:02:19PM -0400, Paul Dubuc wrote:
> > 
> > > Is there any way to redirect GDB command output to a file (either
> > > interactively or in user-defined commands)?
> > 
> > Nope.  People (like me) have been asking about that for a long
> > time, but none of have actually done anything about it.  :)
> 
> Maybe I'm stating the obvious here, or maybe this is not the
> feature you guys were looking for, but you can use tee like
> this: 'gdb | tee log 2>&1', and all gdb output will be put in
> the file 'log' (in addition to appearing on stdout of course).

The problem is that I often don't know that I want to save the
output of a command when I start gdb.  Once I've managed to
induce the failure, it's too late.  I suppose I could always
log gdb output in case I might want to save something, but that
seems like a clumsy solution.

-- 
Grant Edwards
grante@visi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]