Source-Changes-HG archive

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

[src/trunk]: src/gnu/dist/gdb/gdb nbsd_thread_resume(): make sure that we've ...



details:   https://anonhg.NetBSD.org/src/rev/685ef4bd6ea4
branches:  trunk
changeset: 583645:685ef4bd6ea4
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Tue Aug 16 22:07:12 2005 +0000

description:
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 efbdb725fc08 -r 685ef4bd6ea4 gnu/dist/gdb/gdb/nbsd-thread.c
--- a/gnu/dist/gdb/gdb/nbsd-thread.c    Tue Aug 16 19:41:01 2005 +0000
+++ b/gnu/dist/gdb/gdb/nbsd-thread.c    Tue Aug 16 22:07:12 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