diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.h b/gnu/usr.bin/gdb/kgdb/kgdb.h
index 1a32d8a125ab..379861b0cadb 100644
--- a/gnu/usr.bin/gdb/kgdb/kgdb.h
+++ b/gnu/usr.bin/gdb/kgdb/kgdb.h
@@ -41,7 +41,7 @@ struct kthr {
 	uintptr_t	pcb;
 	int		tid;
 	int		pid;
-	u_char		cpu;
+	int		cpu;
 };
 
 extern struct kthr *curkthr;
diff --git a/gnu/usr.bin/gdb/kgdb/trgt_i386.c b/gnu/usr.bin/gdb/kgdb/trgt_i386.c
index 02c99182fcfc..6d206d5ab1a0 100644
--- a/gnu/usr.bin/gdb/kgdb/trgt_i386.c
+++ b/gnu/usr.bin/gdb/kgdb/trgt_i386.c
@@ -139,7 +139,7 @@ kgdb_trgt_fetch_tss(void)
 	uintptr_t addr, cpu0prvpage, tss;
 
 	kt = kgdb_thr_lookup_tid(ptid_get_pid(inferior_ptid));
-	if (kt == NULL || kt->cpu == NOCPU)
+	if (kt == NULL || kt->cpu == NOCPU || kt->cpu < 0)
 		return (0);
 
 	addr = kgdb_lookup("gdt");