summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/gdb/kgdb
diff options
context:
space:
mode:
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