diff options
Diffstat (limited to 'gnu/usr.bin/gdb/kgdb/kthr.c')
-rw-r--r-- | gnu/usr.bin/gdb/kgdb/kthr.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/kthr.c b/gnu/usr.bin/gdb/kgdb/kthr.c index b12d07c..713b93b 100644 --- a/gnu/usr.bin/gdb/kgdb/kthr.c +++ b/gnu/usr.bin/gdb/kgdb/kthr.c @@ -44,12 +44,10 @@ __FBSDID("$FreeBSD$"); #include <frame-unwind.h> #include "kgdb.h" -#include <machine/pcb.h> static CORE_ADDR dumppcb; static int dumptid; -static CORE_ADDR stoppcbs; static cpuset_t stopped_cpus; static struct kthr *first; @@ -98,10 +96,9 @@ 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 && stoppcbs != 0 && + else if (td.td_state == TDS_RUNNING && CPU_ISSET(td.td_oncpu, &stopped_cpus)) - kt->pcb = (uintptr_t)stoppcbs + - sizeof(struct pcb) * td.td_oncpu; + kt->pcb = kgdb_trgt_core_pcb(td.td_oncpu); else kt->pcb = (uintptr_t)td.td_pcb; kt->kstack = td.td_kstack; @@ -152,8 +149,6 @@ kgdb_thr_init(void) addr != 0) kvm_read(kvm, addr, &stopped_cpus, cpusetsize); - stoppcbs = kgdb_lookup("stoppcbs"); - kgdb_thr_add_procs(paddr); addr = kgdb_lookup("zombproc"); if (addr != 0) { |