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/8f9a22ed8799
branches:  trunk
changeset: 955111:8f9a22ed8799
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 cdb463c2d715 -r 8f9a22ed8799 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