]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/debug.h
2 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
23 #ifndef _KERN_DEBUG_H_
24 #define _KERN_DEBUG_H_
26 #include <sys/cdefs.h>
30 extern unsigned int systemLogDiags
;
32 #ifdef MACH_KERNEL_PRIVATE
34 extern unsigned int halt_in_debugger
;
36 extern unsigned int switch_debugger
;
38 extern unsigned int current_debugger
;
40 #define KDP_CUR_DB 0x1
41 #define KDB_CUR_DB 0x2
43 extern unsigned int active_debugger
;
44 extern unsigned int debug_mode
;
45 extern unsigned int disableDebugOuput
;
47 extern unsigned int panicDebugging
;
48 extern unsigned int logPanicDataToScreen
;
50 extern int db_run_mode
;
52 /* modes the system may be running in */
58 #define STEP_CONTINUE 4
59 #define STEP_INVISIBLE 5
61 #define STEP_TRACE 7 /* Show all calls to functions and returns */
63 extern const char *panicstr
;
64 extern volatile unsigned int nestedpanic
;
66 extern char *debug_buf
;
67 extern char *debug_buf_ptr
;
68 extern unsigned int debug_buf_size
;
70 extern void debug_log_init(void);
71 extern void debug_putc(char);
73 extern void panic_init(void);
75 #endif /* MACH_KERNEL_PRIVATE */
84 #define DB_KDP_BP_DIS 0x80
85 #define DB_LOG_PI_SCRN 0x100
86 #define DB_KDP_GETC_ENA 0x200
88 #define DB_KERN_DUMP_ON_PANIC 0x400 /* Trigger core dump on panic*/
89 #define DB_KERN_DUMP_ON_NMI 0x800 /* Trigger core dump on NMI */
90 #define DB_DBG_POST_CORE 0x1000 /*Wait in debugger after NMI core */
91 #define DB_PANICLOG_DUMP 0x2000 /* Send paniclog on panic,not core*/
93 #endif /* KERNEL_PRIVATE */
97 extern void panic(const char *string
, ...);
101 #endif /* _KERN_DEBUG_H_ */