From patchwork Wed Dec 7 21:09:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 18270 Received: (qmail 58745 invoked by alias); 7 Dec 2016 21:10:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 58718 invoked by uid 89); 7 Dec 2016 21:10:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=H*r:PST, U*palves, sk:palves@, palvesredhatcom X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Dec 2016 21:09:58 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1cEjTN-0003y1-S3 from Thomas_Schwinge@mentor.com ; Wed, 07 Dec 2016 13:09:53 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Wed, 7 Dec 2016 13:09:53 -0800 Received: by tftp-cs (Postfix, from userid 49978) id D1418C222B; Wed, 7 Dec 2016 13:09:52 -0800 (PST) From: Thomas Schwinge To: Pedro Alves , CC: Simon Marchi , Pierre Muller , Subject: Re: [PATCH v3 4/7] Per-inferior/Inferior-qualified thread IDs In-Reply-To: <568EF6C2.9010803@redhat.com> References: <1452085418-18300-1-git-send-email-palves@redhat.com> <1452085418-18300-5-git-send-email-palves@redhat.com> <568D6242.1030802@ericsson.com> <568EC055.7020209@redhat.com> <568EE677.6050407@ericsson.com> <568EF6C2.9010803@redhat.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 7 Dec 2016 22:09:38 +0100 Message-ID: <87d1h3jvjh.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Hi! Better late than never... ;-) On Thu, 07 Jan 2016 23:37:38 +0000, Pedro Alves wrote: > --- a/gdb/gdbthread.h > +++ b/gdb/gdbthread.h > -/* Translate the integer thread id (GDB's homegrown id, not the system's) > - into a "pid" (which may be overloaded with extra thread information). */ > -extern ptid_t thread_id_to_pid (int); > +/* Translate the global integer thread id (GDB's homegrown id, not the > + system's) into a "pid" (which may be overloaded with extra thread > + information). */ > +extern ptid_t global_thread_id_to_ptid (int num); As obvious; pushed to master: commit 14f6890677849172a4b13779acd9089c9baa3a81 Author: Thomas Schwinge Date: Tue May 24 19:36:57 2016 +0200 Hurd: Adjust to "Per-inferior/Inferior-qualified thread IDs" changes [...]/gdb/gnu-nat.c: In function 'set_sig_thread_cmd': [...]/gdb/gnu-nat.c:2973:7: warning: implicit declaration of function 'thread_id_to_pid' [-Wimplicit-function-declaration] ptid_t ptid = thread_id_to_pid (atoi (args)); ^ [...]/gdb/gnu-nat.c:2973:7: error: invalid initializer That's commit 5d5658a1d3c3eb2a09c03f2f0662a1c01963c869, which renamed `thread_id_to_pid` to `global_thread_id_to_ptid`. gdb/ * gnu-nat.c (set_sig_thread_cmd): Call global_thread_id_to_ptid instead of thread_id_to_pid. --- gdb/ChangeLog | 5 +++++ gdb/gnu-nat.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Grüße Thomas diff --git gdb/ChangeLog gdb/ChangeLog index c251150..61d1205 100644 --- gdb/ChangeLog +++ gdb/ChangeLog @@ -1,3 +1,8 @@ +2016-12-07 Thomas Schwinge + + * gnu-nat.c (set_sig_thread_cmd): Call global_thread_id_to_ptid + instead of thread_id_to_pid. + 2016-12-06 Simon Marchi * inferior.c (inferior_command): Remove duplicate diff --git gdb/gnu-nat.c gdb/gnu-nat.c index 927ee5c..92b9292 100644 --- gdb/gnu-nat.c +++ gdb/gnu-nat.c @@ -2964,7 +2964,7 @@ set_sig_thread_cmd (char *args, int from_tty) inf->signal_thread = 0; else { - ptid_t ptid = thread_id_to_pid (atoi (args)); + ptid_t ptid = global_thread_id_to_ptid (atoi (args)); if (ptid_equal (ptid, minus_one_ptid)) error (_("Thread ID %s not known. "