[PATCH] Don't switch to the event thread early in non-stop mode.

Pedro Alves palves@redhat.com
Wed Jun 13 08:52:00 GMT 2012


On 06/13/2012 02:06 AM, Yao Qi wrote:

> On 06/13/2012 02:44 AM, Pedro Alves wrote:
>>      case TARGET_WAITKIND_SPURIOUS:
>>        if (debug_infrun)
>>          fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SPURIOUS\n");
>> +      if (!ptid_equal (ecs->ptid, inferior_ptid)
>> +	  && !ptid_equal (ecs->ptid, minus_one_ptid))
>> +	context_switch (ecs->ptid);
> 
> Is there any reason to check minus_one_ptid?


Yes, linux-thread-db.c returns TARGET_WAITKIND_SPURIOUS with minus_one_ptid.
Originated here:

 http://sourceware.org/ml/gdb-patches/2004-06/msg00073.html

-- 
Pedro Alves



More information about the Gdb-patches mailing list