Author: dchagin
Date: Tue Dec  9 14:21:43 2014
New Revision: 275644
URL: https://svnweb.freebsd.org/changeset/base/275644

Log:
  Skip calling CPU_ISSET for NOCPU as a short period of time we can have
  td_oncpu is NOCPU for thread in TDS_RUNNING state.
  
  Differential Revision:        https://reviews.freebsd.org/D1283
  Reviewed by:  jhb
  MFC after:    1 Month

Modified:
  head/gnu/usr.bin/gdb/kgdb/kthr.c

Modified: head/gnu/usr.bin/gdb/kgdb/kthr.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/kthr.c    Tue Dec  9 11:52:36 2014        
(r275643)
+++ head/gnu/usr.bin/gdb/kgdb/kthr.c    Tue Dec  9 14:21:43 2014        
(r275644)
@@ -96,7 +96,7 @@ kgdb_thr_add_procs(uintptr_t paddr)
                        kt->kaddr = addr;
                        if (td.td_tid == dumptid)
                                kt->pcb = dumppcb;
-                       else if (td.td_state == TDS_RUNNING &&
+                       else if (td.td_oncpu != NOCPU &&
                            CPU_ISSET(td.td_oncpu, &stopped_cpus))
                                kt->pcb = kgdb_trgt_core_pcb(td.td_oncpu);
                        else
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to