--- src/gnu/usr.bin/gdb/kgdb/kthr.c 2006/03/07 15:48:11 1.1 +++ src/gnu/usr.bin/gdb/kgdb/kthr.c 2006/07/09 01:38:57 1.2 @@ -156,6 +156,15 @@ kgdb_thr_init(void) */ kt->pid = -2; kt->paddr = 0; + /* + * We are a kernel thread, so our td_pcb is + * not used anyways. An exception is the + * dumping thread. + * kt->pcb == NULL is a marker for + * "non-dumping kernel thread". + */ + if (kt->tid != dumptid) + kt->pcb = NULL; } first = kt; addr = (uintptr_t)TAILQ_NEXT(&td, td_allq);