OLD | NEW |
1 /* Remote debugging interface to Xilinx MicroBlaze. | 1 /* Remote debugging interface to Xilinx MicroBlaze. |
2 | 2 |
3 Copyright 2009-2012 Free Software Foundation, Inc. | 3 Copyright 2009-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This file is part of GDB. | 5 This file is part of GDB. |
6 | 6 |
7 This program is free software; you can redistribute it and/or modify | 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 | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
11 | 11 |
12 This program is distributed in the hope that it will be useful, | 12 This program is distributed in the hope that it will be useful, |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 GNU General Public License for more details. | 15 GNU General Public License for more details. |
16 | 16 |
17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
19 | 19 |
20 #include "defs.h" | 20 #include "defs.h" |
21 #include "gdbcore.h" | 21 #include "gdbcore.h" |
22 #include "target.h" | 22 #include "target.h" |
23 #include "monitor.h" | 23 #include "monitor.h" |
24 #include "gdb_string.h" | 24 #include "gdb_string.h" |
25 #include "serial.h" | 25 #include "serial.h" |
26 #include "regcache.h" | 26 #include "regcache.h" |
27 | 27 |
| 28 void _initialize_picobug_rom (void); |
| 29 |
28 static char *picobug_inits[] = | 30 static char *picobug_inits[] = |
29 {"\r", NULL}; | 31 {"\r", NULL}; |
30 | 32 |
31 static struct target_ops picobug_ops; | 33 static struct target_ops picobug_ops; |
32 static struct monitor_ops picobug_cmds; | 34 static struct monitor_ops picobug_cmds; |
33 | 35 |
34 /* Picobug only supports a subset of registers from MCore. In reality, | 36 /* Picobug only supports a subset of registers from MCore. In reality, |
35 it doesn't support ss1, either. */ | 37 it doesn't support ss1, either. */ |
36 static char *picobug_regnames[] = { | 38 static char *picobug_regnames[] = { |
37 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", | 39 "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 picobug_cmds.prompt = "picobug> "; /* monitor command prompt */ | 169 picobug_cmds.prompt = "picobug> "; /* monitor command prompt */ |
168 picobug_cmds.line_term = "\n"; /* end-of-line terminator */ | 170 picobug_cmds.line_term = "\n"; /* end-of-line terminator */ |
169 picobug_cmds.target = &picobug_ops; /* target operations */ | 171 picobug_cmds.target = &picobug_ops; /* target operations */ |
170 picobug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ | 172 picobug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */ |
171 picobug_cmds.regnames = picobug_regnames; /* registers names */ | 173 picobug_cmds.regnames = picobug_regnames; /* registers names */ |
172 picobug_cmds.num_breakpoints = 20; /* number of breakpoints */ | 174 picobug_cmds.num_breakpoints = 20; /* number of breakpoints */ |
173 picobug_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ | 175 picobug_cmds.magic = MONITOR_OPS_MAGIC; /* magic */ |
174 } | 176 } |
175 | 177 |
176 void | 178 void |
177 _initialize_picobug_rom () | 179 _initialize_picobug_rom (void) |
178 { | 180 { |
179 int i; | 181 int i; |
180 | 182 |
181 /* Initialize m32r RevC monitor target. */ | 183 /* Initialize m32r RevC monitor target. */ |
182 init_picobug_cmds (); | 184 init_picobug_cmds (); |
183 init_monitor_ops (&picobug_ops); | 185 init_monitor_ops (&picobug_ops); |
184 picobug_ops.to_shortname = "picobug"; | 186 picobug_ops.to_shortname = "picobug"; |
185 picobug_ops.to_longname = "picobug monitor"; | 187 picobug_ops.to_longname = "picobug monitor"; |
186 picobug_ops.to_doc = "Debug via the picobug monitor.\n\ | 188 picobug_ops.to_doc = "Debug via the picobug monitor.\n\ |
187 Specify the serial device it is connected to (e.g. /dev/ttya)."; | 189 Specify the serial device it is connected to (e.g. /dev/ttya)."; |
188 picobug_ops.to_open = picobug_open; | 190 picobug_ops.to_open = picobug_open; |
189 | 191 |
190 add_target (&picobug_ops); | 192 add_target (&picobug_ops); |
191 } | 193 } |
OLD | NEW |