From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2430 invoked by alias); 20 Aug 2013 15:46:02 -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 2421 invoked by uid 89); 20 Aug 2013 15:46:02 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.2 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 20 Aug 2013 15:46:01 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VBo87-0005uO-Kc from Luis_Gustavo@mentor.com ; Tue, 20 Aug 2013 08:45:59 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 20 Aug 2013 08:45:59 -0700 Received: from [172.30.2.208] ([172.30.2.208]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Aug 2013 08:45:58 -0700 Message-ID: <52138F32.3020601@codesourcery.com> Date: Tue, 20 Aug 2013 15:46:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: Tom Tromey CC: "'gdb-patches@sourceware.org'" , Pedro Alves Subject: Re: [PATCH, v2] Share ptrace options discovery/linux native code between GDB and gdbserver References: <5212A9E1.6030707@codesourcery.com> <87d2p8id9f.fsf@fleche.redhat.com> In-Reply-To: <87d2p8id9f.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00544.txt.bz2 On 08/20/2013 12:38 PM, Tom Tromey wrote: >>>>>> "Luis" == Luis Machado writes: > > Luis> This is the second iteration of the patch to do some sharing of ptrace > Luis> and native linux stuff between GDB and gdbserver. > > Luis> I've included fixes based on reviews, so hopefully this is in better > Luis> shape now. > > Thanks. I like it. I have a few nits though. > > Luis> * common/linux-ptrace.c: Include nat/linux-waitpid.h. > > I suppose at some point this file ought to be moved. Right. Should i move it now as part of this cleanup or should i move it in a follow up? > > Luis> * config.in (PTRACE_TYPE_ARG4): Undefine. > > Usually for config.in I just write: > > * config.in: Rebuild. > > ... since presumably you just used autoheader. > Oops. I should probably rebuild it then. > Luis> * configure.ac (AC_CACHE_CHECK): Add void * to the list of > Luis> ptrace's 4th argument's types. > Luis> Check the type of PTRACE_TYPE_ARG4. > > AC_CACHE_CHECK isn't the right function name. Perhaps no name is best > here. Got it. Let's go with no name. > > Also, doesn't this check need to be done in gdbserver as well? For gdbserver we explicitly define the correct types for each argument. Since this is a runtime check, we may run into issues if we attempt to run a binary on a build machine if the target machine is from a different architecture. Does it make sense? Luis