Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: [rfc] [14/15] Add gdbarch to register_name callback in frv-tdep.c
Date: Wed, 31 Oct 2007 10:48:00 -0000	[thread overview]
Message-ID: <47285CF5.1040206@de.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

Hi,

this patch adds gdbarch to register_name callback in frv-tdep.c.
The macro CURRENT_VARIANT included current_gdbarch. This patch replaces its occurences by its expression and then
replaces current_gdbarch.

Is this ok to commit?

ChangeLog: 


	* frv-tdep.c (frv_register_name): Add gdbarch parameter. Replace
	current_gdbarch by gdbarch.
	(frv_register_name, frv_check_watch_resources): Replace macro
	CURRENT_VARIANT by its expression.
	(CURRENT_VARIANT): Remove.

-- 
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com






[-- Attachment #2: diff-frv-tdep --]
[-- Type: text/plain, Size: 1104 bytes --]

diff -urpN src/gdb/frv-tdep.c dev/gdb/frv-tdep.c
--- src/gdb/frv-tdep.c	2007-10-24 23:08:23.000000000 +0200
+++ dev/gdb/frv-tdep.c	2007-10-31 06:57:30.000000000 +0100
@@ -91,7 +91,6 @@ struct gdbarch_tdep
   char **register_names;
 };
 
-#define CURRENT_VARIANT (gdbarch_tdep (current_gdbarch))
 
 /* Return the FR-V ABI associated with GDBARCH.  */
 enum frv_abi
@@ -278,14 +277,14 @@ set_variant_scratch_registers (struct gd
 }
 
 static const char *
-frv_register_name (int reg)
+frv_register_name (struct gdbarch *gdbarch, int reg)
 {
   if (reg < 0)
     return "?toosmall?";
   if (reg >= frv_num_regs + frv_num_pseudo_regs)
     return "?toolarge?";
 
-  return CURRENT_VARIANT->register_names[reg];
+  return gdbarch_tdep (gdbarch)->register_names[reg];
 }
 
 
@@ -1282,7 +1281,7 @@ frv_return_value (struct gdbarch *gdbarc
 int
 frv_check_watch_resources (int type, int cnt, int ot)
 {
-  struct gdbarch_tdep *var = CURRENT_VARIANT;
+  struct gdbarch_tdep *var = gdbarch_tdep (current_gdbarch);
 
   /* Watchpoints not supported on simulator.  */
   if (strcmp (target_shortname, "sim") == 0)



                 reply	other threads:[~2007-10-31 10:48 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=47285CF5.1040206@de.ibm.com \
    --to=deuling@de.ibm.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