summaryrefslogtreecommitdiffstats
path: root/gdb/ppcnbsd-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ppcnbsd-nat.c')
-rw-r--r--gdb/ppcnbsd-nat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c
index db6fce1a50..42d522eb48 100644
--- a/gdb/ppcnbsd-nat.c
+++ b/gdb/ppcnbsd-nat.c
@@ -146,7 +146,8 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
struct switchframe sf;
struct callframe cf;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
int i;
/* The stack pointer shouldn't be zero. */
@@ -167,7 +168,7 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf));
regcache_raw_supply (regcache, tdep->ppc_lr_regnum, &cf.lr);
- regcache_raw_supply (regcache, gdbarch_pc_regnum (current_gdbarch), &cf.lr);
+ regcache_raw_supply (regcache, gdbarch_pc_regnum (gdbarch), &cf.lr);
return 1;
}
OpenPOWER on IntegriCloud