Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb@sources.redhat.com
Subject: Re: HEADS UP: converting the i386 to the new frame unwinding stuff
Date: Tue, 04 Mar 2003 14:28:00 -0000	[thread overview]
Message-ID: <3E64B7EF.50803@redhat.com> (raw)
In-Reply-To: <200303032130.h23LUm3g002018@elgar.kettenis.dyndns.org>

>    Date: Mon, 03 Mar 2003 13:45:41 -0500
>    From: Andrew Cagney <ac131313@redhat.com>
> 
>    Mark,
> 
>    Per several recent discussions, can you create a branch and commit it to 
>    that.  That way I can look at it now (regardless of your intended commit 
>    schedule)?
> 
> Brilliant idea.  I still have to comment my code a bit better, but
> I'll try to create that branch somehwere at the end of the week.
> 
>    I've started writing up the doco and in doing it, I suspect I may have 
>    found an `off by one' error with the unwinder cache.  Having a second 
>    implementation using the current code should help sort this out.
> 
> The current state of affairs seems to work quite well for the i386.
> The only thing that puzzles me is that apparently my
> i386_frame_register_unwind gets called without an initialized cache.
> I was under the impression that we'd always unwind the pc first, and
> since my i386_frame_pc_unwind initialized the cache, I'd always have
> an initialized cache with the other unwind functions.

I think you just hit my off-by-one bug.  While I've got get_prev_frame() 
doing the sequence:

	prev_frame->pc = frame_pc_unwind(next_frame)
	..
	prev_frame->id = frame_id_unwind(next_frame)

To determine prev_frame's id, prev_frame's prolog needs to have been 
analyzed.  Contrast that to pc-unwind and register-unwind where the 
unwound register value is determined by analyzing next_frame's prologue. 
  The off by one is that frame id unwind is being handed the wrong cache 
:-(  (in my defence, I've preserved existing behavour just a bit too 
well - explains why the d10v was to easy to convert :-/)

Andrew


	


  reply	other threads:[~2003-03-04 14:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-02 17:52 Mark Kettenis
2003-03-02 17:43 ` Joel Brobecker
2003-03-03 14:09 ` Michal Ludvig
2003-03-03 18:45 ` Andrew Cagney
2003-03-03 21:32   ` Mark Kettenis
2003-03-04 14:28     ` Andrew Cagney [this message]
2003-03-05  5:15       ` Andrew Cagney

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=3E64B7EF.50803@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kettenis@chello.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