Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] x86-64 ptrace() ABI change sync
@ 2002-04-04  5:13 Michal Ludvig
  2002-04-04  8:39 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Ludvig @ 2002-04-04  5:13 UTC (permalink / raw)
  To: gdb-patches

Hi all,
I've committed this obvious patch which synces gdb with changed glibc to 
both mainline and 5.2-branch.

Michal Ludvig

Index: ChangeLog
	* x86-64-linux-nat.c (child_xfer_memory): x86-64 ptrace() ABI
	change sync

Index: x86-64-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 x86-64-linux-nat.c
*** x86-64-linux-nat.c  2002/03/27 10:21:26     1.7
--- x86-64-linux-nat.c  2002/04/04 13:01:24
*************** child_xfer_memory (CORE_ADDR memaddr, ch
*** 441,456 ****
         if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
         {
           /* Need part of initial word -- fetch it.  */
!         ptrace (PT_READ_I, PIDGET (inferior_ptid),
!                 (PTRACE_ARG3_TYPE) addr, buffer);
         }

         if (count > 1)          /* FIXME, avoid if even boundary */
         {
!         ptrace (PT_READ_I, PIDGET (inferior_ptid),
                   ((PTRACE_ARG3_TYPE)
                    (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))),
!                 buffer + count - 1);
         }

         /* Copy data to be written over corresponding part of buffer */
--- 441,456 ----
         if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
         {
           /* Need part of initial word -- fetch it.  */
!         buffer[0] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
!                 (PTRACE_ARG3_TYPE) addr, 0);
         }

         if (count > 1)          /* FIXME, avoid if even boundary */
         {
!         buffer[count-1] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
                   ((PTRACE_ARG3_TYPE)
                    (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))),
!                  0);
         }

         /* Copy data to be written over corresponding part of buffer */
*************** child_xfer_memory (CORE_ADDR memaddr, ch
*** 486,493 ****
         for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
         {
           errno = 0;
!         ptrace (PT_READ_I, PIDGET (inferior_ptid),
!                 (PTRACE_ARG3_TYPE) addr, buffer + i);
           if (errno)
             return 0;
         }
--- 486,493 ----
         for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
         {
           errno = 0;
!         buffer[i] = ptrace (PT_READ_I, PIDGET (inferior_ptid),
!                 (PTRACE_ARG3_TYPE) addr, 0);
           if (errno)
             return 0;
         }



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-04 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-04  5:13 [patch] x86-64 ptrace() ABI change sync Michal Ludvig
2002-04-04  8:39 ` Daniel Jacobowitz
2002-04-04  8:51   ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox