Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [rfa/6.0] Better handle unspecified CFI values
Date: Sat, 06 Sep 2003 21:34:00 -0000	[thread overview]
Message-ID: <20030906213351.GA1101@nevyn.them.org> (raw)
In-Reply-To: <3F593115.4030407@redhat.com>

On Fri, Sep 05, 2003 at 08:57:57PM -0400, Andrew Cagney wrote:
> Hello,
> 
> This patch is an attempt at improving GDB's behavior when GCC "treads 
> the boundaries of the CFI specification".
> 
> It does the following:
> 
> - changes the rules REG_UNMODIFIED -> REG_SAME_VALUE and REG_UNSAVED -> 
> REG_UNDEFINED so that they better match the corresponding CFI register 
> states (I could commit this separatly).  The other names confused me :-)
> 
> - it adds a new register rule - REG_UNSPECIFIED - which is used to 
> differentiate a register that is missing CFI info from a register that 
> CFI specified as "undefined" (nee UNSAVED).
> 
> - when unwinding, it treats REG_UNSPECIFIED registers like 
> REG_SAME_VALUE but with the additional hack to map an unspecified 
> SP_REGNUM onto the CFA.
> 
> - if it detects an unspecified CFI entry it complains
> It isn't perfect though - since it doesn't know the full range of valid 
> debug info register numbers it can't check every entry.  Instead it 
> checks the range provided by CFI for unspecified holes and then 
> complains about that.  The reality is that GCC at least gets that bit 
> right (but consistently forgets the SP).
> 
> I'd like to commit the patch as is for the 6.0 branch.  For the mainline 
> though, I'd like to make the additional changes:
> 
> - delete the SP_REGNUM hack from the REG_UNDEFINED rule (it's no longer 
> needed, I think)

Leaving the hack in REG_UNSPECIFIED?  Yes, I'm pretty sure you're
right.

> - add a check/complaint for the SP v CFA problem.

Could you hold off on the complaint until there's a valid way to
specify the SP in the unwind information?  Right now there isn't one,
as I described on the dwarf2 list three weeks ago.

Otherwise this looks good to me.

> @@ -611,7 +646,9 @@
>  
>    switch (cache->reg[regnum].how)
>      {
> -    case REG_UNSAVED:
> +    case REG_UNDEFINED:
> +      /* If CFI explicitly specified that the value isn't defined,
> +	 mark it as optomized away - the value isn't available.  */

"optimized"

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-09-06 21:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-06  0:57 Andrew Cagney
2003-09-06 21:34 ` Daniel Jacobowitz [this message]
2003-09-09  3:00   ` Andrew Cagney
2003-09-09  3:30     ` Daniel Jacobowitz
2003-09-09 17:24       ` Jim Blandy
2003-09-09 17:35         ` Daniel Jacobowitz
2003-09-10 19:48       ` Richard Henderson
2003-09-10 19:53         ` Daniel Jacobowitz
2003-09-10 21:03           ` Richard Henderson
2003-09-07 20:13 ` Mark Kettenis
2003-09-09  3:00   ` Andrew Cagney
2003-09-07 21:17 ` Richard Henderson

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=20030906213351.GA1101@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /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