This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix inferior_pid argument for arm-netbsd



This is a mechanical change that is required to get the current sources to 
build at all for arm-netbsd native.  I guess the code I developed the 
NetBSD sources for must have predated this global change.

With this and previous patch at least cvs gdb will now build on arm-netbsd.

[ The testsuite results are somewhat horrible :-( ]

R.

<date>  Richard Earnshaw  (rearnsha@arm.com)

	* armnbsd-nat.c (fetch_inferior_registers): Change inferior_pid -> 
	inferior_ptid.pid.


Index: armnbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/armnbsd-nat.c,v
retrieving revision 1.1
diff -p -r1.1 armnbsd-nat.c
*** armnbsd-nat.c	2001/12/17 21:14:10	1.1
--- armnbsd-nat.c	2002/01/09 13:24:50
*************** fetch_inferior_registers (regno)
*** 34,46 ****
    struct reg inferior_registers;
    struct fpreg inferior_fpregisters;
  
!   ptrace (PT_GETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inferior_registers, 0);
    memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
  	  16 * sizeof (unsigned int));
    memcpy (&registers[REGISTER_BYTE (PS_REGNUM)], &inferior_registers.r_cpsr,
  	  sizeof (unsigned int));
!   ptrace (PT_GETFPREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inferior_fpregisters,
! 	  0);
    memcpy (&registers[REGISTER_BYTE (F0_REGNUM)], &inferior_fpregisters.fpr[0],
  	  8 * sizeof (fp_reg_t));
    memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)],
--- 34,47 ----
    struct reg inferior_registers;
    struct fpreg inferior_fpregisters;
  
!   ptrace (PT_GETREGS, inferior_ptid.pid,
! 	  (PTRACE_ARG3_TYPE) &inferior_registers, 0);
    memcpy (&registers[REGISTER_BYTE (0)], &inferior_registers,
  	  16 * sizeof (unsigned int));
    memcpy (&registers[REGISTER_BYTE (PS_REGNUM)], &inferior_registers.r_cpsr,
  	  sizeof (unsigned int));
!   ptrace (PT_GETFPREGS, inferior_ptid.pid,
! 	  (PTRACE_ARG3_TYPE) &inferior_fpregisters, 0);
    memcpy (&registers[REGISTER_BYTE (F0_REGNUM)], &inferior_fpregisters.fpr[0],
  	  8 * sizeof (fp_reg_t));
    memcpy (&registers[REGISTER_BYTE (FPS_REGNUM)],
*************** store_inferior_registers (regno)
*** 58,64 ****
  	  16 * sizeof (unsigned int));
    memcpy (&inferior_registers.r_cpsr, &registers[REGISTER_BYTE (PS_REGNUM)],
  	  sizeof (unsigned int));
!   ptrace (PT_SETREGS, inferior_pid, (PTRACE_ARG3_TYPE) &inferior_registers, 0);
  
    /* XXX Set FP regs. */
  }
--- 59,66 ----
  	  16 * sizeof (unsigned int));
    memcpy (&inferior_registers.r_cpsr, &registers[REGISTER_BYTE (PS_REGNUM)],
  	  sizeof (unsigned int));
!   ptrace (PT_SETREGS, inferior_ptid.pid,
! 	  (PTRACE_ARG3_TYPE) &inferior_registers, 0);
  
    /* XXX Set FP regs. */
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]