diff options
author | Fred Fish <fnf@specifix.com> | 1992-06-24 04:49:48 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-06-24 04:49:48 +0000 |
commit | e676a15f0b9ef089973311249917e203917b3903 (patch) | |
tree | ac8656c9b5795932c78ea01ea53ce9eabee5a9ae /gdb/rs6000-xdep.c | |
parent | 0fd24984ce2d13dd7ec231afa5b42e60ff1f1858 (diff) | |
download | gdb-e676a15f0b9ef089973311249917e203917b3903.zip gdb-e676a15f0b9ef089973311249917e203917b3903.tar.gz gdb-e676a15f0b9ef089973311249917e203917b3903.tar.bz2 |
* Makefile.in (VERSION): Bump to 4.5.6.
* coffread.c (coff_end_symtab): Cast 2nd arg of complain() to
correct type.
* defs.h (NORETURN): Define away for Lucid compiler.
* remote.c (remote_timer, remote_interrupt): Signal handlers
take one int arg.
* ser-termios.c (serial_write, serial_close): Return whatever
value the write/close call returns, rather than falling off end.
* inferior.h (PTRACE_ARG3_TYPE): Third arg to ptrace is int on
more systems than it is "char *". Define PTRACE_ARG3_TYPE to
default to int.
* infptrace.c, hppabsd-xdep.c, hppahpux-xdep.c, i386-xdep.c,
inferior.h (call_ptrace): Use PTRACE_ARG3_TYPE to declare type
of third arg.
* a68v-xdep.c, arm-xdep.c, convex-xdep.c, hp300ux-xdep.c, infrun.c,
m88k-xdep.c, mach386-xdep.c, mips-xdep.c, os68k-xdep.c, pyr-tdep.c,
pyr-xdep.c, rs6000-xdep.c, sparc-xdep.c, sun3-xdep.c, sun386-xdep.c,
symm-xdep.c, ultra3-xdep.c: Use PTRACE_ARG3_TYPE to cast ptrace
argument 3.
* sparc-xdep.c, a68v-xdep.c (fetch_inferior_registers,
store_inferior_registers): Supply missing fourth argument to
ptrace().
Diffstat (limited to 'gdb/rs6000-xdep.c')
-rw-r--r-- | gdb/rs6000-xdep.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/gdb/rs6000-xdep.c b/gdb/rs6000-xdep.c index 516331d..b4a1851 100644 --- a/gdb/rs6000-xdep.c +++ b/gdb/rs6000-xdep.c @@ -75,18 +75,20 @@ fetch_inferior_registers (regno) for (ii=0; ii < 32; ++ii) *(int*)®isters[REGISTER_BYTE (ii)] = - ptrace (PT_READ_GPR, inferior_pid, ii, 0, 0); + ptrace (PT_READ_GPR, inferior_pid, (PTRACE_ARG3_TYPE) ii, 0, 0); /* read general purpose floating point registers. */ for (ii=0; ii < 32; ++ii) ptrace (PT_READ_FPR, inferior_pid, - (int*)®isters [REGISTER_BYTE (FP0_REGNUM+ii)], FPR0+ii, 0); + (PTRACE_ARG3_TYPE) ®isters [REGISTER_BYTE (FP0_REGNUM+ii)], + FPR0+ii, 0); /* read special registers. */ for (ii=0; ii <= LAST_SP_REGNUM-FIRST_SP_REGNUM; ++ii) *(int*)®isters[REGISTER_BYTE (FIRST_SP_REGNUM+ii)] = - ptrace (PT_READ_GPR, inferior_pid, special_regs[ii], 0, 0); + ptrace (PT_READ_GPR, inferior_pid, (PTRACE_ARG3_TYPE) special_regs[ii], + 0, 0); registers_fetched (); return; @@ -96,16 +98,17 @@ fetch_inferior_registers (regno) else if (regno < FP0_REGNUM) { /* a GPR */ *(int*)®isters[REGISTER_BYTE (regno)] = - ptrace (PT_READ_GPR, inferior_pid, regno, 0, 0); + ptrace (PT_READ_GPR, inferior_pid, (PTRACE_ARG3_TYPE) regno, 0, 0); } else if (regno <= FPLAST_REGNUM) { /* a FPR */ ptrace (PT_READ_FPR, inferior_pid, - (int*)®isters [REGISTER_BYTE (regno)], (regno-FP0_REGNUM+FPR0), 0); + (PTRACE_ARG3_TYPE) ®isters [REGISTER_BYTE (regno)], + (regno-FP0_REGNUM+FPR0), 0); } else if (regno <= LAST_SP_REGNUM) { /* a special register */ *(int*)®isters[REGISTER_BYTE (regno)] = ptrace (PT_READ_GPR, inferior_pid, - special_regs[regno-FIRST_SP_REGNUM], 0, 0); + (PTRACE_ARG3_TYPE) special_regs[regno-FIRST_SP_REGNUM], 0, 0); } else fprintf (stderr, "gdb error: register no %d not implemented.\n", regno); @@ -137,7 +140,7 @@ store_inferior_registers (regno) /* write general purpose registers first! */ for ( ii=GPR0; ii<=GPR31; ++ii) { - ptrace (PT_WRITE_GPR, inferior_pid, ii, + ptrace (PT_WRITE_GPR, inferior_pid, (PTRACE_ARG3_TYPE) ii, *(int*)®isters[REGISTER_BYTE (ii)], 0); if ( errno ) { perror ("ptrace write_gpr"); errno = 0; @@ -147,7 +150,8 @@ store_inferior_registers (regno) /* write floating point registers now. */ for ( ii=0; ii < 32; ++ii) { ptrace (PT_WRITE_FPR, inferior_pid, - (int*)®isters[REGISTER_BYTE (FP0_REGNUM+ii)], FPR0+ii, 0); + (PTRACE_ARG3_TYPE) ®isters[REGISTER_BYTE (FP0_REGNUM+ii)], + FPR0+ii, 0); if ( errno ) { perror ("ptrace write_fpr"); errno = 0; } @@ -155,8 +159,9 @@ store_inferior_registers (regno) /* write special registers. */ for (ii=0; ii <= LAST_SP_REGNUM-FIRST_SP_REGNUM; ++ii) { - ptrace (PT_WRITE_GPR, inferior_pid, special_regs[ii], - *(int*)®isters[REGISTER_BYTE (FIRST_SP_REGNUM+ii)], 0); + ptrace (PT_WRITE_GPR, inferior_pid, + (PTRACE_ARG3_TYPE) special_regs[ii], + *(int*)®isters[REGISTER_BYTE (FIRST_SP_REGNUM+ii)], 0); if ( errno ) { perror ("ptrace write_gpr"); errno = 0; } @@ -167,19 +172,21 @@ store_inferior_registers (regno) else if (regno < FP0_REGNUM) { /* a GPR */ - ptrace (PT_WRITE_GPR, inferior_pid, regno, + ptrace (PT_WRITE_GPR, inferior_pid, (PTRACE_ARG3_TYPE) regno, *(int*)®isters[REGISTER_BYTE (regno)], 0); } else if (regno <= FPLAST_REGNUM) { /* a FPR */ ptrace (PT_WRITE_FPR, inferior_pid, - (int*)®isters[REGISTER_BYTE (regno)], regno-FP0_REGNUM+FPR0, 0); + (PTRACE_ARG3_TYPE) ®isters[REGISTER_BYTE (regno)], + regno-FP0_REGNUM+FPR0, 0); } else if (regno <= LAST_SP_REGNUM) { /* a special register */ - ptrace (PT_WRITE_GPR, inferior_pid, special_regs [regno-FIRST_SP_REGNUM], - *(int*)®isters[REGISTER_BYTE (regno)], 0); + ptrace (PT_WRITE_GPR, inferior_pid, + (PTRACE_ARG3_TYPE) special_regs [regno-FIRST_SP_REGNUM], + *(int*)®isters[REGISTER_BYTE (regno)], 0); } else @@ -382,7 +389,8 @@ unsigned int pid; usleep (36000); errno = 0; - ptrace(PT_LDINFO, pid, ldi, MAX_LOAD_SEGS * sizeof(*ldi), ldi); + ptrace(PT_LDINFO, pid, (PTRACE_ARG3_TYPE) ldi, + MAX_LOAD_SEGS * sizeof(*ldi), ldi); if (errno) { perror_with_name ("ptrace ldinfo"); return 0; @@ -497,7 +505,7 @@ exec_one_dummy_insn () target_insert_breakpoint (DUMMY_INSN_ADDR, &shadow); errno = 0; - ptrace (PT_CONTINUE, inferior_pid, DUMMY_INSN_ADDR, 0, 0); + ptrace (PT_CONTINUE, inferior_pid, (PTRACE_ARG3_TYPE) DUMMY_INSN_ADDR, 0, 0); if (errno) perror ("pt_continue"); |