Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew Stubbs <ams@codesourcery.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb@sourceware.org
Subject: Re: [commited] Detect bad debug info
Date: Mon, 22 Sep 2008 12:50:00 -0000	[thread overview]
Message-ID: <20080922125011.GA25948@caradoc.them.org> (raw)
In-Reply-To: <48D76849.90806@codesourcery.com>

On Mon, Sep 22, 2008 at 10:41:29AM +0100, Andrew Stubbs wrote:
> 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.

You are correct.  Something was confused by the automatic decay of
arrays to pointers, and there was a DW_OP_reg0 instead of DW_OP_breg0
because of that.

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

Could you explain this in the code?  I think it's more enlightening
than "bad debug info".

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-09-22 12:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-19 18:16 Andrew Stubbs
2008-09-19 22:27 ` Mark Kettenis
2008-09-22  9:42   ` Andrew Stubbs
2008-09-22 12:50     ` Daniel Jacobowitz [this message]
2008-09-22 13:13       ` Andrew Stubbs
2008-09-22 13:33         ` Daniel Jacobowitz
2008-09-22 13:38           ` Andrew Stubbs
2008-09-22 14:27         ` Mark Kettenis
2008-09-24 12:18 ` Andreas Schwab
2008-09-24 13:00   ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080922125011.GA25948@caradoc.them.org \
    --to=drow@false.org \
    --cc=ams@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox