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/b13edf2ebc0a
branches:  trunk
changeset: 944123:b13edf2ebc0a
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 81a334111f31 -r b13edf2ebc0a 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