From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>, qinwei@sunnorth.com.cn
Subject: [rfc] [09/15] Add gdbarch to register_name callback in score-tdep.c
Date: Wed, 31 Oct 2007 10:48:00 -0000 [thread overview]
Message-ID: <47285CE6.2050003@de.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
Hi,
this patch adds gdbarch to register_name callback in score-tdep.c
Is this ok to commit?
ChangeLog:
* score-tdep.c (score_register_name): Add gdbarch parameter.
(score_return_value, score_push_dummy_call): Replace current_gdbarch
by gdbarch.
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
[-- Attachment #2: diff-score-tdep --]
[-- Type: text/plain, Size: 1695 bytes --]
diff -urpN src/gdb/score-tdep.c dev/gdb/score-tdep.c
--- src/gdb/score-tdep.c 2007-08-23 20:08:37.000000000 +0200
+++ dev/gdb/score-tdep.c 2007-10-30 13:45:43.000000000 +0100
@@ -284,7 +284,7 @@ score_unwind_sp (struct gdbarch *gdbarch
}
static const char *
-score_register_name (int regnum)
+score_register_name (struct gdbarch *gdbarch, int regnum)
{
const char *score_register_names[] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
@@ -433,7 +433,7 @@ score_return_value (struct gdbarch *gdba
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
score_xfer_register (regcache, regnum, xfer,
- gdbarch_byte_order (current_gdbarch),
+ gdbarch_byte_order (gdbarch),
readbuf, writebuf, offset);
}
return RETURN_VALUE_REGISTER_CONVENTION;
@@ -543,7 +543,7 @@ score_push_dummy_call (struct gdbarch *g
Where X is a hole. */
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG
&& (typecode == TYPE_CODE_STRUCT
|| typecode == TYPE_CODE_UNION)
&& argreg > SCORE_LAST_ARG_REGNUM
@@ -557,7 +557,7 @@ score_push_dummy_call (struct gdbarch *g
/* The last part of a arg should shift left when
gdbarch_byte_order is BFD_ENDIAN_BIG. */
- if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG
+ if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG
&& arg_last_part_p == 1
&& (typecode == TYPE_CODE_STRUCT
|| typecode == TYPE_CODE_UNION))
reply other threads:[~2007-10-31 10:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=47285CE6.2050003@de.ibm.com \
--to=deuling@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=qinwei@sunnorth.com.cn \
--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