From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14708 invoked by alias); 1 Aug 2013 13:26:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 14694 invoked by uid 89); 1 Aug 2013 13:26:00 -0000 X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 01 Aug 2013 13:25:59 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id r71DPgxx017681; Thu, 1 Aug 2013 15:25:42 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r71DPfva000959; Thu, 1 Aug 2013 15:25:41 +0200 (CEST) Date: Thu, 01 Aug 2013 13:26:00 -0000 Message-Id: <201308011325.r71DPfva000959@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: raunaq12@in.ibm.com CC: gdb-patches@sourceware.org, tromey@redhat.com In-reply-to: (message from Raunaq 12 on Thu, 1 Aug 2013 16:56:53 +0530) Subject: Re: [PATCH 4/5] powerpc64-aix ptrace64 when defined. References: X-SW-Source: 2013-08/txt/msg00022.txt.bz2 > From: Raunaq 12 > Date: Thu, 1 Aug 2013 16:56:53 +0530 > > When GDB is compiled in 64 BIT mode ptrace and ptracex calls are not > defined on AIX. > So, instead we check if ptrace64 is defined, if it is then we call that > instead of ptrace/x. > > Kindly review this. Thanks. I'm basically happy with the gdb_ptrace.h bit. You could apply some of the advice about avoiding unecessary casts to rs600-nat.c and aix-thread.c, but I don't really care about the code in there. Still some nits: > --- > ChangeLog :- > > * gdb_ptrace.h: Add macro to define ptrace64 if HAVE_PTRACE64 defined * gdb_ptrace.h: Use ptrace64 instead of ptrace if HAVE_PTRACE64 is defined. > * rs6000-nat.c: Check for __ld_info64_ if compiling 64 BIT gdb. > (rs6000_ptrace32): Call ptrace64 instead of ptrace if present. > (rs6000_ptrace64): Call ptace64 instead of ptracex if present. > *configure.ac: Add function check for ptrace64 * configure.ac: Check for ptrace64. > *config.in: initialize HAVE_PTRACE64 which will be set by configure * configure, config.in: Regenerate. > --- > Index: ./gdb/gdb_ptrace.h > =================================================================== > --- ./gdb.orig/gdb_ptrace.h > +++ ./gdb/gdb_ptrace.h > @@ -135,7 +135,15 @@ > zero. */ > > #ifdef PTRACE_TYPE_ARG5 > -# define ptrace(request, pid, addr, data) ptrace (request, pid, addr, > data, 0) > +# ifdef HAVE_PTRACE64 > +# define ptrace(request, pid, addr, data) \ > + ptrace64 (request, pid, addr, data, 0) > +# undef PTRACE_TYPE_ARG3 > +# define PTRACE_TYPE_ARG3 long long > +# else > +# define ptrace(request, pid, addr, data) \ > + ptrace(request, pid, addr, data, 0) Needs a space between on the last line between 'ptrace' and '(' (but not on the line before that.