From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org, Mark Kettenis <kettenis@gnu.org>,
Jim Blandy <jimb@codesourcery.com>
Subject: Re: [rfc] Unwind the ARM CPSR
Date: Fri, 12 Oct 2007 08:08:00 -0000 [thread overview]
Message-ID: <20071012035336.GA4038@adacore.com> (raw)
In-Reply-To: <20071011145137.GA18336@caradoc.them.org>
> So why shouldn't the argument be the CURRENT (i.e. THIS) frame
> instead? Then we can call frame_register (CURRENT) instead of
> frame_unwind_register (NEXT) to get the same result, plus we'll
> have the option of calling frame_unwind_register (CURRENT) when
> we need it.
I can see why you'd like some feedback. This (amazing piece of) code
has always been a bit difficult for me to grasp in its entirety...
I hope others will take some time to think about it too, because
I don't feel sufficiently proficient to provide a confident answer.
FWIW, I don't see how we could end up breaking something with your
approach. As it turns out, there is a comment that says about
the prev_register method:
Why not pass in THIS_FRAME? By passing in NEXT frame and THIS
cache, the supplied parameters are consistent with the sibling
function THIS_ID.
So it sounds like the author wasn't seeing any issue with that
either.
I personally think that passing the current frame will make
this function a little easier to understand too, no? (I find
the twist of computing the caller's registers of this frame
using the next frame a constant mental exercise)
> Of course this would be a pain to change all at once since there are
> so many unwinders. I'd introduce a new method instead
> (unwind->prev_register_this?). What do you think?
Sounds like a possible plan to me.
--
Joel
next prev parent reply other threads:[~2007-10-12 3:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 14:59 Daniel Jacobowitz
2007-10-11 15:52 ` Daniel Jacobowitz
2007-10-12 8:08 ` Joel Brobecker [this message]
2007-10-16 22:09 ` Mark Kettenis
2007-10-17 0:36 ` Daniel Jacobowitz
2007-10-17 6:05 ` Daniel Jacobowitz
2007-10-17 13:18 ` Joel Brobecker
2007-10-19 11:54 ` Ulrich Weigand
2007-10-17 0:30 ` Mark Kettenis
2008-05-01 18:31 ` Daniel Jacobowitz
2008-05-01 18:35 ` 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=20071012035336.GA4038@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=jimb@codesourcery.com \
--cc=kettenis@gnu.org \
/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