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]

RFA: don't cast last argument to ptrace


I've committed this to the PPC64 Linux branch, but I think it should
be considered for the trunk as well.

2003-05-14  James Blandy  <jimb@redhat.com>

	* ppc-linux-nat.c (store_altivec_registers): Don't cast fourth
	argument to ptrace to int; the system headers should give it the
	right type, and pointers don't fit in ints on powerpc64-*-*.

*** gdb/ppc-linux-nat.c.~1.2.~	Wed May 14 11:37:19 2003
--- gdb/ppc-linux-nat.c	Wed May 14 18:29:11 2003
***************
*** 428,434 ****
    int ret;
    gdb_vrregset_t regs;
  
!   ret = ptrace (PTRACE_GETVRREGS, tid, 0, (int) &regs);
    if (ret < 0)
      {
        if (errno == EIO)
--- 428,434 ----
    int ret;
    gdb_vrregset_t regs;
  
!   ret = ptrace (PTRACE_GETVRREGS, tid, 0, &regs);
    if (ret < 0)
      {
        if (errno == EIO)
***************
*** 441,447 ****
  
    fill_vrregset (&regs);
    
!   if (ptrace (PTRACE_SETVRREGS, tid, 0, (int) &regs) < 0)
      perror_with_name ("Couldn't write AltiVec registers");
  }
  
--- 441,447 ----
  
    fill_vrregset (&regs);
    
!   if (ptrace (PTRACE_SETVRREGS, tid, 0, &regs) < 0)
      perror_with_name ("Couldn't write AltiVec registers");
  }
  


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