]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
obsd-nat: Report both thread and PID in ::pid_to_str.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 29 Jul 2021 20:16:30 +0000 (13:16 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 29 Jul 2021 21:14:10 +0000 (14:14 -0700)
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

index 854fc9c1c9483ff85735597d28e8f13ba145b5cb..044da080c163c1ad289dfff09ead335fdd5fc2eb 100644 (file)
@@ -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);
 }