From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb@sourceware.org, kettenis@gnu.org (Mark Kettenis)
Subject: Re: [RFC] Using values to handle unwinding
Date: Fri, 19 Oct 2007 12:10:00 -0000 [thread overview]
Message-ID: <200710191210.l9JCA71T027874@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20071017160350.GA26804@caradoc.them.org> from "Daniel Jacobowitz" at Oct 17, 2007 12:03:50 PM
Daniel Jacobowitz wrote:
> It returns a GDB value object describing the register value. It may
> be a lazy reference to memory, a lazy reference to the value of a
> register in THIS frame, or a non-lvalue (constant or address). The
> first part of the patch adds support for lazy registers, which are not
> fetched until they are needed. When any frame other than the sentinel
> frame sees that a register in the PREV frame is not saved or constant,
> it returns a lazy reference to the register in THIS frame.
I think this is an excellent idea. I'm wondering how this plays with
special conversions needed for certain registers, see e.g. the
discussion we had last December that led to introduction of the
value_from_register gdbarch callback.
For example, while we do have ways of performing special conversions
on the registers themselves, there is no straightforward way to do so
for unwound register contents. Maybe if we're going to using values
to represent those, we could allow the architecture to perform type-
specific conversions on those (this should e.g. allow me to eliminate
a specical pseudo on the SPU that I'm using to hold the properly
converted unwound stack pointer register contents).
> There are three key differences / motivations:
>
> - Uses GDB's value infrastructure. Values carry around the
> location information which previously took four extra arguments
> to every unwinder. And this lets us use our existing value
> manipulation routines as necessary.
>
> - Uses the same frame that non-unwinder architecture methods use.
> For instance, in my ARM CPSR unwinding patch I had a routine
> "arm_frame_is_thumb". It was used during software single
> stepping, where we wanted the state of the current frame, and
> during unwinding, where we wanted the state of THIS frame
> (i.e. the one being unwound / having its ID established).
>
> - Simplifies getting other registers from the PREV frame.
> For instance, if one register is computed based on the
> value of another. Previously you had to inline code
> to do this or call the same prev_register routine again
> with the same NEXT frame and THIS cache; awkward if more
> than one function was involved (see previous reason).
I must admit I also no longer understand the original reason for
using the NEXT_FRAME here. If THIS_FRAME works, it would certainly
appear to be much more straightforward ...
B.t.w. there's another change in the patch: the elimination of the
prev_pc unwinder method. Could you explain the reason why this is
now no longer necessary?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2007-10-19 12:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-17 16:04 Daniel Jacobowitz
2007-10-17 22:09 ` Daniel Jacobowitz
2007-10-19 11:42 ` Ulrich Weigand
2007-10-19 11:49 ` Daniel Jacobowitz
2007-10-19 4:30 ` Joel Brobecker
2007-10-19 11:43 ` Daniel Jacobowitz
2007-10-19 12:10 ` Ulrich Weigand [this message]
2007-10-19 12:40 ` Daniel Jacobowitz
2008-03-31 23:41 ` Daniel Jacobowitz
2008-04-04 17:53 ` Joel Brobecker
2008-04-05 15:56 ` 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=200710191210.l9JCA71T027874@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb@sourceware.org \
--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