From ec3d358c9f7f313ecde095bcf1ea45a5706c6d71 Mon Sep 17 00:00:00 2001 From: "J.T. Conklin" Date: Fri, 27 Oct 2000 19:17:57 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 13 +++++++++++++ gdb/arch-utils.c | 6 +++--- gdb/gdbarch.c | 2 +- gdb/gdbarch.h | 2 +- gdb/gdbarch.sh | 4 ++-- gdb/ppcnbsd-nat.c | 39 ++++++++++++++++++++++++++------------- gdb/v850-tdep.c | 2 +- 7 files changed, 47 insertions(+), 21 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c889e1b3799..c9f3623527c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,16 @@ +2000-10-27 J.T. Conklin + + * 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 * breakpoint.c breakpoint.h hppab-nat.c infrun.c diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index d58eb457188..4c87676d834 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -441,7 +441,7 @@ set_architecture_from_arch_mach (enum bfd_architecture arch, 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) */ @@ -500,7 +500,7 @@ set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c) 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 @@ -560,7 +560,7 @@ set_gdbarch_from_file (bfd *abfd) 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 { diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 5754aa47710..7e1959d72d4 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -3998,7 +3998,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture, { 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) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 87cbbd9f59e..198d80064aa 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1398,7 +1398,7 @@ extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); 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'' diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 0d827f77080..3273dc5acba 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -747,7 +747,7 @@ extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch); 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'' @@ -1696,7 +1696,7 @@ gdbarch_register (enum bfd_architecture bfd_architecture, { 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) { diff --git a/gdb/ppcnbsd-nat.c b/gdb/ppcnbsd-nat.c index 3fba3971fd5..044115b24f0 100644 --- a/gdb/ppcnbsd-nat.c +++ b/gdb/ppcnbsd-nat.c @@ -26,6 +26,7 @@ #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)) @@ -37,23 +38,27 @@ void 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 (); } @@ -62,30 +67,36 @@ void 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 @@ -98,15 +109,17 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which, /* 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 (); } diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index 8820534405f..515013ce08a 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -850,7 +850,7 @@ v850_target_architecture_hook (const bfd_arch_info_type *ap) } } - internal_error ("Architecture `%s' unreconized", ap->printable_name); + internal_error ("Architecture `%s' unrecognized", ap->printable_name); } void -- 2.30.2