From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (bigwig.baldwin.cx [66.216.25.90]) by sourceware.org (Postfix) with ESMTPS id 7F07D3839C73 for ; Tue, 27 Jul 2021 17:42:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F07D3839C73 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=FreeBSD.org Received: from ralph.com (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id DD8B61A84C72 for ; Tue, 27 Jul 2021 13:42:51 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH v2 5/5] obsd-nat: Report both thread and PID in ::pid_to_str. Date: Tue, 27 Jul 2021 10:41:10 -0700 Message-Id: <20210727174110.62480-6-jhb@FreeBSD.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210727174110.62480-1-jhb@FreeBSD.org> References: <20210727174110.62480-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.4 (mail.baldwin.cx [0.0.0.0]); Tue, 27 Jul 2021 13:42:52 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.103.1 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2021 17:42:53 -0000 This improves the output of info threads when debugging multiple inferiors (e.g. after a fork with detach_on_fork disabled). --- gdb/obsd-nat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/obsd-nat.c b/gdb/obsd-nat.c index 0edaa66cf1b..be3e5f95b16 100644 --- a/gdb/obsd-nat.c +++ b/gdb/obsd-nat.c @@ -37,7 +37,7 @@ std::string obsd_nat_target::pid_to_str (ptid_t ptid) { if (ptid.lwp () != 0) - return string_printf ("thread %ld", ptid.lwp ()); + return string_printf ("thread %ld of process %d", ptid.lwp (), ptid.pid ()); return normal_pid_to_str (ptid); } -- 2.31.1