/* Functions specific to running gdb native on an ns32k running NetBSD
- Copyright 1989, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+ Copyright 1989, 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001,
+ 2004 Free Software Foundation, Inc.
This file is part of GDB.
#include "inferior.h"
#include "target.h"
#include "gdbcore.h"
+#include "regcache.h"
#define RF(dst, src) \
- memcpy(®isters[REGISTER_BYTE(dst)], &src, sizeof(src))
+ memcpy(&deprecated_registers[DEPRECATED_REGISTER_BYTE(dst)], &src, sizeof(src))
#define RS(src, dst) \
- memcpy(&dst, ®isters[REGISTER_BYTE(src)], sizeof(dst))
+ memcpy(&dst, &deprecated_registers[DEPRECATED_REGISTER_BYTE(src)], sizeof(dst))
void
fetch_inferior_registers (int regno)
struct reg inferior_registers;
struct fpreg inferior_fpregisters;
- ptrace (PT_GETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- ptrace (PT_GETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
+ ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) & inferior_registers, 0);
+ ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) & inferior_fpregisters, 0);
RF (R0_REGNUM + 0, inferior_registers.r_r0);
RF (R0_REGNUM + 1, inferior_registers.r_r1);
RF (R0_REGNUM + 7, inferior_registers.r_r7);
RF (SP_REGNUM, inferior_registers.r_sp);
- RF (FP_REGNUM, inferior_registers.r_fp);
+ RF (DEPRECATED_FP_REGNUM, inferior_registers.r_fp);
RF (PC_REGNUM, inferior_registers.r_pc);
RF (PS_REGNUM, inferior_registers.r_psr);
RF (LP0_REGNUM + 3, inferior_fpregisters.r_freg[3]);
RF (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
RF (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
void
RS (R0_REGNUM + 7, inferior_registers.r_r7);
RS (SP_REGNUM, inferior_registers.r_sp);
- RS (FP_REGNUM, inferior_registers.r_fp);
+ RS (DEPRECATED_FP_REGNUM, inferior_registers.r_fp);
RS (PC_REGNUM, inferior_registers.r_pc);
RS (PS_REGNUM, inferior_registers.r_psr);
RS (LP0_REGNUM + 5, inferior_fpregisters.r_freg[5]);
RS (LP0_REGNUM + 7, inferior_fpregisters.r_freg[7]);
- ptrace (PT_SETREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_registers, 0);
- ptrace (PT_SETFPREGS, inferior_pid,
- (PTRACE_ARG3_TYPE) & inferior_fpregisters, 0);
+ ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) & inferior_registers, 0);
+ ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) & inferior_fpregisters, 0);
}
\f
struct fpreg freg;
};
-/* Get registers from a core file. */
+/* Get registers from a core file. REG_ADDR is unused. */
static void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
- char *core_reg_sect;
- unsigned core_reg_size;
- int which;
- unsigned int reg_addr; /* Unused in this version */
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
+ unsigned int reg_addr)
{
struct coreregs *core_reg;
RF (R0_REGNUM + 7, core_reg->intreg.r_r7);
RF (SP_REGNUM, core_reg->intreg.r_sp);
- RF (FP_REGNUM, core_reg->intreg.r_fp);
+ RF (DEPRECATED_FP_REGNUM, core_reg->intreg.r_fp);
RF (PC_REGNUM, core_reg->intreg.r_pc);
RF (PS_REGNUM, core_reg->intreg.r_psr);
RF (LP0_REGNUM + 3, core_reg->freg.r_freg[3]);
RF (LP0_REGNUM + 5, core_reg->freg.r_freg[5]);
RF (LP0_REGNUM + 7, core_reg->freg.r_freg[7]);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
/* Register that we are able to handle ns32knbsd core file formats.
void
_initialize_ns32knbsd_nat (void)
{
- add_core_fns (&nat_core_fns);
+ deprecated_add_core_fns (&nat_core_fns);
}
\f
dummy = pcb->pcb_kfp + 8;
RF (SP_REGNUM, dummy);
- RF (FP_REGNUM, sf.sf_fp);
+ RF (DEPRECATED_FP_REGNUM, sf.sf_fp);
RF (PC_REGNUM, sf.sf_pc);
RF (PS_REGNUM, intreg.r_psr);
RF (LP0_REGNUM + 3, pcb->pcb_freg[3]);
RF (LP0_REGNUM + 5, pcb->pcb_freg[5]);
RF (LP0_REGNUM + 7, pcb->pcb_freg[7]);
- registers_fetched ();
+ deprecated_registers_fetched ();
}
#endif /* FETCH_KCORE_REGISTERS */
RF (R0_REGNUM + 7, null);
RF (SP_REGNUM, null);
- RF (FP_REGNUM, null);
+ RF (DEPRECATED_FP_REGNUM, null);
RF (PC_REGNUM, null);
RF (PS_REGNUM, null);
enter_addr = ns32k_get_enter_addr (fi->pc);
if (enter_addr = 0)
return (-1);
- argp = enter_addr == 1 ? SAVED_PC_AFTER_CALL (fi) : FRAME_SAVED_PC (fi);
+ argp = (enter_addr == 1
+ ? DEPRECATED_SAVED_PC_AFTER_CALL (fi)
+ : DEPRECATED_FRAME_SAVED_PC (fi));
for (i = 0; i < 16; i++)
{
/*