#include "xcoffsolib.h"
#include "symfile.h"
#include "objfiles.h"
-#include "libbfd.h" /* For bfd_cache_lookup (FIXME) */
+#include "libbfd.h" /* For bfd_default_set_arch_mach (FIXME) */
#include "bfd.h"
#include "gdb-stabs.h"
#include "regcache.h"
#include "arch-utils.h"
-#include "language.h" /* for local_hex_string(). */
#include "ppc-tdep.h"
#include "exec.h"
#ifndef ARCH3264
# define ARCH64() 0
#else
-# define ARCH64() (DEPRECATED_REGISTER_RAW_SIZE (0) == 8)
+# define ARCH64() (register_size (current_gdbarch, 0) == 8)
#endif
/* Union of 32-bit and 64-bit ".reg" core file sections. */
even if the register is really only 32 bits. */
long long buf;
rs6000_ptrace64 (PT_READ_GPR, PIDGET (inferior_ptid), nr, 0, (int *)&buf);
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 8)
+ if (register_size (current_gdbarch, regno) == 8)
memcpy (addr, &buf, 8);
else
*addr = buf;
}
if (!errno)
- supply_register (regno, (char *) addr);
+ regcache_raw_supply (current_regcache, regno, (char *) addr);
else
{
#if 0
int nr, isfloat;
/* Fetch the register's value from the register cache. */
- regcache_collect (regno, addr);
+ regcache_raw_collect (current_regcache, regno, addr);
/* -1 can be a successful return value, so infer errors from errno. */
errno = 0;
/* PT_WRITE_GPR requires the buffer parameter to point to an 8-byte
area, even if the register is really only 32 bits. */
long long buf;
- if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 8)
+ if (register_size (current_gdbarch, regno) == 8)
memcpy (&buf, addr, 8);
else
buf = *addr;
to debugger memory starting at MYADDR. Copy to inferior if
WRITE is nonzero.
- Returns the length copied, which is either the LEN argument or zero.
- This xfer function does not do partial moves, since child_ops
- doesn't allow memory operations to cross below us in the target stack
- anyway. */
+ Returns the length copied, which is either the LEN argument or
+ zero. This xfer function does not do partial moves, since
+ deprecated_child_ops doesn't allow memory operations to cross below
+ us in the target stack anyway. */
int
child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
if (ARCH64 ())
{
for (regi = 0; regi < ppc_num_gprs; regi++)
- supply_register (tdep->ppc_gp0_regnum + regi,
- (char *) ®s->r64.gpr[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++)
- supply_register (tdep->ppc_fp0_regnum + regi,
- (char *) ®s->r64.fpr[regi]);
-
- supply_register (PC_REGNUM, (char *) ®s->r64.iar);
- supply_register (tdep->ppc_ps_regnum, (char *) ®s->r64.msr);
- supply_register (tdep->ppc_cr_regnum, (char *) ®s->r64.cr);
- supply_register (tdep->ppc_lr_regnum, (char *) ®s->r64.lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r64.ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) ®s->r64.xer);
+ 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)
- supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r64.fpscr);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) ®s->r64.fpscr);
}
else
{
for (regi = 0; regi < ppc_num_gprs; regi++)
- supply_register (tdep->ppc_gp0_regnum + regi,
- (char *) ®s->r32.gpr[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++)
- supply_register (tdep->ppc_fp0_regnum + regi,
- (char *) ®s->r32.fpr[regi]);
-
- supply_register (PC_REGNUM, (char *) ®s->r32.iar);
- supply_register (tdep->ppc_ps_regnum, (char *) ®s->r32.msr);
- supply_register (tdep->ppc_cr_regnum, (char *) ®s->r32.cr);
- supply_register (tdep->ppc_lr_regnum, (char *) ®s->r32.lr);
- supply_register (tdep->ppc_ctr_regnum, (char *) ®s->r32.ctr);
- supply_register (tdep->ppc_xer_regnum, (char *) ®s->r32.xer);
+ 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)
- supply_register (tdep->ppc_fpscr_regnum, (char *) ®s->r32.fpscr);
+ regcache_raw_supply (current_regcache, tdep->ppc_fpscr_regnum,
+ (char *) ®s->r32.fpscr);
if (tdep->ppc_mq_regnum >= 0)
- supply_register (tdep->ppc_mq_regnum, (char *) ®s->r32.mq);
+ regcache_raw_supply (current_regcache, tdep->ppc_mq_regnum,
+ (char *) ®s->r32.mq);
}
}
\f
: vp->objfile);
}
}
- error ("Unable to find TOC entry for pc %s\n", local_hex_string (pc));
+ error ("Unable to find TOC entry for pc %s\n", hex_string (pc));
}
\f
/* Register that we are able to handle rs6000 core file formats. */