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>,
	        Mark Kettenis <mark.kettenis@xs4all.nl>
Subject: [rfc] [13/15] Add gdbarch to register_name callback in i386
Date: Wed, 31 Oct 2007 10:48:00 -0000	[thread overview]
Message-ID: <47285CF2.2080309@de.ibm.com> (raw)

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

Hi,

this patch adds gdbarch to register_name callback in i386-tdep.{c,h} and i386-linux-tdep.c

Is this ok to commit?

ChangeLog:

	* i386-tdep.c (i386_register_name): Add gdbarch parameter. Replace
	current_gdbarch by gdbarch.
	(i386_register_type): Replace ·current_gdbarch by gdbarch.
	* i386-tdep.h (i386_register_name): Add gdbarch parameter.
	* i386-linux-tdep.c (i386_linux_register_name): Add gdbarch parameter.

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





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

diff -urpN src/gdb/i386-linux-tdep.c dev/gdb/i386-linux-tdep.c
--- src/gdb/i386-linux-tdep.c	2007-10-19 14:26:33.000000000 +0200
+++ dev/gdb/i386-linux-tdep.c	2007-10-31 07:52:31.000000000 +0100
@@ -38,13 +38,13 @@
 /* Return the name of register REG.  */
 
 static const char *
-i386_linux_register_name (int reg)
+i386_linux_register_name (struct gdbarch *gdbarch, int reg)
 {
   /* Deal with the extra "orig_eax" pseudo register.  */
   if (reg == I386_LINUX_ORIG_EAX_REGNUM)
     return "orig_eax";
 
-  return i386_register_name (reg);
+  return i386_register_name (gdbarch, reg);
 }
 
 /* Return non-zero, when the register is in the corresponding register
diff -urpN src/gdb/i386-tdep.c dev/gdb/i386-tdep.c
--- src/gdb/i386-tdep.c	2007-10-24 22:29:14.000000000 +0200
+++ dev/gdb/i386-tdep.c	2007-10-31 07:52:26.000000000 +0100
@@ -152,9 +152,9 @@ i386_fpc_regnum_p (int regnum)
 /* Return the name of register REGNUM.  */
 
 const char *
-i386_register_name (int regnum)
+i386_register_name (struct gdbarch *gdbarch, int regnum)
 {
-  if (i386_mmx_regnum_p (current_gdbarch, regnum))
+  if (i386_mmx_regnum_p (gdbarch, regnum))
     return i386_mmx_names[regnum - I387_MM0_REGNUM];
 
   if (regnum >= 0 && regnum < i386_num_register_names)
@@ -1750,7 +1750,7 @@ i386_register_type (struct gdbarch *gdba
     return i386_sse_type (gdbarch);
 
 #define I387_ST0_REGNUM I386_ST0_REGNUM
-#define I387_NUM_XMM_REGS (gdbarch_tdep (current_gdbarch)->num_xmm_regs)
+#define I387_NUM_XMM_REGS (gdbarch_tdep (gdbarch)->num_xmm_regs)
 
   if (regnum == I387_MXCSR_REGNUM)
     return i386_mxcsr_type;
diff -urpN src/gdb/i386-tdep.h dev/gdb/i386-tdep.h
--- src/gdb/i386-tdep.h	2007-08-23 20:08:34.000000000 +0200
+++ dev/gdb/i386-tdep.h	2007-10-31 07:52:26.000000000 +0100
@@ -168,7 +168,7 @@ extern struct type *i386_sse_type (struc
 extern CORE_ADDR i386_pe_skip_trampoline_code (CORE_ADDR pc, char *name);
 
 /* Return the name of register REGNUM.  */
-extern char const *i386_register_name (int regnum);
+extern char const *i386_register_name (struct gdbarch * gdbarch, int regnum);
 
 /* Return non-zero if REGNUM is a member of the specified group.  */
 extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,


                 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=47285CF2.2080309@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --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