Difference between debug and debugger?

Started by
4 comments, last by gimp 22 years, 4 months ago
I execute my application and a bit of my geometry is missing. Then to try and track it down I try to run it in the debugger, this time however the geometry is there. Chris Brodie http:\\fourth.flipcode.com
Chris Brodie
Advertisement
A different heap is used while running under the debugger. With the debugger, your allocated memory gets cleared to 0xbaadf00d. Without the debugger, your allocated memory is just left to be whatever random garbage it is.

My bet is that you have an uninitialized variable somewhere in your code, and somehow 0xbaadf00d works for you.. maybe you are expecting your variable to be non-zero.

Enjoy! This is one of the hardest kinds of bugs to track. Might need to resort to printfs.

xyzzy
Bad food (0xbaadf00d) really? fun fact to know, is that really true? which debugger?

LOL - That''s gotta be the funniest memory address I''ve ever seen!

---------------

I finally got it all together...
...and then forgot where I put it.
from http://www.houghi.org/jargon/DEADBEEF.html

"DEADBEEF /ded-beef/ n.

The hexadecimal word-fill pattern for freshly allocated memory (decimal -21524111) under a number of IBM environments, including the RS/6000. Some modern debugging tools deliberately fill freed memory with this value as a way of converting heisenbugs into Bohr bugs. As in "Your program is DEADBEEF" (meaning gone, aborted, flushed from memory); if you start from an odd half-word boundary, of course, you have BEEFDEAD. See also the anecdote under fool and dead beef attack. "


there''s a couple of others that get used fairly often, too...
I like 0xCABBA6E5 myself.

This topic is closed to new replies.

Advertisement