From: Joel Brobecker <brobecker@adacore.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Use address_from_register in dwarf2-frame.c:read_addr_from_reg
Date: Wed, 16 Apr 2014 15:29:00 -0000 [thread overview]
Message-ID: <20140416152935.GU4250@adacore.com> (raw)
In-Reply-To: <201404141700.s3EH0F7v020732@d06av02.portsmouth.uk.ibm.com>
> ChangeLog:
>
> * gdbarch.sh (value_from_register): Make class "m" instead of "f".
> Replace FRAME argument with FRAME_ID.
> * gdbarch.c, gdbarch.h: Regenerate.
> * findvar.c (default_value_from_register): Add GDBARCH argument;
> replace FRAME by FRAME_ID. No longer call get_frame_id.
> (value_from_register): Update call to gdbarch_value_from_register.
> * value.h (default_value_from_register): Update prototype.
> * s390-linux-tdep.c (s390_value_from_register): Update interface
> and call to default_value_from_register.
> * spu-tdep.c (spu_value_from_register): Likewise.
>
> * findvar.c (address_from_register): Remove TYPE argument.
> Do not call value_from_register; use gdbarch_value_from_register
> with null_frame_id instead.
> * value.h (address_from_register): Update prototype.
> * dwarf2-frame.c (read_addr_from_reg): Use address_from_register.
> * dwarf2loc.c (dwarf_expr_read_addr_from_reg): Update for
> address_from_register interface change.
FWIW, I am not a specialist here, but it seemed reasonable to me.
It took me a minute or two to figure out that you needed to make
value_from_register a class "m" because you don't have access to
the gdbarch via the frame anymore, so you have to have it passed
directly. Perhaps it's worth a sentence in the revision log when
you commit the patch?
Thanks for the detailed comment explaining why we use a null_frame_id
in address_from_register, and why it's OK to do so. Very helpful!
--
Joel
next prev parent reply other threads:[~2014-04-16 15:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 17:00 Ulrich Weigand
2014-04-16 15:29 ` Joel Brobecker [this message]
2014-04-17 12:18 ` Ulrich Weigand
2014-08-27 4:01 ` Andrew Pinski
2014-08-27 12:21 ` Ulrich Weigand
2014-08-27 18:15 ` Maciej W. Rozycki
2014-08-28 11:51 ` Ulrich Weigand
2014-08-28 12:37 ` pinskia
2014-09-14 14:35 ` Maciej W. Rozycki
2014-09-15 11:40 ` Ulrich Weigand
2014-09-06 22:34 ` Andrew Pinski
2014-09-10 17:06 ` [COMMITTED] " Ulrich Weigand
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=20140416152935.GU4250@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.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