Subject: ddb_trap_hook
To: None <port-xen@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: port-xen
Date: 11/23/2005 02:43:25
--NextPart-20051123023742-2963500
Content-Type: Text/Plain; charset=us-ascii
i'll remove ddb_trap_hook unless anyone objects.
YAMAMOTO Takashi
--NextPart-20051123023742-2963500
Content-Type: Text/Plain; charset=us-ascii
Content-Disposition: attachment; filename="a.diff"
Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/xen/i386/machdep.c,v
retrieving revision 1.19
diff -u -p -r1.19 machdep.c
--- machdep.c 7 Nov 2005 11:42:34 -0000 1.19
+++ machdep.c 22 Nov 2005 17:37:58 -0000
@@ -2058,9 +2058,6 @@ init386(paddr_t first_avail)
#if !defined(XEN)
cpu_init_idt();
#else
-#ifdef DDB
- db_trap_callback = ddb_trap_hook;
-#endif
XENPRINTF(("HYPERVISOR_set_trap_table %p\n", xen_idt));
if (HYPERVISOR_set_trap_table(xen_idt))
panic("HYPERVISOR_set_trap_table %p failed\n", xen_idt);
@@ -2531,41 +2528,3 @@ cpu_maxproc(void)
return (MAXGDTSIZ - NGDT);
#endif
}
-
-#if defined(DDB) || defined(KGDB)
-
-/*
- * Callback to output a backtrace when entering ddb.
- */
-void
-ddb_trap_hook(int where)
-{
- static int once = 0;
- db_addr_t db_dot;
-
- if (once != 0 || where != 1)
- return;
- once = 1;
-
- if (curlwp != NULL) {
- db_printf("Stopped");
- if (curproc == NULL)
- db_printf("; curlwp = %p,"
- " curproc is NULL at\t", curlwp);
- else
- db_printf(" in pid %d.%d (%s) at\t",
- curproc->p_pid, curlwp->l_lid,
- curproc->p_comm);
- } else
- db_printf("Stopped at\t");
- db_dot = PC_REGS(DDB_REGS);
- db_print_loc_and_inst(db_dot);
-
- db_stack_trace_print((db_expr_t) db_dot, FALSE, 65535,
- "", db_printf);
-#ifdef DEBUG
- db_show_regs((db_expr_t) db_dot, FALSE, 65535, "");
-#endif
-}
-
-#endif /* DDB || KGDB */
--NextPart-20051123023742-2963500--