aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-07-06 18:10:27 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-07-06 18:10:27 +0000
commitf7d7cd0c769741e79430719053fe9044254901a7 (patch)
treef885cc802d2d0aaef9f01df02bf8784ced4c7e4b /sys
parent38537cb9d3b5ad50abcc44191e7664fb992a7c31 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/machdep.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index fa8cbea0c7e3..654e12b4551b 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -100,8 +100,9 @@ __FBSDID("$FreeBSD$");
#ifndef KDB
#error KDB must be enabled in order for DDB to work!
#endif
-#endif
#include <ddb/ddb.h>
+#include <ddb/db_sym.h>
+#endif
#include <net/netisr.h>
@@ -1083,6 +1084,30 @@ extern inthand_t
IDTVEC(xmm), IDTVEC(dblfault),
IDTVEC(fast_syscall), IDTVEC(fast_syscall32);
+#ifdef DDB
+/*
+ * Display the index and function name of any IDT entries that don't use
+ * the default 'rsvd' entry point.
+ */
+DB_SHOW_COMMAND(idt, db_show_idt)
+{
+ struct gate_descriptor *ip;
+ int idx;
+ uintptr_t func;
+
+ ip = idt;
+ for (idx = 0; idx < NIDT && !db_pager_quit; idx++) {
+ func = ((long)ip->gd_hioffset << 16 | ip->gd_looffset);
+ if (func != (uintptr_t)&IDTVEC(rsvd)) {
+ db_printf("%3d\t", idx);
+ db_printsym(func, DB_STGY_PROC);
+ db_printf("\n");
+ }
+ ip++;
+ }
+}
+#endif
+
void
sdtossd(sd, ssd)
struct user_segment_descriptor *sd;