Source-Changes-HG archive

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

[src/netbsd-6]: src/external/gpl3/gdb/dist/gdb Pull up following revision(s) ...



details:   https://anonhg.NetBSD.org/src/rev/6d5950405e92
branches:  netbsd-6
changeset: 775709:6d5950405e92
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Feb 18 18:24:00 2013 +0000

description:
Pull up following revision(s) (requested by martin in ticket #828):
        external/gpl3/gdb/dist/gdb/nbsd-thread.c: revision 1.17
When searching for an active thread (e.g. right after switching to threaded
mode), if no lwp is signaled, just stay with the current (inferior_ptid.lwp).
This fixes gdb -p to a threaded process with all threads active.
Previously we eroneously restored an lwp of 0 (returned as sentinel from
ptrace) to inferior_ptid.lwp, which then would not match any thread in
thread_list and caused assertion failures.

diffstat:

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

diffs (13 lines):

diff -r 58cb9c20a967 -r 6d5950405e92 external/gpl3/gdb/dist/gdb/nbsd-thread.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-thread.c  Mon Feb 18 18:13:39 2013 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-thread.c  Mon Feb 18 18:24:00 2013 +0000
@@ -282,6 +282,9 @@
       while ((val != -1) && (pl.pl_lwpid != 0) &&
             (pl.pl_event != PL_EVENT_SIGNAL))
        val = ptrace (PT_LWPINFO, GET_PID(inferior_ptid), (void *)&pl, sizeof(pl));
+      if (pl.pl_lwpid == 0)
+       /* found no "active" thread, stay with current */
+       pl.pl_lwpid = inferior_ptid.lwp;
     }
   else
     {



Home | Main Index | Thread Index | Old Index