Change kbdb's kthr::cpu field into an int, to avoid gcc warnings about
comparing it with NOCPU, which became -1 recently. While here, avoid using it for address calculations if it is negative. Reviewed by: jhb, adrian MFC after: 1 week
This commit is contained in:
parent
858b72dbb8
commit
7a3659bcac
@ -41,7 +41,7 @@ struct kthr {
|
||||
uintptr_t pcb;
|
||||
int tid;
|
||||
int pid;
|
||||
u_char cpu;
|
||||
int cpu;
|
||||
};
|
||||
|
||||
extern struct kthr *curkthr;
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user