Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ddb_trap_hook



i'll remove ddb_trap_hook unless anyone objects.

YAMAMOTO Takashi
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 */


Home | Main Index | Thread Index | Old Index