* valprint.c (print_longest): Fix a syntax error in #ifdef
[deliverable/binutils-gdb.git] / gdb / array-rom.c
CommitLineData
b04a78d4 1/* Remote target code for the Array Tech LSI33k based RAID disk controller board.
2e1b3b03
RS
2
3 Copyright 1988, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
4
5This file is part of GDB.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, write to the Free Software
19Foundation, 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
27extern int baud_rate;
28
36439cd7 29void array_open();
2e1b3b03
RS
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 */
1b552670 37static char *array_regnames[] = REGISTER_NAMES;
36439cd7
RS
38extern char *tmp_mips_processor_type;
39extern int mips_set_processor_type();
2e1b3b03
RS
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
32fa4b59 47static struct target_ops array_ops;
b04a78d4 48
1265e2d8
SG
49static char *array_loadtypes[] = {"none", "srec", "default", NULL};
50static char *array_loadprotos[] = {"none", NULL};
51
52static struct monitor_ops array_cmds =
53{
b04a78d4
RS
54 0, /* 1 for ASCII, 0 for binary */
55 "$?#b8+\n", /* monitor init string */
36439cd7
RS
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 */
b04a78d4
RS
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 */
1b552670 86 &array_ops, /* target operations */
1265e2d8
SG
87 array_loadtypes, /* loadtypes */
88 array_loadprotos, /* loadprotos */
b04a78d4 89 "4800", /* supported baud rates */
1265e2d8 90 SERIAL_2_STOPBITS, /* number of stop bits */
b04a78d4
RS
91 array_regnames /* registers names */
92};
93
36439cd7
RS
94/*
95 * array_open -- open the Array Tech LSI33k based RAID disk controller.
96 */
b04a78d4 97void
36439cd7 98array_open(args, from_tty)
b04a78d4
RS
99 char *args;
100 int from_tty;
2e1b3b03 101{
36439cd7
RS
102 tmp_mips_processor_type = "lsi33k"; /* change the default from r3051 */
103 mips_set_processor_type_command ("lsi33k", 0);
104
1265e2d8 105 monitor_open (args, &array_cmds, from_tty);
2e1b3b03
RS
106}
107
36439cd7
RS
108/*
109 * _initialize_array -- do any special init stuff for the target.
110 */
2e1b3b03
RS
111void
112_initialize_array ()
113{
32fa4b59
SG
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\
119Specify the serial device it is connected to (e.g. /dev/ttya).";
120 array_ops.to_open = array_open;
121
2e1b3b03 122 add_target (&array_ops);
1265e2d8 123 baud_rate = 4800; /* this is the only supported baud rate */
2e1b3b03 124}
b04a78d4
RS
125
126
127
128
This page took 0.047062 seconds and 4 git commands to generate.