Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: aoliva@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Support Dwarf3 DW_CFA_val_* expressions
Date: Tue, 07 Mar 2006 15:01:00 -0000	[thread overview]
Message-ID: <200603070838.k278cSMx005401@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <oracc2rfbk.fsf@free.oliva.athome.lsd.ic.unicamp.br> (message 	from Alexandre Oliva on Tue, 07 Mar 2006 02:31:27 -0300)

> From: Alexandre Oliva <aoliva@redhat.com>
> Date: Tue, 07 Mar 2006 02:31:27 -0300
> 
> On Mar  4, 2006, Daniel Jacobowitz <drow@false.org> wrote:
> 
> > On Sat, Mar 04, 2006 at 09:01:43AM -0300, Alexandre Oliva wrote:
> >> > It's also good to have a few testcases,
> >> > but I don't completely understand the testcases :(
> >> 
> >> You're not alone in that feeling, I assure you :-)
> 
> > Like Mark, I am happier with the code than the testcases.  In fact,
> > I'd rather not have the tests at all than have something quite
> > so overkill.
> 
> Fair enough...  Those tests uncovered a problem with the way our
> dwarf2 code identifies frames, though: it uses the function start
> address and the CFA to identify a stack frame, whereas it should use
> the PC and the CFA.

Nope, using the function address is the correct thing to do.
Otherwise you'll end up with a different frame ID if you single-step
to the next instruction for example.

> In some corner cases, such as the one exercised by the i386
> testcase, if you're on the second instruction of the region covered
> by the hand-generated unwind info and ask for a backtrace, GDB
> complains that the stack is corrupt, but the only problem is that
> the dwarf2 machinery gets confused by the same-CFA, same-function
> pair of stack frames.  This is fixed in the revised patch below.

That fix is wrong!  Either your hand-generated unwind info is wrong
(or incomplete) or GDB needs to do something more clever (like perhaps
using the address of the first instruction in the region covered by
the unwind info).  In any case, the frame ID should only change when
we really enter a different frame.

Perhaps you can explain in more detail what the problem is?

> > And you're not correct that older GCCs could run them
> > far enough to test; they'll fail to build because of the use of
> > __attribute__((cleanup))
> 
> Oops, indeed, sorry about that.  The testcases must definitely be
> amended if they're to remain.  Should they?

I think the tests need to be simplified.

Mark


  reply	other threads:[~2006-03-07  8:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03 17:54 Alexandre Oliva
2006-03-04 12:01 ` Mark Kettenis
2006-03-04 14:43   ` Alexandre Oliva
2006-03-04 15:07     ` Daniel Jacobowitz
2006-03-07 14:25       ` Alexandre Oliva
2006-03-07 15:01         ` Mark Kettenis [this message]
2006-03-07 19:55           ` Alexandre Oliva
2006-03-12 18:15             ` Mark Kettenis
2006-05-28 22:22               ` Alexandre Oliva
2006-03-13  2:25             ` Daniel Jacobowitz
2006-03-13  6:23               ` Alexandre Oliva
2006-03-24 23:08                 ` Daniel Jacobowitz

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=200603070838.k278cSMx005401@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=aoliva@redhat.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