[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



    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


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00179" href="msg00179.html">[ale] Q: How can I capture a binary block with emacs/gdb?</a></strong>
<ul><li><em>From:</em> johnmills at speakeasy.net (John Mills)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00274.html">[ale] OT: Firewall purchase</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00276.html">[ale] Perl + Semaphores</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00179.html">[ale] Q: How can I capture a binary block with emacs/gdb?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00185.html">[ale] ftp.ale.org Question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00275"><strong>Date</strong></a></li>
<li><a href="threads.html#00275"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>