1 /* Remote target code for the Array Tech LSI33k based RAID disk controller board.
3 Copyright 1988, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
33 * this array of registers need to match the indexes used by GDB. The
34 * whole reason this exists is cause the various ROM monitors use
35 * different strings than GDB does, and doesn't support all the
36 * registers either. So, typing "info reg sp" becomes a "r30".
38 static char *array_regnames
[] = REGISTER_NAMES
;
41 static char *array_regnames
[] = {
42 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
43 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
44 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
45 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
46 "sr", "lo", "hi", "bad", "cause","pc",
47 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
48 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
49 "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
50 "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
52 "", "", "", "", "", "", "",
53 "", "", "", "", "", "", "", "",
54 "", "", "", "", "", "", "", "",
55 "", "", "", "", "", "", "", "",
56 "", "", "", "", "", "", "", "",
57 "", "", "", "", "", "", "", "",
58 "", "", "", "", "", "", "", ""
63 * Define the monitor command strings. Since these are passed directly
64 * through to a printf style function, we need can include formatting
65 * strings. We also need a CR or LF on the end.
68 struct target_ops array_ops
= {
70 "Debug using the standard GDB remote protocol for the Array Tech target.",
71 "Debug using the standard GDB remote protocol for the Array Tech target.\n\
72 Specify the serial device it is connected to (e.g. /dev/ttya).",
79 monitor_fetch_registers
,
80 monitor_store_registers
,
81 monitor_prepare_to_store
,
82 monitor_xfer_inferior_memory
,
84 monitor_insert_breakpoint
,
85 monitor_remove_breakpoint
, /* Breakpoints */
90 0, /* Terminal handling */
92 monitor_load
, /* load */
93 0, /* lookup_symbol */
94 monitor_create_inferior
,
95 monitor_mourn_inferior
,
98 0, /* notice_signals */
106 1, /* all mem, mem, stack, regs, exec */
108 0, /* Section pointers */
109 OPS_MAGIC
, /* Always the last thing */
112 struct monitor_ops array_cmds
= {
113 0, /* 1 for ASCII, 0 for binary */
114 "$?#b8+\n", /* monitor init string */
115 "go %x", /* execute or usually GO command */
116 "c", /* continue command */
117 "s", /* single step */
118 "brk %x", /* set a breakpoint */
119 "unbrk %x", /* clear a breakpoint */
120 0, /* 0 for number, 1 for address */
122 "M%8x,%4x:%8x", /* set memory */
127 "m%8x,%4x", /* get memory */
132 "G%8x", /* set registers */
133 "", /* delimiter between registers */
137 "g", /* get registers */
138 "", /* delimiter between registers */
141 "sload -a tty(0)\r\n", /* download command */
142 ">> ", /* monitor command prompt */
143 "", /* end-of-command delimitor */
144 "", /* optional command terminator */
145 &array_ops
, /* target operations */
146 "none,srec,default", /* load types */
147 "none", /* load protocols */
148 "4800", /* supported baud rates */
149 2, /* number of stop bits */
150 array_regnames
/* registers names */
154 gdb_open(args
, from_tty
)
158 target_preopen(from_tty
);
159 push_target (&array_ops
);
160 push_monitor (&array_cmds
);
161 monitor_open (args
, "array", from_tty
);
167 add_target (&array_ops
);