From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22823 invoked by alias); 18 Jan 2016 12:32:09 -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 22801 invoked by uid 89); 18 Jan 2016 12:32:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.8 required=5.0 tests=BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=UD:amd64bsd-nat.c, amd64bsd-nat.c, amd64bsdnatc, UD:inf-ptrace.h X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 18 Jan 2016 12:32:08 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 1EE0949DBD; Mon, 18 Jan 2016 12:32:07 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0ICW5cJ023876; Mon, 18 Jan 2016 07:32:06 -0500 Message-ID: <569CDB45.2000905@redhat.com> Date: Mon, 18 Jan 2016 12:32:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: John Baldwin , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH v3 4/6] Use LWP IDs with ptrace register requests on FreeBSD. References: <1453084047-16175-1-git-send-email-jhb@FreeBSD.org> <1453084047-16175-5-git-send-email-jhb@FreeBSD.org> In-Reply-To: <1453084047-16175-5-git-send-email-jhb@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg00373.txt.bz2 On 01/18/2016 02:27 AM, John Baldwin wrote: > This allows gdb to fetch per-thread registers for multi-threaded FreeBSD > processes. > > Export get_ptrace_pid() from inf-ptrace.c and use it to determine the PID > to pass to ptrace in pan-BSD native targets. NetBSD and OpenBSD also accept > LWP IDs for ptrace requests to fetch per-thread state. > > gdb/ChangeLog: > > * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use > get_ptrace_pid. > (amd64bsd_store_inferior_registers): Use get_ptrace_pid. > (amd64bsd_dr_get): Use get_ptrace_pid. > (amd64bsd_dr_set): Use get_ptrace_pid. > * i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid. > (i386bsd_store_inferior_registers): Use get_ptrace_pid. > (i386bsd_dr_get): Use get_ptrace_pid. > (i386bsd_dr_set): Use get_ptrace_pid. > * inf-ptrace.c (get_ptrace_pid): Export. > * inf-ptrace.h (get_ptrace_pid): Declare. > * ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id. > (ppcfbsd_store_inferior_registers): Use lwp id. LGTM. Thanks, Pedro Alves