FreeBSD/Linux Kernel Cross Reference
sys/ttd/ttd_types.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1993,1992 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * Types for Mach TTD.
28 *
29 * HISTORY:
30 * $Log: ttd_types.h,v $
31 * Revision 2.2 93/05/10 23:25:11 rvb
32 * Checkin for MK80 branch.
33 * [93/05/10 15:10:37 grm]
34 *
35 * Revision 2.1.2.2 93/04/20 10:55:00 grm
36 * Changed the types so that they are useable by a more universal
37 * set of machines. Added some helpful comments.
38 * [93/04/20 grm]
39 *
40 * Revision 2.1.2.1 93/03/03 14:43:43 grm
41 * Changed types and removed obsolete definitions. Version that works.
42 * [93/03/03 grm]
43 *
44 * Revision 2.1.1.3 93/01/28 15:20:15 grm
45 * Added ttd_loop_status.
46 *
47 * Revision 2.1.1.2 92/10/08 14:33:09 grm
48 * Small changes.
49 * [92/10/08 grm]
50 *
51 * Revision 2.1.1.1 92/09/25 15:13:58 grm
52 * Initial checkin.
53 * [92/09/25 grm]
54 *
55 */
56 /***********************************************************
57 Copyright 1992 by Digital Equipment Corporation, Maynard, Massachusetts,
58
59 All Rights Reserved
60
61 Permission to use, copy, modify, and distribute this software and its
62 documentation for any purpose and without fee is hereby granted, provided
63 that the above copyright notice appear in all copies and that both that
64 copyright notice and this permission notice appear in supporting
65 documentation, and that the name of Digital not be used in advertising
66 or publicity pertaining to distribution of the software without specific,
67 written prior permission. Digital makes no representations about the
68 suitability of this software for any purpose. It is provided "as is"
69 without express or implied warranty.
70
71 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
72 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
73 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
74 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
75 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
76 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
77 SOFTWARE.
78
79 ******************************************************************/
80
81 #ifndef _TTD_TYPES_H_
82 #define _TTD_TYPES_H_
83
84 /****************************************/
85 /* Mach TTD Protocol Type Definitions */
86 /****************************************/
87
88 #include <mach/mach_types.h>
89 #include <machine/kttd_machdep.h>
90
91 /*
92 * Someday there will be a better way to define this? 16bit chars?
93 */
94 typedef unsigned char ttd_byte;
95
96 /*
97 * These three types must be specified as integers since
98 * they are part of the machine independent protocol.
99 */
100 enum { KERNEL_TTD = 1, USER_TTD = 2 };
101 typedef uint32 ttd_server;
102
103 /*
104 * Machines on which the teledebug protocol is available.
105 * (Or will be in the future :-))
106 */
107 enum { TTD_AT386 = 1, TTD_MIPS, TTD_ALPHA, TTD_LUNA88K };
108 typedef uint32 ttd_machine_type;
109
110 /*
111 * In the current implementation, the key protection is
112 * not used. A master key (non zero key) is used to override any
113 * previous teledebug sessions.
114 */
115 enum { NULL_KEY, MASTER_KEY };
116 typedef uint32 ttd_key;
117
118 /*
119 * This boolean MUST be machine indep.
120 */
121 typedef uint32 ttd_boolean;
122
123 /*
124 * This type defines the status of the kernel teledebugger.
125 *
126 * RUNNING: The kernel is running, and is not being debugged.
127 *
128 * STEPPING: The kernel is in the middle of executing a single step.
129 *
130 * ONE_STOP: kttd was entered via a network interrupt and
131 * can only service this single packet.
132 *
133 * FULL_STOP: the kernel has been halted and is in a state
134 * that debugging can occur. Either an sync stop_target
135 * or breakpoint/single step occurred.
136 *
137 */
138 typedef enum { RUNNING, STEPPING, ONE_STOP, FULL_STOP } ttd_status_t;
139
140 /*
141 * This type specifies whether or not the current teledebug
142 * operation should send a reply.
143 */
144 typedef enum { NO_REPLY, SEND_REPLY } ttd_response_t;
145
146 /*
147 * This will have to change. 64bits?! XXX
148 */
149 typedef vm_offset_t ttd_address;
150
151 #define TTD_KERNEL_MID 1
152
153 typedef uint32 ttd_id;
154 typedef ttd_id ttd_target;
155
156
157 typedef uint32 ttd_seq;
158 typedef uint32 ttd_count;
159
160 /*
161 * The Maximum size of a teledebug data block:
162 */
163 #define TTD_MAX_BLOCK_SIZE 1024
164
165 typedef unsigned char ttd_data_block[TTD_MAX_BLOCK_SIZE];
166
167 /*
168 * Flavor of breakpoint.
169 */
170 typedef uint32 ttd_flavor;
171
172 /*
173 * This may need to change in the future. 64 bits? XXX
174 */
175 typedef uint32 ttd_thread;
176
177 typedef struct {
178 /* XXX fill in later */
179 } ttd_thread_info;
180
181 typedef struct {
182 ttd_count length;
183 char chars[100];
184 } ttd_string;
185
186 typedef struct {
187 int32 trapno;
188 } ttd_trap_info;
189
190 typedef struct {
191 ttd_boolean is_stopped;
192 ttd_boolean is_targeted;
193 ttd_thread trapped_thread;
194 ttd_string debug_reason;
195 } ttd_task_info;
196
197 typedef ttd_task_info ttd_target_info;
198
199 #endif /* _TTD_TYPES_H_ */
Cache object: c8bae6f8382fb6093db261ee30821c5a
|