summaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-nat.c
diff options
context:
space:
mode:
authorMarkus Deuling <deuling@de.ibm.com>2008-01-16 04:48:55 +0000
committerMarkus Deuling <deuling@de.ibm.com>2008-01-16 04:48:55 +0000
commit890b9de403a415f5caae396d4d093e9066223676 (patch)
tree18340380f5389fe89f0f276939fd08f3e0ad61c5 /gdb/ppc-linux-nat.c
parenta74c36562ec90ac86720a86ba92e521bccb0eb1e (diff)
downloadgdb-890b9de403a415f5caae396d4d093e9066223676.tar.gz
* ppc-linux-nat.c (ppc_register_u_addr): Add gdbarch as parameter.
Replace current_gdbarch by gdbarch. Update caller.
Diffstat (limited to 'gdb/ppc-linux-nat.c')
-rw-r--r--gdb/ppc-linux-nat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 80c5298ef1b..53bc4ae1509 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -162,10 +162,10 @@ PT_NIP, PT_MSR, PT_CCR, PT_LNK, PT_CTR, PT_XER, PT_MQ */
/* *INDENT_ON * */
static int
-ppc_register_u_addr (int regno)
+ppc_register_u_addr (struct gdbarch *gdbarch, int regno)
{
int u_addr = -1;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* NOTE: cagney/2003-11-25: This is the word size used by the ptrace
interface, and not the wordsize of the program's ABI. */
int wordsize = sizeof (long);
@@ -184,7 +184,7 @@ ppc_register_u_addr (int regno)
u_addr = (PT_FPR0 * wordsize) + ((regno - tdep->ppc_fp0_regnum) * 8);
/* UISA special purpose registers: 1 slot each */
- if (regno == gdbarch_pc_regnum (current_gdbarch))
+ if (regno == gdbarch_pc_regnum (gdbarch))
u_addr = PT_NIP * wordsize;
if (regno == tdep->ppc_lr_regnum)
u_addr = PT_LNK * wordsize;
@@ -332,7 +332,7 @@ fetch_register (struct regcache *regcache, int tid, int regno)
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr = ppc_register_u_addr (regno);
+ CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
int bytes_transferred;
unsigned int offset; /* Offset of registers within the u area. */
char buf[MAX_REGISTER_SIZE];
@@ -632,7 +632,7 @@ store_register (const struct regcache *regcache, int tid, int regno)
struct gdbarch *gdbarch = get_regcache_arch (regcache);
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
- CORE_ADDR regaddr = ppc_register_u_addr (regno);
+ CORE_ADDR regaddr = ppc_register_u_addr (gdbarch, regno);
int i;
size_t bytes_to_transfer;
char buf[MAX_REGISTER_SIZE];