summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/gdb/kgdb
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
committersjg <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
commitb137080f19736ee33fede2e88bb54438604cf86b (patch)
tree377ac0ac449528621eb192cd245adadb5fd53668 /gnu/usr.bin/gdb/kgdb
parentab21a29eb607d4dfe389b965fbdee27558e791aa (diff)
parent4a8d07956d121238d006d34ffe7d6269744e8b1a (diff)
downloadFreeBSD-src-b137080f19736ee33fede2e88bb54438604cf86b.zip
FreeBSD-src-b137080f19736ee33fede2e88bb54438604cf86b.tar.gz
Merge from head@274682
Diffstat (limited to 'gnu/usr.bin/gdb/kgdb')
-rw-r--r--gnu/usr.bin/gdb/kgdb/Makefile4
-rw-r--r--gnu/usr.bin/gdb/kgdb/kgdb.h2
-rw-r--r--gnu/usr.bin/gdb/kgdb/trgt_i386.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/Makefile b/gnu/usr.bin/gdb/kgdb/Makefile
index bbc886b..04c14b3 100644
--- a/gnu/usr.bin/gdb/kgdb/Makefile
+++ b/gnu/usr.bin/gdb/kgdb/Makefile
@@ -10,13 +10,11 @@ GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} ${LIBM} ${LIBREADLINE} ${LIBTERMCAPW} \
${LIBGNUREGEX}
-LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LIBREADLINE} -ltermcapw \
+LDADD= ${GDBLIBS} ${BULIBS} -lkvm${GDB_SUFFIX} -lm ${LDREADLINE} -ltermcapw \
-lgnuregex
.if defined(GDB_CROSS_DEBUGGER)
CFLAGS+= -Wl,-export-dynamic
.endif
-NO_PIE= yes
-
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/gdb/kgdb/kgdb.h b/gnu/usr.bin/gdb/kgdb/kgdb.h
index 1a32d8a..379861b 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 02c9918..6d206d5 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");
OpenPOWER on IntegriCloud