+2000-10-27 J.T. Conklin <jtc@redback.com>
+
+ * arch-utils.c (set_architecture, set_architecture_from_arch_mach,
+ set_gdbarch_from_file): Fix spelling error.
+ * v850-tdep.c (v850_target_architecture_hook): Likewise.
+ * gdbarch.sh: Fix spelling errors in comment.
+ * gdbarch.c, gdbarch.h: Regenerate.
+
+ * ppcnbsd-nat.c (fetch_core_registers, fetch_inferior_registers,
+ store_inferior_registers): Support older NetBSD/powerpc systems
+ from before fp reg support was added. Adapt to register number
+ changes caused when powerpc target was multi-arched.
+
2000-10-26 David B. Anderson <davea@sgi.com>
* breakpoint.c breakpoint.h hppab-nat.c infrun.c
if (wanted != NULL)
set_arch (wanted, set_arch_manual);
else
- internal_error ("gdbarch: hardwired architecture/machine not reconized");
+ internal_error ("gdbarch: hardwired architecture/machine not recognized");
}
/* Set the architecture from a BFD (deprecated) */
if (gdbarch_update_p (info))
target_architecture_auto = 0;
else
- printf_unfiltered ("Architecture `%s' not reconized.\n",
+ printf_unfiltered ("Architecture `%s' not recognized.\n",
set_architecture_string);
}
else
memset (&info, 0, sizeof info);
info.abfd = abfd;
if (! gdbarch_update_p (info))
- error ("Architecture of file not reconized.\n");
+ error ("Architecture of file not recognized.\n");
}
else
{
that the INFO.BYTE_ORDER is non-zero.
The INIT function shall return any of: NULL - indicating that it
- doesn't reconize the selected architecture; an existing \`\`struct
+ doesn't recognize the selected architecture; an existing \`\`struct
gdbarch'' from the ARCHES list - indicating that the new
architecture is just a synonym for an earlier architecture (see
gdbarch_list_lookup_by_info()); a newly created \`\`struct gdbarch''
{
struct gdbarch_registration **curr;
const struct bfd_arch_info *bfd_arch_info;
- /* Check that BFD reconizes this architecture */
+ /* Check that BFD recognizes this architecture */
bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
if (bfd_arch_info == NULL)
{
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
+#include "ppc-tdep.h"
#define RF(dst, src) \
memcpy(®isters[REGISTER_BYTE(dst)], &src, sizeof(src))
fetch_inferior_registers (int regno)
{
struct reg inferior_registers;
+#ifdef PT_GETFPREGS
struct fpreg inferior_fp_registers;
+#endif
int i;
ptrace (PT_GETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
for (i = 0; i < 32; i++)
RF (i, inferior_registers.fixreg[i]);
- RF (LR_REGNUM, inferior_registers.lr);
- RF (CR_REGNUM, inferior_registers.cr);
- RF (XER_REGNUM, inferior_registers.xer);
- RF (CTR_REGNUM, inferior_registers.ctr);
+ RF (PPC_LR_REGNUM, inferior_registers.lr);
+ RF (PPC_CR_REGNUM, inferior_registers.cr);
+ RF (PPC_XER_REGNUM, inferior_registers.xer);
+ RF (PPC_CTR_REGNUM, inferior_registers.ctr);
RF (PC_REGNUM, inferior_registers.pc);
+#ifdef PT_GETFPREGS
ptrace (PT_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
+ (PTRACE_ARG3_TYPE) &inferior_fp_registers, 0);
for (i = 0; i < 32; i++)
RF (FP0_REGNUM + i, inferior_fp_registers.r_regs[i]);
+#endif
registers_fetched ();
}
store_inferior_registers (int regno)
{
struct reg inferior_registers;
+#ifdef PT_SETFPREGS
struct fpreg inferior_fp_registers;
+#endif
int i;
for (i = 0; i < 32; i++)
RS (i, inferior_registers.fixreg[i]);
- RS (LR_REGNUM, inferior_registers.lr);
- RS (CR_REGNUM, inferior_registers.cr);
- RS (XER_REGNUM, inferior_registers.xer);
- RS (CTR_REGNUM, inferior_registers.ctr);
+ RS (PPC_LR_REGNUM, inferior_registers.lr);
+ RS (PPC_CR_REGNUM, inferior_registers.cr);
+ RS (PPC_XER_REGNUM, inferior_registers.xer);
+ RS (PPC_CTR_REGNUM, inferior_registers.ctr);
RS (PC_REGNUM, inferior_registers.pc);
ptrace (PT_SETREGS, inferior_pid,
(PTRACE_ARG3_TYPE) & inferior_registers, 0);
+#ifdef PT_SETFPREGS
for (i = 0; i < 32; i++)
RS (FP0_REGNUM + i, inferior_fp_registers.r_regs[i]);
ptrace (PT_SETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) & inferior_fp_registers, 0);
+#endif
}
struct md_core
{
struct reg intreg;
+#ifdef PT_GETFPREGS
struct fpreg freg;
+#endif
};
void
/* Integer registers */
for (i = 0; i < 32; i++)
RF (i, core_reg->intreg.fixreg[i]);
- RF (LR_REGNUM, core_reg->intreg.lr);
- RF (CR_REGNUM, core_reg->intreg.cr);
- RF (XER_REGNUM, core_reg->intreg.xer);
- RF (CTR_REGNUM, core_reg->intreg.ctr);
+ RF (PPC_LR_REGNUM, core_reg->intreg.lr);
+ RF (PPC_CR_REGNUM, core_reg->intreg.cr);
+ RF (PPC_XER_REGNUM, core_reg->intreg.xer);
+ RF (PPC_CTR_REGNUM, core_reg->intreg.ctr);
RF (PC_REGNUM, core_reg->intreg.pc);
+#ifdef PT_FPGETREGS
/* Floating point registers */
for (i = 0; i < 32; i++)
RF (FP0_REGNUM + i, core_reg->freg.r_regs[i]);
+#endif
registers_fetched ();
}