]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kern/debug.h
xnu-344.21.73.tar.gz
[apple/xnu.git] / osfmk / kern / debug.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
d7e50217 6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 7 *
d7e50217
A
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
1c79356b
A
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
d7e50217
A
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.
1c79356b
A
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
9bccf70c 25
1c79356b
A
26#ifndef _KERN_DEBUG_H_
27#define _KERN_DEBUG_H_
28
9bccf70c
A
29#include <sys/appleapiopts.h>
30
31#ifdef __APPLE_API_PRIVATE
1c79356b
A
32
33extern unsigned int systemLogDiags;
34
35#ifdef MACH_KERNEL_PRIVATE
36
37extern unsigned int halt_in_debugger;
38
39extern unsigned int switch_debugger;
40
41extern unsigned int current_debugger;
42#define NO_CUR_DB 0x0
43#define KDP_CUR_DB 0x1
44#define KDB_CUR_DB 0x2
45
46extern unsigned int active_debugger;
47extern unsigned int debug_mode;
9bccf70c
A
48extern unsigned int disableDebugOuput;
49
50extern unsigned int panicDebugging;
51extern unsigned int logPanicDataToScreen;
1c79356b
A
52
53extern 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
66extern char *panicstr;
67
68extern unsigned int nestedpanic;
69
9bccf70c
A
70extern char *debug_buf;
71extern char *debug_buf_ptr;
72extern unsigned int debug_buf_size;
73
74extern void debug_log_init(void);
75extern void debug_putc(char);
76
1c79356b
A
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
9bccf70c
A
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 */
1c79356b
A
90
91#endif /* _KERN_DEBUG_H_ */