]> git.saurik.com Git - apple/xnu.git/blob - osfmk/kern/debug.h
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / kern / debug.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25
26 #ifndef _KERN_DEBUG_H_
27 #define _KERN_DEBUG_H_
28
29 #include <sys/appleapiopts.h>
30
31 #ifdef __APPLE_API_PRIVATE
32
33 extern unsigned int systemLogDiags;
34
35 #ifdef MACH_KERNEL_PRIVATE
36
37 extern unsigned int halt_in_debugger;
38
39 extern unsigned int switch_debugger;
40
41 extern unsigned int current_debugger;
42 #define NO_CUR_DB 0x0
43 #define KDP_CUR_DB 0x1
44 #define KDB_CUR_DB 0x2
45
46 extern unsigned int active_debugger;
47 extern unsigned int debug_mode;
48 extern unsigned int disableDebugOuput;
49
50 extern unsigned int panicDebugging;
51 extern unsigned int logPanicDataToScreen;
52
53 extern int db_run_mode;
54
55 /* modes the system may be running in */
56
57 #define STEP_NONE 0
58 #define STEP_ONCE 1
59 #define STEP_RETURN 2
60 #define STEP_CALLT 3
61 #define STEP_CONTINUE 4
62 #define STEP_INVISIBLE 5
63 #define STEP_COUNT 6
64 #define STEP_TRACE 7 /* Show all calls to functions and returns */
65
66 extern char *panicstr;
67
68 extern unsigned int nestedpanic;
69
70 extern char *debug_buf;
71 extern char *debug_buf_ptr;
72 extern unsigned int debug_buf_size;
73
74 extern void debug_log_init(void);
75 extern void debug_putc(char);
76
77 #endif /* MACH_KERNEL_PRIVATE */
78
79 #define DB_HALT 0x1
80 #define DB_PRT 0x2
81 #define DB_NMI 0x4
82 #define DB_KPRT 0x8
83 #define DB_KDB 0x10
84 #define DB_SLOG 0x20
85 #define DB_ARP 0x40
86 #define DB_KDP_BP_DIS 0x80
87 #define DB_LOG_PI_SCRN 0x100
88
89 #endif /* __APPLE_API_PRIVATE */
90
91 #endif /* _KERN_DEBUG_H_ */