* win32-nat.c (psapi_module_handle): Remove static.
[deliverable/binutils-gdb.git] / gdb / ppcnbsd-nat.c
index db6fce1a50684e1cbe62f805f776bffa96d15895..42d522eb48acef855d8d53a88f832cdf550b13ad 100644 (file)
@@ -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;
 }
This page took 0.027165 seconds and 4 git commands to generate.