This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] x86-64 ptrace() ABI change sync
- From: Michal Ludvig <mludvig at suse dot cz>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 04 Apr 2002 15:13:22 +0200
- Subject: [patch] x86-64 ptrace() ABI change sync
- Organization: SuSE CR
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;
}