Author: jhb Date: Mon Jul 6 18:10:27 2009 New Revision: 195410 URL: http://svn.freebsd.org/changeset/base/195410
Log: MFi386: Add a 'show idt' command to DDB to display the non-default function pointers in the interrupt descriptor table. Approved by: re (kensmith) Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Jul 6 17:23:48 2009 (r195409) +++ head/sys/amd64/amd64/machdep.c Mon Jul 6 18:10:27 2009 (r195410) @@ -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; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"