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.
This commit is contained in:
nathanw 2005-08-16 22:07:12 +00:00
parent 35a754577f
commit 55bd561796
1 changed files with 7 additions and 4 deletions

View File

@ -262,11 +262,14 @@ static void
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;