svn commit: r274391 - head/gnu/usr.bin/gdb/kgdb
Dimitry Andric
dim at FreeBSD.org
Tue Nov 11 18:54:58 UTC 2014
Author: dim
Date: Tue Nov 11 18:54:57 2014
New Revision: 274391
URL: https://svnweb.freebsd.org/changeset/base/274391
Log:
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
Modified:
head/gnu/usr.bin/gdb/kgdb/kgdb.h
head/gnu/usr.bin/gdb/kgdb/trgt_i386.c
Modified: head/gnu/usr.bin/gdb/kgdb/kgdb.h
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/kgdb.h Tue Nov 11 18:15:05 2014 (r274390)
+++ head/gnu/usr.bin/gdb/kgdb/kgdb.h Tue Nov 11 18:54:57 2014 (r274391)
@@ -41,7 +41,7 @@ struct kthr {
uintptr_t pcb;
int tid;
int pid;
- u_char cpu;
+ int cpu;
};
extern struct kthr *curkthr;
Modified: head/gnu/usr.bin/gdb/kgdb/trgt_i386.c
==============================================================================
--- head/gnu/usr.bin/gdb/kgdb/trgt_i386.c Tue Nov 11 18:15:05 2014 (r274390)
+++ head/gnu/usr.bin/gdb/kgdb/trgt_i386.c Tue Nov 11 18:54:57 2014 (r274391)
@@ -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");
More information about the svn-src-head
mailing list