From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [RFC] register_to_value/value_to_register arguments?
Date: Mon, 11 Jun 2012 09:37:00 -0000 [thread overview]
Message-ID: <alpine.DEB.1.10.1206110958250.23962@tp.orcam.me.uk> (raw)
Hello,
While doing some changes recently I have come across this inconsistency
in our internal document when it comes to register_to_value and
value_to_register gdbarch method arguments (patch below).
However this rises a question: it is relatively expensive to retrieve
gdbarch from frame, most target implementations of these methods need it
and it is already readily available to the caller (retrieved from the very
frame) -- wouldn't it therefore make sense to pass it along frame? Why
wasn't it done like this when the API was changed according to this
documentation patch?
Maciej
2012-06-11 Maciej W. Rozycki <macro@codesourcery.com>
gdb/doc/
* gdbint.texinfo (Using Different Register and Memory Data
Representations): Update gdbarch_register_to_value and
gdbarch_value_to_register arguments.
gdb-doc-gdbint-regconv.diff
Index: gdb-fsf-trunk-quilt/gdb/doc/gdbint.texinfo
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/doc/gdbint.texinfo 2012-06-01 18:42:43.205559049 +0100
+++ gdb-fsf-trunk-quilt/gdb/doc/gdbint.texinfo 2012-06-11 10:17:24.713600380 +0100
@@ -3726,7 +3726,7 @@ If defined, this function should return
type, when no conversion is necessary.
@end deftypefn
-@deftypefn {Architecture Function} void gdbarch_register_to_value (struct gdbarch *@var{gdbarch}, int @var{reg}, struct type *@var{type}, char *@var{from}, char *@var{to})
+@deftypefn {Architecture Function} void gdbarch_register_to_value (struct gdbarch *@var{gdbarch}, struct frame_info *@var{frame}, int @var{reg}, struct type *@var{type}, char *@var{from}, char *@var{to})
Convert the value of register number @var{reg} to a data object of
type @var{type}. The buffer at @var{from} holds the register's value
@@ -3745,7 +3745,7 @@ non-zero value.
@end deftypefn
-@deftypefn {Architecture Function} void gdbarch_value_to_register (struct gdbarch *@var{gdbarch}, struct type *@var{type}, int @var{reg}, char *@var{from}, char *@var{to})
+@deftypefn {Architecture Function} void gdbarch_value_to_register (struct gdbarch *@var{gdbarch}, struct frame_info *@var{frame}, struct type *@var{type}, int @var{reg}, char *@var{from}, char *@var{to})
Convert a data value of type @var{type} to register number @var{reg}'
raw format.
next reply other threads:[~2012-06-11 9:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 9:37 Maciej W. Rozycki [this message]
2012-06-11 16:13 ` Eli Zaretskii
2012-06-12 15:32 ` Tom Tromey
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=alpine.DEB.1.10.1206110958250.23962@tp.orcam.me.uk \
--to=macro@codesourcery.com \
--cc=gdb-patches@sourceware.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