From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14504 invoked by alias); 10 Jul 2013 19:07:24 -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 14438 invoked by uid 89); 10 Jul 2013 19:07:24 -0000 X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 10 Jul 2013 19:07:22 +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 r6AJ7A7m010617; Wed, 10 Jul 2013 21:07:11 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r6AJ7AfX021641; Wed, 10 Jul 2013 21:07:10 +0200 (CEST) Date: Wed, 10 Jul 2013 19:07:00 -0000 Message-Id: <201307101907.r6AJ7AfX021641@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: raunaq12@in.ibm.com, gdb-patches@sourceware.org, brobecker@adacore.com In-reply-to: <87r4f6fgst.fsf@fleche.redhat.com> (message from Tom Tromey on Wed, 10 Jul 2013 11:47:30 -0600) Subject: Re: [PATCH 3/5] powerpc64-aix inf-ptrace patch References: <87r4f6fgst.fsf@fleche.redhat.com> X-SW-Source: 2013-07/txt/msg00293.txt.bz2 > From: Tom Tromey > Date: Wed, 10 Jul 2013 11:47:30 -0600 > > >>>>> ">" == Raunaq 12 writes: > > >> Since that is not the right way to go about it, I thought it would be > >> better to create a new file called 'inf-ptrace64.c' derived from > >> inf-ptrace instead, This new file contains all these above mentioned > >> changes. inf-ptrace64 will be compiled only if the host is detected > >> as powerpc64-ibm-aix. SO, it will not interfere with the original > >> inf-ptrace that is used if host is powerpc-ibm-aix > > No, copying the file is worse than other available alternatives. > For example you can use configure to discover the proper argument types, > and then write a function that wraps ptrace and provides the needed > casts. I agree that copying inf-ptrace.c isn't the right approach. Tom's suggestion might be viable, but I wouldn't be pleased with more magic casts and #ifdefs in inf-ptrace.c.