]> git.saurik.com Git - apple/security.git/blob - SecurityServer/MacYarrow/YarrowServer/kdebug_private.h
Security-28.tar.gz
[apple/security.git] / SecurityServer / MacYarrow / YarrowServer / kdebug_private.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /* Copyright (c) 1997 Apple Computer, Inc. All rights reserved.
20 *
21 * kdebugprivate.h - private kernel_debug definitions
22 *
23 */
24
25
26 /**********************************************************************/
27 #ifndef _BSD_KERN_KDEBUG_PRIVATE_H_
28 #define _BSD_KERN_KDEBUG_PRIVATE_H_
29
30 typedef struct {
31 mach_timespec_t timestamp;
32 unsigned int arg1;
33 unsigned int arg2;
34 unsigned int arg3;
35 unsigned int arg4;
36 unsigned int arg5; /* will hold current thread */
37 unsigned int debugid;
38 } kd_buf;
39
40 /* Debug Flags */
41 #define KDBG_INIT 0x1
42 #define KDBG_NOWRAP 0x2
43 #define KDBG_FREERUN 0x4
44 #define KDBG_WRAPPED 0x8
45 #define KDBG_USERFLAGS (KDBG_FREERUN|KDBG_NOWRAP|KDBG_INIT)
46 #define KDBG_PIDCHECK 0x10
47 #define KDBG_MAPINIT 0x20
48
49
50 typedef struct {
51 unsigned int type;
52 unsigned int value1;
53 unsigned int value2;
54 unsigned int value3;
55 unsigned int value4;
56
57 } kd_regtype;
58
59 typedef struct
60 {
61 int nkdbufs;
62 int nolog;
63 int flags;
64 int nkdthreads;
65 } kbufinfo_t;
66
67 typedef struct
68 {
69 unsigned int thread;
70 int valid;
71 char command[20];
72 } kd_threadmap;
73
74
75 #define KDBG_CLASSTYPE 0x10000
76 #define KDBG_SUBCLSTYPE 0x20000
77 #define KDBG_RANGETYPE 0x40000
78 #define KDBG_TYPENONE 0x80000
79 #define KDBG_CKTYPES 0xF0000
80
81 #define KDBG_RANGECHECK 0x100000
82 #define KDBG_VALCHECK 0x200000 /* Check up to 4 individual values
83 */
84
85 #define KDBG_BUFINIT 0x80000000
86 /* Maximum number of buffer entries is 64k */
87
88 #define KDBG_MAXBUFSIZE (64*1024)
89
90 /* Control operations */
91 #define KDBG_EFLAGS 1
92 #define KDBG_DFLAGS 2
93 #define KDBG_ENABLE 3
94 #define KDBG_SETNUMBUF 4
95 #define KDBG_GETNUMBUF 5
96 #define KDBG_SETUP 6
97 #define KDBG_REMOVE 7
98 #define KDBG_SETREGCODE 8
99 #define KDBG_GETREGCODE 9
100 #define KDBG_READTRACE 10
101
102 #define KDBGREGCALSS 1
103 #define KDBGREGSUBCALSS 2
104 #define KDBGREGRANGE 3
105 #define KDBGREGNONE 4
106 /**********************************************************************/
107
108 #endif /* _BSD_KERN_KDEBUG_PRIVATE_H_ */