This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: capture gdb output
- To: "Michael S. Miles" <mmiles at alacritech dot com>
- Subject: Re: capture gdb output
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 30 Apr 2001 12:25:17 -0400
- Cc: Nicolas dot Thery at Symbian dot com,GDB Mailing List <gdb at sources dot redhat dot com>,gdb-owner at sources dot redhat dot com
- References: <KIEKJCGPOOADIOGPDJJLCEBNDKAA.mmiles@alacritech.com>
"Michael S. Miles" wrote:
>
> Nicolas,
>
> > > I need to be able to capture all the output from my gdb session
> > into some
> > > type of log file. It seems like this is a feature that would definitely
> > > exist, but I have been searching the sources and documentation for any
> > > mention of this capability with no luck.
> >
>
> > Isn't sufficient to use "gdb ... 2>&1 | tee log.txt" ?
>
> I just tried this and it works great! My colleagues and I thank you so
> much!
>
> I would still be interested in whether there is a function in gdb to open or
> close a log file during a session?
It is certainly listed in the TODO file:
--
Add a transcript mechanism to GDB.
Such a mechanism might log all gdb input and output to a file in a
form that would allow it to be replayed. It could involve ``gdb
--transcript=FILE'' or it could involve ``(gdb) transcript file''.
--
Andrew