[commited] Detect bad debug info

Andrew Stubbs ams@codesourcery.com
Mon Sep 22 09:42:00 GMT 2008

Mark Kettenis wrote:
> Would it be possible to add some detail about this?  "a particular
> falvour of bad debug info" is pretty non-informative.

Sorry, you've caught me out. :)

I don't really know in what way the debug info was bad. I only have a 
bad binary (no source code, no compiler). I suspect that it had marked 
an a array as being in registers, rather than a pointer to the array, 
but it doesn't really matter. What I do know is that the effect was that 
the debugger was attempting to read an impossibly large quantity of data 
from the register file. The result was a assertion failure and a bad 
user experience.

The patch ensures that the debugger never attempts to read beyond the 
end of the register file.

Note that the binary in question comes from a proprietary compiler, and 
I believe that that has now been fixed.

This change is merely a robustness enhancement.

If you would like more details, please ask.

Andrew Stubbs

P.S. Sorry for posting the patch to the wrong list. Finger trouble. :(

More information about the Gdb mailing list