xnu-792.tar.gz
[apple/xnu.git] / osfmk / ddb / db_trap.c
index 128e966161075c9633e3248d72daff45852a9110..59a007cdfdd3b3cf006cd8ff2413df8eb99e1d3d 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -79,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,
@@ -97,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);
 
@@ -135,7 +128,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();