Merged head into linux tree
[gem5.git] / base / kgdb.h
1 /* $Id$ */
2 /*
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This software was developed by the Computer Systems Engineering group
7 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
8 * contributed to Berkeley.
9 *
10 * All advertising materials mentioning features or use of this software
11 * must display the following acknowledgement:
12 * This product includes software developed by the University of
13 * California, Lawrence Berkeley Laboratories.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 * 3. All advertising materials mentioning features or use of this software
24 * must display the following acknowledgement:
25 * This product includes software developed by the University of
26 * California, Berkeley and its contributors.
27 * 4. Neither the name of the University nor the names of its contributors
28 * may be used to endorse or promote products derived from this software
29 * without specific prior written permission.
30 *
31 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
32 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * SUCH DAMAGE.
42 *
43 * @(#)remote-sl.h 8.1 (Berkeley) 6/11/93
44 */
45
46 /* $NetBSD: kgdb.h,v 1.4 1998/08/13 02:10:59 eeh Exp $ */
47
48 #ifndef __KGDB_H__
49 #define __KGDB_H__
50
51 /*
52 * Message types.
53 */
54 #define KGDB_SIGNAL '?' // last sigal
55 #define KGDB_SET_BAUD 'b' // set baud (deprecated)
56 #define KGDB_SET_BREAK 'B' // set breakpoint (deprecated)
57 #define KGDB_CONT 'c' // resume
58 #define KGDB_ASYNC_CONT 'C' // continue with signal
59 #define KGDB_DEBUG 'd' // toggle debug flags (deprecated)
60 #define KGDB_DETACH 'D' // detach remote gdb
61 #define KGDB_REG_R 'g' // read general registers
62 #define KGDB_REG_W 'G' // write general registers
63 #define KGDB_SET_THREAD 'H' // set thread
64 #define KGDB_CYCLE_STEP 'i' // step a single cycle
65 #define KGDB_SIG_CYCLE_STEP 'I' // signal then single cycle step
66 #define KGDB_KILL 'k' // kill program
67 #define KGDB_MEM_R 'm' // read memory
68 #define KGDB_MEM_W 'M' // write memory
69 #define KGDB_READ_REG 'p' // read register
70 #define KGDB_SET_REG 'P' // write register
71 #define KGDB_QUERY_VAR 'q' // query variable
72 #define KGDB_SET_VAR 'Q' // set variable
73 #define KGDB_RESET 'r' // reset system. (Deprecated)
74 #define KGDB_STEP 's' // step
75 #define KGDB_ASYNC_STEP 'S' // signal and step
76 #define KGDB_THREAD_ALIVE 'T' // find out if the thread is alive.
77 #define KGDB_TARGET_EXIT 'W' // target exited
78 #define KGDB_BINARY_DLOAD 'X' // write memory
79 #define KGDB_CLR_HW_BKPT 'z' // remove breakpoint or watchpoint
80 #define KGDB_SET_HW_BKPT 'Z' // insert breakpoint or watchpoint
81
82 /*
83 * start of frame/end of frame
84 */
85 #define KGDB_START '$'
86 #define KGDB_END '#'
87 #define KGDB_GOODP '+'
88 #define KGDB_BADP '-'
89
90 /*
91 * Stuff for KGDB.
92 */
93 #define KGDB_NUMREGS 66 /* from tm-alpha.h, NUM_REGS */
94 #define KGDB_REG_V0 0
95 #define KGDB_REG_T0 1
96 #define KGDB_REG_T1 2
97 #define KGDB_REG_T2 3
98 #define KGDB_REG_T3 4
99 #define KGDB_REG_T4 5
100 #define KGDB_REG_T5 6
101 #define KGDB_REG_T6 7
102 #define KGDB_REG_T7 8
103 #define KGDB_REG_S0 9
104 #define KGDB_REG_S1 10
105 #define KGDB_REG_S2 11
106 #define KGDB_REG_S3 12
107 #define KGDB_REG_S4 13
108 #define KGDB_REG_S5 14
109 #define KGDB_REG_S6 15 /* FP */
110 #define KGDB_REG_A0 16
111 #define KGDB_REG_A1 17
112 #define KGDB_REG_A2 18
113 #define KGDB_REG_A3 19
114 #define KGDB_REG_A4 20
115 #define KGDB_REG_A5 21
116 #define KGDB_REG_T8 22
117 #define KGDB_REG_T9 23
118 #define KGDB_REG_T10 24
119 #define KGDB_REG_T11 25
120 #define KGDB_REG_RA 26
121 #define KGDB_REG_T12 27
122 #define KGDB_REG_AT 28
123 #define KGDB_REG_GP 29
124 #define KGDB_REG_SP 30
125 #define KGDB_REG_ZERO 31
126 #define KGDB_REG_F0 32
127 #define KGDB_REG_F1 33
128 #define KGDB_REG_F2 34
129 #define KGDB_REG_F3 35
130 #define KGDB_REG_F4 36
131 #define KGDB_REG_F5 37
132 #define KGDB_REG_F6 38
133 #define KGDB_REG_F7 39
134 #define KGDB_REG_F8 40
135 #define KGDB_REG_F9 41
136 #define KGDB_REG_F10 42
137 #define KGDB_REG_F11 43
138 #define KGDB_REG_F12 44
139 #define KGDB_REG_F13 45
140 #define KGDB_REG_F14 46
141 #define KGDB_REG_F15 47
142 #define KGDB_REG_F16 48
143 #define KGDB_REG_F17 49
144 #define KGDB_REG_F18 50
145 #define KGDB_REG_F19 51
146 #define KGDB_REG_F20 52
147 #define KGDB_REG_F21 53
148 #define KGDB_REG_F22 54
149 #define KGDB_REG_F23 55
150 #define KGDB_REG_F24 56
151 #define KGDB_REG_F25 57
152 #define KGDB_REG_F26 58
153 #define KGDB_REG_F27 59
154 #define KGDB_REG_F28 60
155 #define KGDB_REG_F29 61
156 #define KGDB_REG_F30 62
157 #define KGDB_REG_F31 63
158 #define KGDB_REG_PC 64
159 #define KGDB_REG_VFP 65
160
161 /* Too much? Must be large enough for register transfer. */
162 #define KGDB_BUFLEN 1024
163
164 /*
165 * Kernel Entry Vectors. [OSF/1 PALcode Specific]
166 */
167
168 #define ALPHA_KENTRY_INT 0
169 #define ALPHA_KENTRY_ARITH 1
170 #define ALPHA_KENTRY_MM 2
171 #define ALPHA_KENTRY_IF 3
172 #define ALPHA_KENTRY_UNA 4
173 #define ALPHA_KENTRY_SYS 5
174
175 #endif /* __KGDB_H__ */