summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1995-03-08 03:21:51 +0000
committerStu Grossman <grossman@cygnus>1995-03-08 03:21:51 +0000
commit32fa4b5936d76457c727fd788842d13af131e7c9 (patch)
tree6e6163a86d734e96ca1db812566b32c69fef18cc /gdb
parentf17aed8ba33ad1b7ae7b3ffd8a87f86f81cef494 (diff)
downloadbinutils-gdb-32fa4b5936d76457c727fd788842d13af131e7c9.tar.gz
* monitor.c array-rom.c monitor.h rom68k-rom.c: Move target_ops
into monitor.c. * monitor.c (monitor_create_inferior): Allow run command to start program.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/array-rom.c51
-rw-r--r--gdb/monitor.h18
-rw-r--r--gdb/rom68k-rom.c51
4 files changed, 25 insertions, 100 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d382ccfab0e..dc2bb8d3ec2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
Tue Mar 7 00:23:47 1995 Stu Grossman (grossman@cygnus.com)
+ * monitor.c array-rom.c monitor.h rom68k-rom.c: Move target_ops
+ into monitor.c.
+ * monitor.c (monitor_create_inferior): Allow run command to start
+ program.
+
* monitor.c (monitor_load): Set PC to start address when done
loading.
diff --git a/gdb/array-rom.c b/gdb/array-rom.c
index 02f3d2e1d96..23c20a8ad1f 100644
--- a/gdb/array-rom.c
+++ b/gdb/array-rom.c
@@ -44,48 +44,7 @@ extern int mips_set_processor_type();
* strings. We also need a CR or LF on the end.
*/
-static struct target_ops array_ops = {
- "array", /* to_shortname */
- "Debug using the standard GDB remote protocol for the Array Tech target.",
- "Debug using the standard GDB remote protocol for the Array Tech target.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
- array_open, /* to_open */
- monitor_close, /* to_close */
- NULL, /* to_attach */
- monitor_detach, /* to_detach */
- monitor_resume, /* to_resume */
- monitor_wait, /* to_wait */
- monitor_fetch_registers, /* to_fetch_registers */
- monitor_store_registers, /* to_store_registers */
- monitor_prepare_to_store, /* to_prepare_to_store */
- monitor_xfer_memory, /* to_xfer_memory */
- monitor_files_info, /* to_files_info */
- monitor_insert_breakpoint, /* to_insert_breakpoint */
- monitor_remove_breakpoint, /* to_remove_breakpoint */
- 0, /* to_terminal_init */
- 0, /* to_terminal_inferior */
- 0, /* to_terminal_ours_for_output */
- 0, /* to_terminal_ours */
- 0, /* to_terminal_info */
- monitor_kill, /* to_kill */
- monitor_load, /* to_load */
- 0, /* to_lookup_symbol */
- NULL, /* to_create_inferior */
- monitor_mourn_inferior, /* to_mourn_inferior */
- 0, /* to_can_run */
- 0, /* to_notice_signals */
- 0, /* to_stop */
- process_stratum, /* to_stratum */
- 0, /* to_next */
- 1, /* to_has_all_memory */
- 1, /* to_has_memory */
- 1, /* to_has_stack */
- 1, /* to_has_registers */
- 1, /* to_has_execution */
- 0, /* sections */
- 0, /* sections_end */
- OPS_MAGIC /* to_magic */
-};
+static struct target_ops array_ops;
static char *array_loadtypes[] = {"none", "srec", "default", NULL};
static char *array_loadprotos[] = {"none", NULL};
@@ -152,6 +111,14 @@ array_open(args, from_tty)
void
_initialize_array ()
{
+ init_monitor_ops (&array_ops);
+
+ array_ops.to_shortname = "array";
+ array_ops.to_longname = "Debug using the standard GDB remote protocol for the Array Tech target.";
+ array_ops.to_doc = "Debug using the standard GDB remote protocol for the Array Tech target.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+ array_ops.to_open = array_open;
+
add_target (&array_ops);
baud_rate = 4800; /* this is the only supported baud rate */
}
diff --git a/gdb/monitor.h b/gdb/monitor.h
index 30dc3a63ccf..ad21b024234 100644
--- a/gdb/monitor.h
+++ b/gdb/monitor.h
@@ -122,22 +122,6 @@ extern struct monitor_ops *current_monitor;
#define SREC_SIZE 160
#define GDBPROTO ((current_monitor->type) ? 0: 1)
-extern void monitor_open PARAMS ((char *args, struct monitor_ops *ops, int from_tty));
-extern void monitor_close PARAMS ((int quitting));
-extern void monitor_detach PARAMS ((char *args, int from_tty));
-extern void monitor_resume PARAMS ((int pid, int step, enum target_signal sig));
-extern int monitor_wait PARAMS ((int pid, struct target_waitstatus *status));
-extern void monitor_fetch_registers PARAMS ((int regno));
-extern void monitor_store_registers PARAMS ((int regno));
-extern void monitor_prepare_to_store();
-extern int monitor_xfer_memory PARAMS ((CORE_ADDR memaddr, char *myaddr, int len, int write, struct target_ops *target));
-extern void monitor_files_info();
-extern int monitor_insert_breakpoint();
-extern int monitor_remove_breakpoint();
-extern void monitor_kill();
-extern void monitor_load();
-extern void monitor_mourn_inferior PARAMS ((void));
-
/*
* FIXME: These are to temporarily maintain compatability with the
* old monitor structure till remote-mon.c is fixed to work
@@ -147,3 +131,5 @@ extern void monitor_mourn_inferior PARAMS ((void));
#define MEM_SET_CMD (current_monitor->setmem)
#define MEM_DIS_CMD (current_monitor->getmem)
#define REG_DELIM (current_monitor->regset.delim)
+
+extern void monitor_open PARAMS ((char *args, struct monitor_ops *ops, int from_tty));
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index 2170b14855b..5673d5091aa 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -44,48 +44,7 @@ static char *rom68k_regnames[NUM_REGS] = {
* strings. We also need a CR or LF on the end.
*/
-static struct target_ops rom68k_ops = {
- "rom68k", /* to_shortname */
- "Rom68k debug monitor for the IDP Eval board", /* to_longname */
- "Debug on a Motorola IDP eval board running the ROM68K monitor.\n\
-Specify the serial device it is connected to (e.g. /dev/ttya).",
- rom68k_open, /* to_open */
- monitor_close, /* to_close */
- NULL, /* to_attach */
- monitor_detach, /* to_detach */
- monitor_resume, /* to_resume */
- monitor_wait, /* to_wait */
- monitor_fetch_registers, /* to_fetch_registers */
- monitor_store_registers, /* to_store_registers */
- monitor_prepare_to_store, /* to_prepare_to_store */
- monitor_xfer_memory, /* to_xfer_memory */
- monitor_files_info, /* to_files_info */
- monitor_insert_breakpoint, /* to_insert_breakpoint */
- monitor_remove_breakpoint, /* to_remove_breakpoint */
- 0, /* to_terminal_init */
- 0, /* to_terminal_inferior */
- 0, /* to_terminal_ours_for_output */
- 0, /* to_terminal_ours */
- 0, /* to_terminal_info */
- monitor_kill, /* to_kill */
- monitor_load, /* to_load */
- 0, /* to_lookup_symbol */
- NULL, /* to_create_inferior */
- monitor_mourn_inferior, /* to_mourn_inferior */
- 0, /* to_can_run */
- 0, /* to_notice_signals */
- 0, /* to_stop */
- process_stratum, /* to_stratum */
- 0, /* to_next */
- 1, /* to_has_all_memory */
- 1, /* to_has_memory */
- 1, /* to_has_stack */
- 1, /* to_has_registers */
- 1, /* to_has_execution */
- 0, /* sections */
- 0, /* sections_end */
- OPS_MAGIC /* to_magic */
-};
+static struct target_ops rom68k_ops;
static char *rom68k_loadtypes[] = {"none", "srec", "default", NULL};
static char *rom68k_loadprotos[] = {"none", NULL};
@@ -147,6 +106,14 @@ rom68k_open(args, from_tty)
void
_initialize_rom68k ()
{
+ init_monitor_ops (&rom68k_ops);
+
+ rom68k_ops.to_shortname = "rom68k";
+ rom68k_ops.to_longname = "Rom68k debug monitor for the IDP Eval board";
+ rom68k_ops.to_doc = "Debug on a Motorola IDP eval board running the ROM68K monitor.\n\
+Specify the serial device it is connected to (e.g. /dev/ttya).";
+ rom68k_ops.to_open = rom68k_open;
+
add_target (&rom68k_ops);
/* this is the default, since it's the only baud rate supported by the hardware */