X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fmipsm3-nat.c;h=22f947f9db2d2ee27bb0a200d549a96f41be7984;hb=8a2dbca8e1673fc826e7d898bb7f53862dcd8216;hp=5f4d50be078b3cdbcabea55208f540c251a5bfac;hpb=dc9e099fc0eced486ae2b49455c9da113c11f4ff;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c index 5f4d50be07..22f947f9db 100644 --- a/gdb/mipsm3-nat.c +++ b/gdb/mipsm3-nat.c @@ -1,5 +1,5 @@ /* Definitions to make GDB run on a mips box under Mach 3.0 - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright 1992, 1993, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -26,6 +26,7 @@ #include "defs.h" #include "inferior.h" +#include "regcache.h" #include @@ -121,14 +122,14 @@ static int reg_offset[] = * Caller knows that the regs handled in one transaction are of same size. */ #define FETCH_REGS(state, regnum, count) \ - memcpy (®isters[REGISTER_BYTE (regnum)], \ + memcpy (&deprecated_registers[REGISTER_BYTE (regnum)], \ (char *)state+reg_offset[ regnum ], \ count*REGISTER_SIZE) /* Store COUNT contiguous registers to thread STATE starting from REGNUM */ #define STORE_REGS(state, regnum, count) \ memcpy ((char *)state+reg_offset[ regnum ], \ - ®isters[REGISTER_BYTE (regnum)], \ + &deprecated_registers[REGISTER_BYTE (regnum)], \ count*REGISTER_SIZE) #define REGS_ALL -1 @@ -141,8 +142,7 @@ static int reg_offset[] = /* Fech thread's registers. if regno == -1, fetch all regs */ void -fetch_inferior_registers (regno) - int regno; +fetch_inferior_registers (int regno) { kern_return_t ret; @@ -204,7 +204,7 @@ fetch_inferior_registers (regno) } /* ZERO_REGNUM is always zero */ - *(int *) registers = 0; + *(int *) deprecated_registers = 0; /* Copy thread saved regs 1..31 to gdb's reg value array * Luckily, they are contiquous @@ -259,7 +259,7 @@ fetch_inferior_registers (regno) /* If the thread does not have saved COPROC1, set regs to zero */ if (!(exc_state.coproc_state & MIPS_STATUS_USE_COP1)) - bzero (®isters[REGISTER_BYTE (FP0_REGNUM)], + bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)], sizeof (struct mips_float_state)); else { @@ -282,7 +282,7 @@ fetch_inferior_registers (regno) } /* All registers are valid, if not returned yet */ - registers_fetched (); + deprecated_registers_fetched (); } /* Store gdb's view of registers to the thread. @@ -296,8 +296,7 @@ fetch_inferior_registers (regno) */ void -store_inferior_registers (regno) - register int regno; +store_inferior_registers (register int regno) { thread_state_data_t state; kern_return_t ret; @@ -325,7 +324,7 @@ store_inferior_registers (regno) /* Don't allow these to change */ /* ZERO_REGNUM */ - *(int *) registers = 0; + *(int *) deprecated_registers = 0; fetch_inferior_registers (PS_REGNUM); fetch_inferior_registers (BADVADDR_REGNUM); @@ -343,8 +342,8 @@ store_inferior_registers (regno) * should go to threads frame pointer. If not true, this * fails badly!!!!! */ - memcpy (®isters[REGISTER_BYTE (MACH_FP_REGNUM)], - ®isters[REGISTER_BYTE (FP_REGNUM)], + memcpy (&deprecated_registers[REGISTER_BYTE (MACH_FP_REGNUM)], + &deprecated_registers[REGISTER_BYTE (FP_REGNUM)], REGISTER_RAW_SIZE (FP_REGNUM)); #endif