From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15180 invoked by alias); 31 Oct 2014 18:57:43 -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 15169 invoked by uid 89); 31 Oct 2014 18:57:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f202.google.com Received: from mail-ig0-f202.google.com (HELO mail-ig0-f202.google.com) (209.85.213.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 31 Oct 2014 18:57:41 +0000 Received: by mail-ig0-f202.google.com with SMTP id r10so211304igi.3 for ; Fri, 31 Oct 2014 11:57:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:cc:subject:in-reply-to :references; bh=SKrRkhbawPTAp4VrehmwBi5G7e72tto02p3ARGe5oDo=; b=BBrtHOgggVFyAQMHwMppkHCq6dlXBo9C158TFTnli8IdvIXkngkvBAM1yKSwt67l3+ 7yX3SwAFohSO6P+FEFhJFIulywXfsophd6cjqlOm7WepbASz2aBxpu7q1sonny0+mBxQ k4yPR+RNCEWBuU9Bv+HrW7JhwTujUefOB6IWUv1QkUdD/V94+IHnGVRQ4qNA0JyrPHs5 bUonpvQyDAPufHGh3KIKhBBsEiwzut1nA4FgVD0u0kBl8t0OBAefyEJK5981YNL3jS1o hGSOZsOD/Y7ZsmqtY/EFdpO/ZeHiyseQ240BOXjy3+f6LjtyWZhL9y03vgy+uF5uwIhs Rt1w== X-Gm-Message-State: ALoCoQmWxO8S230V7kW/z2PoQGC1sbUtiR/BIPTxbd2Jk+BoyivWOfqoYRC8oSt1lkE3qs2LDtXeZrv2N1k3zcOHUkz0OJ8EP4zPUda3pfH+4WPFfF5+v6MaLTtTxE17uzUmn1rKifnEs7E3RaXz6ane9bjRIogurqtzwsyt87K3oasSTgMEWdM= X-Received: by 10.182.186.7 with SMTP id fg7mr13405867obc.1.1414781859417; Fri, 31 Oct 2014 11:57:39 -0700 (PDT) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id n24si630472yha.6.2014.10.31.11.57.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Oct 2014 11:57:39 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com ([172.17.128.107]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id YYq3IXKF.1; Fri, 31 Oct 2014 11:57:39 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21587.56225.942167.190@ruffy2.mtv.corp.google.com> Date: Fri, 31 Oct 2014 18:57:00 -0000 To: Gary Benson Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 01/13 v2] Introduce current_lwp_ptid In-Reply-To: <1412848358-9958-2-git-send-email-gbenson@redhat.com> References: <1412848358-9958-1-git-send-email-gbenson@redhat.com> <1412848358-9958-2-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00857.txt.bz2 Gary Benson writes: > This commit introduces a new function, current_lwp_ptid, that > shared Linux code can use to obtain the ptid of the current > lightweight process. > > gdb/ChangeLog: > > * nat/linux-nat.h (current_lwp_ptid): New declaration. > * linux-nat.c (current_lwp_ptid): New function. > * x86-linux-nat.c: Include nat/linux-nat.h. > (x86_linux_dr_get_addr): Use current_lwp_ptid. > (x86_linux_dr_get_control): Likewise. > (x86_linux_dr_get_status): Likewise. > (x86_linux_dr_set_control): Likewise. > (x86_linux_dr_set_addr): Likewise. > > gdb/gdbserver/ChangeLog: > > * linux-low.c (current_lwp_ptid): New function. > * linux-x86-low.c: Include nat/linux-nat.h. > (x86_dr_low_get_addr): Use current_lwp_ptid. > (x86_dr_low_get_control): Likewise. > (x86_dr_low_get_status): Likewise. > --- > gdb/ChangeLog | 11 +++++++++++ > gdb/gdbserver/ChangeLog | 8 ++++++++ > gdb/gdbserver/linux-low.c | 8 ++++++++ > gdb/gdbserver/linux-x86-low.c | 13 ++++--------- > gdb/linux-nat.c | 9 +++++++++ > gdb/nat/linux-nat.h | 5 +++++ > gdb/x86-linux-nat.c | 11 ++++++----- > 7 files changed, 51 insertions(+), 14 deletions(-) > > diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c > index 8776670..6e1ed8a 100644 > --- a/gdb/gdbserver/linux-low.c > +++ b/gdb/gdbserver/linux-low.c > @@ -6035,6 +6035,14 @@ linux_low_read_btrace (struct btrace_target_info *tinfo, struct buffer *buffer, > } > #endif /* HAVE_LINUX_BTRACE */ > > +/* See common/common-inferior.h. */ > + > +ptid_t > +current_lwp_ptid (void) > +{ > + return ptid_of (current_thread); > +} > + Hi. Nit I just noticed. s,common/common-inferior.h,nat/linux-nat.h,