/* Host-dependent code for Apollo-68ks for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GDB.
#include "defs.h"
#include "inferior.h"
+#include "regcache.h"
#ifndef _ISP__M68K
#define _ISP__M68K 1
ptrace_$init_control (&inferior_control_registers);
inferior_fp_registers.size = sizeof (inferior_fp_registers);
- registers_fetched ();
+ deprecated_registers_fetched ();
- ptrace (PTRACE_GETREGS, inferior_pid,
+ ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set,
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set);
- ptrace (PTRACE_GETREGS, inferior_pid,
+ ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k);
- ptrace (PTRACE_GETREGS, inferior_pid,
+ ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (&inferior_registers, registers, 16 * 4);
- bcopy (&inferior_fp_registers, ®isters[REGISTER_BYTE (FP0_REGNUM)],
+ bcopy (&inferior_registers, &deprecated_registers[0], 16 * 4);
+ bcopy (&inferior_fp_registers,
+ &deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.regs);
- *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_control_registers.sr;
- *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)] = inferior_control_registers.pc;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)]
+ = inferior_control_registers.sr;
+ *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)]
+ = inferior_control_registers.pc;
}
/* Store our register values back into the inferior.
ptrace_$init_control (&inferior_control_registers);
inferior_fp_registers.size = sizeof (inferior_fp_registers);
- ptrace (PTRACE_GETREGS, inferior_pid,
+ ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k);
- ptrace (PTRACE_GETREGS, inferior_pid,
+ ptrace (PTRACE_GETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k);
- bcopy (registers, &inferior_registers, sizeof (inferior_registers));
+ bcopy (&deprecated_registers[0], &inferior_registers,
+ sizeof (inferior_registers));
- bcopy (®isters[REGISTER_BYTE (FP0_REGNUM)], inferior_fp_registers.regs,
- sizeof inferior_fp_registers.regs);
+ bcopy (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
+ inferior_fp_registers.regs, sizeof inferior_fp_registers.regs);
- inferior_control_registers.sr = *(int *) ®isters[REGISTER_BYTE (PS_REGNUM)];
- inferior_control_registers.pc = *(int *) ®isters[REGISTER_BYTE (PC_REGNUM)];
+ inferior_control_registers.sr
+ = *(int *) &deprecated_registers[REGISTER_BYTE (PS_REGNUM)];
+ inferior_control_registers.pc
+ = *(int *) &deprecated_registers[REGISTER_BYTE (PC_REGNUM)];
- ptrace (PTRACE_SETREGS, inferior_pid,
+ ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_registers,
ptrace_$data_set_m68k);
- ptrace (PTRACE_SETREGS, inferior_pid,
+ ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_fp_registers,
ptrace_$floating_set_m68k);
- ptrace (PTRACE_SETREGS, inferior_pid,
+ ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) & inferior_control_registers,
ptrace_$control_set_m68k,
(PTRACE_ARG3_TYPE) & inferior_control_registers,