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