note doc changes
[deliverable/binutils-gdb.git] / gdb / array-rom.c
1 /* Remote target code for the Array Tech LSI33k based RAID disk controller board.
2
3 Copyright 1988, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
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.
11
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.
16
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. */
20
21 #include "defs.h"
22 #include "gdbcore.h"
23 #include "target.h"
24 #include "monitor.h"
25 #include "serial.h"
26
27 extern int baud_rate;
28
29 void array_open();
30
31 /*
32 * this array of registers need to match the indexes used by GDB. The
33 * whole reason this exists is cause the various ROM monitors use
34 * different strings than GDB does, and doesn't support all the
35 * registers either. So, typing "info reg sp" becomes a "r30".
36 */
37 static char *array_regnames[] = REGISTER_NAMES;
38 extern char *tmp_mips_processor_type;
39 extern int mips_set_processor_type();
40
41 /*
42 * Define the monitor command strings. Since these are passed directly
43 * through to a printf style function, we need can include formatting
44 * strings. We also need a CR or LF on the end.
45 */
46
47 static struct target_ops array_ops;
48
49 static char *array_loadtypes[] = {"none", "srec", "default", NULL};
50 static char *array_loadprotos[] = {"none", NULL};
51
52 static struct monitor_ops array_cmds =
53 {
54 0, /* 1 for ASCII, 0 for binary */
55 "$?#b8+\n", /* monitor init string */
56 "go %x\n", /* execute or usually GO command */
57 "c\n", /* continue command */
58 "s\n", /* single step */
59 "brk 0x%x\n", /* set a breakpoint */
60 "unbrk %x\n", /* clear a breakpoint */
61 0, /* 0 for number, 1 for address */
62 {
63 "M%8x,%4x:%8x", /* set memory */
64 "", /* delimiter */
65 "", /* the result */
66 },
67 {
68 "m%8x,%4x", /* get memory */
69 "", /* delimiter */
70 "", /* the result */
71 },
72 {
73 "G%8x", /* set registers */
74 "", /* delimiter between registers */
75 "", /* the result */
76 },
77 {
78 "g", /* get registers */
79 "", /* delimiter between registers */
80 "", /* the result */
81 },
82 "sload -a tty(0)\r\n", /* download command */
83 ">> ", /* monitor command prompt */
84 "", /* end-of-command delimitor */
85 "", /* optional command terminator */
86 &array_ops, /* target operations */
87 array_loadtypes, /* loadtypes */
88 array_loadprotos, /* loadprotos */
89 "4800", /* supported baud rates */
90 SERIAL_2_STOPBITS, /* number of stop bits */
91 array_regnames /* registers names */
92 };
93
94 /*
95 * array_open -- open the Array Tech LSI33k based RAID disk controller.
96 */
97 void
98 array_open(args, from_tty)
99 char *args;
100 int from_tty;
101 {
102 tmp_mips_processor_type = "lsi33k"; /* change the default from r3051 */
103 mips_set_processor_type_command ("lsi33k", 0);
104
105 monitor_open (args, &array_cmds, from_tty);
106 }
107
108 /*
109 * _initialize_array -- do any special init stuff for the target.
110 */
111 void
112 _initialize_array ()
113 {
114 init_monitor_ops (&array_ops);
115
116 array_ops.to_shortname = "array";
117 array_ops.to_longname = "Debug using the standard GDB remote protocol for the Array Tech target.";
118 array_ops.to_doc = "Debug using the standard GDB remote protocol for the Array Tech target.\n\
119 Specify the serial device it is connected to (e.g. /dev/ttya).";
120 array_ops.to_open = array_open;
121
122 add_target (&array_ops);
123 baud_rate = 4800; /* this is the only supported baud rate */
124 }
125
126
127
128
This page took 0.030873 seconds and 4 git commands to generate.