]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ddb/db_trap.c
xnu-792.10.96.tar.gz
[apple/xnu.git] / osfmk / ddb / db_trap.c
index 2fcca75ba689a15661f9d687344d174b5d056329..d95ff45360475bdc12f21ae61b1d70b9ba6309e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -64,7 +64,7 @@
 #include <ddb/db_break.h>
 #include <ddb/db_command.h>
 #include <ddb/db_examine.h>
-#include <ddb/db_output.h>             /* For db_printf() */
+#include <ddb/db_output.h>             /* For db_printf() */
 #include <ddb/db_run.h>
 #include <ddb/db_task_thread.h>
 #include <ddb/db_trap.h>
@@ -76,10 +76,6 @@ extern int           db_inst_count;
 extern int             db_load_count;
 extern int             db_store_count;
 
-#if    PARAGON860 && NCPUS > 1
-extern int     db_first_cpu;
-#endif
-
 void
 db_task_trap(
        int             type,
@@ -94,7 +90,7 @@ db_task_trap(
        task_t          task_space;
 
        task = db_current_task();
-       task_space = db_target_space(current_act(), user_space);
+       task_space = db_target_space(current_thread(), user_space);
        bkpt = IS_BREAKPOINT_TRAP(type, code);
        watchpt = IS_WATCHPOINT_TRAP(type, code);
 
@@ -103,8 +99,16 @@ db_task_trap(
         * but print symbols using a (task-specific) symbol table, found
         * using task.
         */
+
+       /* Elided since walking the thread/task lists before setting up
+        * safe recovery points is incorrect, and could
+        * potentially cause us to loop and fault indefinitely.
+        */
+#if 0  
        db_init_default_act();
+#endif       
        db_check_breakpoint_valid();
+
        if (db_stop_at_pc(&bkpt, task, task_space)) {
            if (db_inst_count) {
                db_printf("After %d instructions (%d loads, %d stores),\n",
@@ -132,7 +136,7 @@ db_task_trap(
 #endif /* __ppc__ */
 #endif /* defined(__alpha) */
            } else
-               db_printf("Trouble printing location %#X.\n", db_dot);
+               db_printf("Trouble printing location %#llX.\n", (unsigned long long)db_dot);
            db_recover = prev;
 
            db_command_loop();