public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: capture gdb output
@ 2001-04-19  6:04 Nicolas.Thery
  2001-04-19  6:30 ` Michael S. Miles
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas.Thery @ 2001-04-19  6:04 UTC (permalink / raw)
  To: Michael S. Miles; +Cc: GDB Mailing List, gdb-owner

> 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 don't have a unix machine handy and so can't test it).



**********************************************************************
Symbian Ltd is a company registered in England and Wales with registered number 01796587 and registered office at 19 Harcourt Street, London, W1H 4HF, UK.
This message is intended only for use by the named addressee and may contain privileged and/or confidential information. If you are not the named addressee you should not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify postmaster@symbian.com and delete the message and any attachments accompanying it immediately. Symbian does not accept liability for any corruption, interception, amendment, tampering or viruses occurring to this message in transit or for any message sent by its employees which is not in compliance with Symbian corporate policy.
**********************************************************************

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

* RE: capture gdb output
  2001-04-19  6:04 capture gdb output Nicolas.Thery
@ 2001-04-19  6:30 ` Michael S. Miles
  2001-04-30  9:25   ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Miles @ 2001-04-19  6:30 UTC (permalink / raw)
  To: Nicolas.Thery; +Cc: GDB Mailing List, gdb-owner

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?

thanks,
michael miles

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

* Re: capture gdb output
  2001-04-19  6:30 ` Michael S. Miles
@ 2001-04-30  9:25   ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2001-04-30  9:25 UTC (permalink / raw)
  To: Michael S. Miles; +Cc: Nicolas.Thery, GDB Mailing List, gdb-owner

"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

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

* Re: capture gdb output
  2001-04-19  5:53 ` capture gdb output Michael S. Miles
@ 2001-04-19 13:44   ` Michael Meissner
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Meissner @ 2001-04-19 13:44 UTC (permalink / raw)
  To: Michael S. Miles; +Cc: GDB Mailing List

On Thu, Apr 19, 2001 at 08:54:04AM -0400, Michael S. Miles wrote:
> 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.
> 
> Does anyone know if gdb has this functionality and if so, how to use it?
> 
> If it helps, I am using the 03/20/01 snapshot of GDB on a Linux-i386 system.
> I am also using it as a remote Linux kernel debugger although I don't
> believe that is relevant.

Besides using tee, you could run gdb within an emacs shell session (or use
emacs' gdb mode) and copy the buffer to a file, or use the 'script' command
that many Unixen provide (output is in the 'typescript' file).  On older
systems, xterm might have a logging option (which was disabled due to security
concerns).

-- 
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

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

* capture gdb output
  2001-04-19  2:57 Unable to step through ARM code using insgiht-5.0 Ahmed A. Agbabiaka
@ 2001-04-19  5:53 ` Michael S. Miles
  2001-04-19 13:44   ` Michael Meissner
  0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Miles @ 2001-04-19  5:53 UTC (permalink / raw)
  To: GDB Mailing List

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.

Does anyone know if gdb has this functionality and if so, how to use it?

If it helps, I am using the 03/20/01 snapshot of GDB on a Linux-i386 system.
I am also using it as a remote Linux kernel debugger although I don't
believe that is relevant.

many thanks,
Michael Miles

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

end of thread, other threads:[~2001-04-30  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-19  6:04 capture gdb output Nicolas.Thery
2001-04-19  6:30 ` Michael S. Miles
2001-04-30  9:25   ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-04-19  2:57 Unable to step through ARM code using insgiht-5.0 Ahmed A. Agbabiaka
2001-04-19  5:53 ` capture gdb output Michael S. Miles
2001-04-19 13:44   ` Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).