[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Q: How can I capture a binary block with emacs/gdb?
- Subject: [ale] Q: How can I capture a binary block with emacs/gdb?
- From: fletch at phydeaux.org (Fletch)
- Date: Fri Jul 9 08:25:11 2004
- In-reply-to: <[email protected]> (John Mills's message of "Tue, 6 Jul 2004 20:25:05 -0500 (EST)")
- References: <[email protected]>
>>>>> "John" == John Mills <johnmills at speakeasy.net> writes:
John> ALErs - I'm debugging a Linux application with gdb running
John> under emacs. My application receives JPEG images that it
John> caches in dynamically allocated storage, telling me what it
John> got, as in: Breakpoint 2, CINet::PostImg(int, int, lbuf)
John> (this=0x805fa00, i=7, type=2, lBuf= {len = 9685, buf =
John> 0x80d1a08 "????"}) at INet.cpp:435
John> I would like to write that 9685-byte block at 0x80d1a0a to a
John> file and look at it with a JPEG viewer. I haven't been able
John> to find a promising command combination for emacs and/or gbd
John> to write off a binary block like that, although it seems a
John> reasonable thing to need sometimes.
Not directly a gdb command, but if you wrote a friend dump_to_file
function that took a path as an argument you should be able to call
that from gdb interactively (friend int dump_to_file( CINet::PostImg
*); then call it with dump_to_file( this ) or the like).
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U