Source-Changes-HG archive

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

[src/netbsd-3]: src/gnu/dist/gdb/gdb Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/b90987bdac9a
branches:  netbsd-3
changeset: 577335:b90987bdac9a
user:      tron <tron%NetBSD.org@localhost>
date:      Sat Oct 08 16:01:14 2005 +0000

description:
Pull up following revision(s) (requested by chs in ticket #874):
        gnu/dist/gdb/gdb/nbsd-thread.c: revision 1.16
nbsd_thread_resume(): make sure that we've been passed a thread ID in
ptid before invoking the suspend-all-but-this-thread logic. Otherwise,
when passed an LWP (as a result of 1.15 making LWPs the primary
identifier of live execution contexts), we try to suspend everything,
which goes poorly.

diffstat:

 gnu/dist/gdb/gdb/nbsd-thread.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (22 lines):

diff -r 5bcdc552d91b -r b90987bdac9a gnu/dist/gdb/gdb/nbsd-thread.c
--- a/gnu/dist/gdb/gdb/nbsd-thread.c    Sat Oct 08 12:26:01 2005 +0000
+++ b/gnu/dist/gdb/gdb/nbsd-thread.c    Sat Oct 08 16:01:14 2005 +0000
@@ -262,11 +262,14 @@
 nbsd_thread_resume (ptid_t ptid, int step, enum target_signal signo)
 {
 
-  /* If a particular ptid is specified, then gdb wants to resume or
+  /* If a particular thread is specified, then gdb wants to resume or
      step just that thread. If it isn't on a processor, then it needs
-     to be put on one, and nothing else can be on the runnable
-     list. */
-  if (GET_PID (ptid) != -1)
+     to be put on one, and nothing else can be on the runnable list.
+     XXX If GDB asks us to step a LWP rather than a thread, there
+     isn't anything we can do but pass it down to the ptrace call;
+     given the flexibility of the LWP-to-thread mapping, this might or
+     might not accomplish what the user wanted. */
+  if (GET_PID (ptid) != -1 && IS_THREAD (ptid))
     {
       int val;
 



Home | Main Index | Thread Index | Old Index