Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb The lid of the main thread == pid...



details:   https://anonhg.NetBSD.org/src/rev/ec6b87836632
branches:  trunk
changeset: 938913:ec6b87836632
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Sep 19 21:45:45 2020 +0000

description:
The lid of the main thread == pid now. Should we fix the kernel to return
this? Now debugging live programs work.

diffstat:

 external/gpl3/gdb/dist/gdb/nbsd-nat.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 3efbfe145181 -r ec6b87836632 external/gpl3/gdb/dist/gdb/nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-nat.c     Sat Sep 19 18:19:09 2020 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-nat.c     Sat Sep 19 21:45:45 2020 +0000
@@ -587,6 +587,9 @@
   siginfo_t *si = &psi.psi_siginfo;
 
   int lwp = psi.psi_lwpid;
+  // XXX: should the kernel return this?
+  if (lwp == 0)
+    lwp = pid;
 
   int signo = si->si_signo;
   const int code = si->si_code;



Home | Main Index | Thread Index | Old Index