From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5955 invoked by alias); 20 Aug 2013 17:03:19 -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 5939 invoked by uid 89); 20 Aug 2013 17:03:19 -0000 X-Spam-SWARE-Status: No, score=-8.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 20 Aug 2013 17:03:14 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7KH37ir021755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Aug 2013 13:03:07 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7KH35i6010569; Tue, 20 Aug 2013 13:03:06 -0400 Message-ID: <5213A149.4000804@redhat.com> Date: Tue, 20 Aug 2013 17:03:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tom Tromey CC: lgustavo@codesourcery.com, "'gdb-patches@sourceware.org'" Subject: Re: [PATCH, v2] Share ptrace options discovery/linux native code between GDB and gdbserver References: <5212A9E1.6030707@codesourcery.com> <52139BBA.60300@redhat.com> <871u5oia03.fsf@fleche.redhat.com> In-Reply-To: <871u5oia03.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00551.txt.bz2 On 08/20/2013 05:48 PM, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > >>> +void >>> +linux_enable_event_reporting (ptid_t ptid) > > Pedro> Could you preserve gdbserver's prototype here, please? That > Pedro> is, take a single integer pid rather than a ptid. > > Just a nit -- but why int and not pid_t? Hysterical raisins, I guess. Eheh, I purposedly said integer to avoid implying "int". :-) The current gdbserver prototype does use int, but I don't care whether it's int or pid_t as long as it's a single integer. On the core side, ptid_t holds an int for pid, so code that faces the core would tend to use int, and we extract pids from ptids in the target code all the time, so int tends to Just Be Used. In this particular case, given this is native code, there's nothing stopping it from using pid_t. > (Not a typo for ptid_t, that one I understand :) -- Pedro Alves