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
;
39 extern char *tmp_mips_processor_type
;
40 extern int mips_set_processor_type();
43 * Define the monitor command strings. Since these are passed directly
44 * through to a printf style function, we need can include formatting
45 * strings. We also need a CR or LF on the end.
48 struct target_ops array_ops
= {
50 "Debug using the standard GDB remote protocol for the Array Tech target.",
51 "Debug using the standard GDB remote protocol for the Array Tech target.\n\
52 Specify the serial device it is connected to (e.g. /dev/ttya).",
59 monitor_fetch_registers
,
60 monitor_store_registers
,
61 monitor_prepare_to_store
,
62 monitor_xfer_inferior_memory
,
64 monitor_insert_breakpoint
,
65 monitor_remove_breakpoint
, /* Breakpoints */
70 0, /* Terminal handling */
72 monitor_load
, /* load */
73 0, /* lookup_symbol */
74 monitor_create_inferior
,
75 monitor_mourn_inferior
,
78 0, /* notice_signals */
86 1, /* all mem, mem, stack, regs, exec */
88 0, /* Section pointers */
89 OPS_MAGIC
, /* Always the last thing */
92 struct monitor_ops array_cmds
= {
93 0, /* 1 for ASCII, 0 for binary */
94 "$?#b8+\n", /* monitor init string */
95 "go %x\n", /* execute or usually GO command */
96 "c\n", /* continue command */
97 "s\n", /* single step */
98 "brk 0x%x\n", /* set a breakpoint */
99 "unbrk %x\n", /* clear a breakpoint */
100 0, /* 0 for number, 1 for address */
102 "M%8x,%4x:%8x", /* set memory */
107 "m%8x,%4x", /* get memory */
112 "G%8x", /* set registers */
113 "", /* delimiter between registers */
117 "g", /* get registers */
118 "", /* delimiter between registers */
121 "sload -a tty(0)\r\n", /* download command */
122 ">> ", /* monitor command prompt */
123 "", /* end-of-command delimitor */
124 "", /* optional command terminator */
125 &array_ops
, /* target operations */
126 "none,srec,default", /* load types */
127 "none", /* load protocols */
128 "4800", /* supported baud rates */
129 2, /* number of stop bits */
130 array_regnames
/* registers names */
134 * array_open -- open the Array Tech LSI33k based RAID disk controller.
137 array_open(args
, from_tty
)
141 tmp_mips_processor_type
= "lsi33k"; /* change the default from r3051 */
142 mips_set_processor_type_command ("lsi33k", 0);
144 baud_rate
= 4800; /* this is the only supported baud rate */
146 target_preopen(from_tty
);
147 push_target (&array_ops
);
148 push_monitor (&array_cmds
);
149 monitor_open (args
, "array", from_tty
);
153 * _initialize_array -- do any special init stuff for the target.
158 add_target (&array_ops
);