From 527b21eaec686de9b6dc9278a7b7cedb3bde30ad Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 29 Jul 2021 13:16:30 -0700 Subject: [PATCH] obsd-nat: Report both thread and PID in ::pid_to_str. 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 854fc9c1c94..044da080c16 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.30.2