- write_pc (prev_pc);
- deprecated_remove_raw_breakpoint (bp);
-}
-
-/* Fetch registers from the register section in core bfd. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
-{
- CoreRegs *regs;
- int regi;
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (which != 0)
- {
- fprintf_unfiltered
- (gdb_stderr,
- "Gdb error: unknown parameter to fetch_core_registers().\n");
- return;
- }
-
- regs = (CoreRegs *) core_reg_sect;
-
- /* Put the register values from the core file section in the regcache. */
-
- if (ARCH64 ())
- {
- for (regi = 0; regi < ppc_num_gprs; regi++)
- regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regi,
- (char *) ®s->r64.gpr[regi]);
-
- if (tdep->ppc_fp0_regnum >= 0)
- for (regi = 0; regi < ppc_num_fprs; regi++)
- regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + regi,
- (char *) ®s->r64.fpr[regi]);
-
- regcache_raw_supply (current_regcache, PC_REGNUM,
- (char *) ®s->r64.iar);
- regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum,
- (char *) ®s->r64.msr);
- regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
- (char *) ®s->r64.cr);
- regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
- (char *) ®s->r64.lr);
- regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
- (char *) ®s->r64.ctr);
- regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
- (char *) ®s->r64.xer);
- if (tdep->ppc_fpscr_regnum >= 0)
- regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
- (char *) ®s->r64.fpscr);
- }
- else
- {
- for (regi = 0; regi < ppc_num_gprs; regi++)
- regcache_raw_supply (current_regcache, tdep->ppc_gp0_regnum + regi,
- (char *) ®s->r32.gpr[regi]);
-
- if (tdep->ppc_fp0_regnum >= 0)
- for (regi = 0; regi < ppc_num_fprs; regi++)
- regcache_raw_supply (current_regcache, tdep->ppc_fp0_regnum + regi,
- (char *) ®s->r32.fpr[regi]);
-
- regcache_raw_supply (current_regcache, PC_REGNUM,
- (char *) ®s->r32.iar);
- regcache_raw_supply (current_regcache, tdep->ppc_ps_regnum,
- (char *) ®s->r32.msr);
- regcache_raw_supply (current_regcache, tdep->ppc_cr_regnum,
- (char *) ®s->r32.cr);
- regcache_raw_supply (current_regcache, tdep->ppc_lr_regnum,
- (char *) ®s->r32.lr);
- regcache_raw_supply (current_regcache, tdep->ppc_ctr_regnum,
- (char *) ®s->r32.ctr);
- regcache_raw_supply (current_regcache, tdep->ppc_xer_regnum,
- (char *) ®s->r32.xer);
- if (tdep->ppc_fpscr_regnum >= 0)
- regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
- (char *) ®s->r32.fpscr);
- if (tdep->ppc_mq_regnum >= 0)
- regcache_raw_supply (current_regcache, tdep->ppc_mq_regnum,
- (char *) ®s->r32.mq);
- }