Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michal Ludvig <mludvig@suse.cz>
To: gdb-patches@sources.redhat.com
Subject: [patch] x86-64 ptrace() ABI change sync
Date: Thu, 04 Apr 2002 05:13:00 -0000	[thread overview]
Message-ID: <3CAC5172.6040301@suse.cz> (raw)

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;
         }



             reply	other threads:[~2002-04-04 13:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-04  5:13 Michal Ludvig [this message]
2002-04-04  8:39 ` Daniel Jacobowitz
2002-04-04  8:51   ` Andreas Jaeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CAC5172.6040301@suse.cz \
    --to=mludvig@suse.cz \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox