This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Redirect GDB command output?
- To: Orjan Friberg <orjan dot friberg at axis dot com>
- Subject: Re: Redirect GDB command output?
- From: Paul Dubuc <pdubuc at cas dot org>
- Date: Fri, 05 Oct 2001 12:34:39 -0400
- CC: Grant Edwards <grante at visi dot com>, gdb at sourceware dot cygnus dot com
- Organization: Chemical Abstracts Service (CAS)
- References: <3BBB60BB.BB99CB3F@cas.org> <20011005092623.A1275@visi.com> <3BBDCDD9.6E281600@axis.com>
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).
No, I was looking for something more like the redirect capability for
the
output of individual commands from the gdb prompt. Some dbx functions
our
project uses rely on this capability in dbx and (unfortunately) I see no
way of reproducing those functions with gdb user-defined commands.
We've gone through a lot of effort to migrate from Sun's C++ compiler to
the GCC's g++ in order to get past some bugs in the Sun compiler. That
seems to have worked out well, but I've got a feeling our developers
aren't
going to like switching debuggers.
--
Paul M. Dubuc pdubuc@cas.org