From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Per Bothner Cc: gdb@sources.redhat.com Subject: Re: dump memory to file Date: Wed, 22 Aug 2001 12:11:00 -0000 Message-id: <3B8403CD.2090401@cygnus.com> References: <20010822110014.A31759@visi.com> <1010822175224.ZM31365@ocotillo.lan> X-SW-Source: 2001-08/msg00198.html > Kevin Buettner writes: > > >> I think it'd be nice to provide a more general solution. I.e, I think >> it'd be nice if GDB had a facility whereby output from subsequent >> commands would be redirected to a file. > > > It might be nice to have a stateless option. For example using a > variant of the standard shell syntax for appending to a file: > (gdb) >>FILENAME COMMAND > For example: > (gdb) >>/tmp/foo x/10000x 0x01000 > > Though it is also useful for it to span mutliple commands. One could > so that if there is no command: > (gdb) >>FILENAME Yes, that is often suggested. The syntax has consequences though, the expressions: (gdb) >>foo print 1 + 2 (gdb) print 1 + 2 >> foo are very different. Anyway, there is still some initial leg work. I've added your idea to PRMS. Andrew