* How to print to a file or pipe ??
@ 2000-07-26 16:25 James Gunning
2000-07-26 18:19 ` Andrew Cagney
2000-07-27 6:37 ` Jesse Marlin
0 siblings, 2 replies; 4+ messages in thread
From: James Gunning @ 2000-07-26 16:25 UTC (permalink / raw)
To: gdb
Hi people
I'm new to this list, but I have searched unsuccessfully through
the gdb info pages & archives for an answer to this question.
How do I print gdb output to a file. Something like
print a[1]@1000 > file.txt
would be ace :-)
Thanks,
James Gunning.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to print to a file or pipe ??
2000-07-26 16:25 How to print to a file or pipe ?? James Gunning
@ 2000-07-26 18:19 ` Andrew Cagney
2000-07-27 6:37 ` Jesse Marlin
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2000-07-26 18:19 UTC (permalink / raw)
To: James Gunning; +Cc: gdb
James Gunning wrote:
>
> Hi people
> I'm new to this list, but I have searched unsuccessfully through
> the gdb info pages & archives for an answer to this question.
> How do I print gdb output to a file. Something like
> print a[1]@1000 > file.txt
> would be ace :-)
> Thanks,
> James Gunning.
You can't (although it does come up often on the list of requested
features). One problem is that the above syntax is ambigious. ``file''
is a struct containing member ``.txt'' right?
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to print to a file or pipe ??
2000-07-26 16:25 How to print to a file or pipe ?? James Gunning
2000-07-26 18:19 ` Andrew Cagney
@ 2000-07-27 6:37 ` Jesse Marlin
2000-07-27 9:50 ` Grant Edwards
1 sibling, 1 reply; 4+ messages in thread
From: Jesse Marlin @ 2000-07-27 6:37 UTC (permalink / raw)
To: James Gunning; +Cc: gdb
James Gunning writes:
> Hi people
> I'm new to this list, but I have searched unsuccessfully through
> the gdb info pages & archives for an answer to this question.
> How do I print gdb output to a file. Something like
> print a[1]@1000 > file.txt
> would be ace :-)
> Thanks,
> James Gunning.
>
>
>
If you run gdb from within xemacs or even emacs then printing is no problem.
Just highlight the region you are interested in and, M-x print-region.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to print to a file or pipe ??
2000-07-27 6:37 ` Jesse Marlin
@ 2000-07-27 9:50 ` Grant Edwards
0 siblings, 0 replies; 4+ messages in thread
From: Grant Edwards @ 2000-07-27 9:50 UTC (permalink / raw)
To: Jesse.Marlin; +Cc: James Gunning, gdb
On Thu, Jul 27, 2000 at 09:37:43AM -0400, Jesse Marlin wrote:
> James Gunning writes:
> > I'm new to this list, but I have searched unsuccessfully through
> > the gdb info pages & archives for an answer to this question.
> > How do I print gdb output to a file. Something like
> > print a[1]@1000 > file.txt
> > would be ace :-)
This question has been asked several times since I've been
reading the list. Somebody once posted a patch to dump memory
to file, but I don't think it made it into the official
version. I regularly need to do exactly what you describe, and
have resorted to cut/paste from an xterm. Not elegant, but it
works.
> If you run gdb from within xemacs or even emacs then printing
> is no problem. Just highlight the region you are interested in
> and, M-x print-region.
I'd really prefer to be able to do it with commands so that it
can be automated or done from within a macro.
Obviously I haven't wanted it badly enough to actually
impliment something like that and submit a patch. ;)
But it would be handy.
--
Grant Edwards
grante@visi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-07-27 9:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-26 16:25 How to print to a file or pipe ?? James Gunning
2000-07-26 18:19 ` Andrew Cagney
2000-07-27 6:37 ` Jesse Marlin
2000-07-27 9:50 ` Grant Edwards
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).