1 /* Remote debugging interface for boot monitors, for GDB.
2 Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
3 Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
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. */
21 /* This file was derived from remote-eb.c, which did a similar job, but for
22 an AMD-29K running EBMON. That file was in turn derived from remote.c
23 as mentioned in the following comment (left in for comic relief):
25 "This is like remote.c but is for an esoteric situation--
26 having an a29k board in a PC hooked up to a unix machine with
27 a serial line, and running ctty com1 on the PC, through which
28 the unix machine can run ebmon. Not to mention that the PC
29 has PC/NFS, so it can access the same executables that gdb can,
30 over the net in real time."
32 In reality, this module talks to a debug monitor called 'MONITOR', which
33 We communicate with MONITOR via either a direct serial line, or a TCP
34 (or possibly TELNET) stream to a terminal multiplexor,
35 which in turn talks to the target board.
37 This is based on remote-st2000.c. I left in the above note here for histerical
48 #include <sys/types.h>
52 #include "remote-utils.h"
55 # define TERMINAL struct termios
57 # define TERMINAL struct sgttyb
60 struct monitor_ops
*current_monitor
;
61 extern struct target_ops rom68k_ops
; /* Forward declaration */
62 extern struct target_ops mon68_ops
; /* Forward declaration */
63 extern struct target_ops monitor_bug_ops
; /* Forward declaration */
64 extern struct monitor_ops rom68k_cmds
; /* Forward declaration */
65 extern struct monitor_ops mon68_cmds
; /* Forward declaration */
66 extern struct monitor_ops bug_cmds
; /* Forward declaration */
67 extern struct cmd_list_element
*setlist
;
68 extern struct cmd_list_element
*unsetlist
;
69 struct cmd_list_element
*showlist
;
71 static void monitor_close();
72 static void monitor_fetch_register();
73 static void monitor_store_register();
75 static int sr_get_debug(); /* flag set by "set remotedebug" */
77 static int hashmark
; /* flag set by "set hash" */
79 /* FIXME: Replace with sr_get_debug (). */
80 #define LOG_FILE "monitor.log"
81 #if defined (LOG_FILE)
85 static int timeout
= 24;
87 /* Descriptor for I/O to remote machine. Initialize it to NULL so that
88 monitor_open knows that we don't have a file open when the program starts.
90 static serial_t monitor_desc
= NULL
;
92 /* Send data to monitor. Works just like printf. */
95 printf_monitor(va_alist
)
105 pattern
= va_arg(args
, char *);
107 vsprintf(buf
, pattern
, args
);
109 if (SERIAL_WRITE(monitor_desc
, buf
, strlen(buf
)))
110 fprintf(stderr
, "SERIAL_WRITE failed: %s\n", safe_strerror(errno
));
113 /* Read a character from the remote system, doing all the fancy
121 c
= SERIAL_READCHAR(monitor_desc
, timeout
);
128 putc(c
& 0x7f, log_file
);
134 if (c
== SERIAL_TIMEOUT
)
137 return c
; /* Polls shouldn't generate timeout errors */
139 error("Timeout reading from remote system.");
142 perror_with_name("remote-monitor");
145 /* Scan input from the remote system, until STRING is found. If DISCARD is
146 non-zero, then discard non-matching input, else print it out.
147 Let the user break out immediately. */
149 expect(string
, discard
)
157 printf ("Expecting \"%s\"\n", string
);
162 c
= readchar(timeout
);
171 printf ("\nMatched\n");
179 fwrite(string
, 1, (p
- 1) - string
, stdout
);
188 /* Keep discarding input until we see the MONITOR prompt.
190 The convention for dealing with the prompt is that you
192 o *then* wait for the prompt.
194 Thus the last thing that a procedure does with the serial line
195 will be an expect_prompt(). Exception: monitor_resume does not
196 wait for the prompt, because the terminal is being handed over
197 to the inferior. However, the next thing which happens after that
198 is a monitor_wait which does wait for the prompt.
199 Note that this includes abnormal exit, e.g. error(). This is
200 necessary to prevent getting into states from which we can't
203 expect_prompt(discard
)
206 #if defined (LOG_FILE)
207 /* This is a convenient place to do this. The idea is to do it often
208 enough that we never lose much data if we terminate abnormally. */
211 expect (PROMPT
, discard
);
214 /* Get a hex digit from the remote system & return its value.
215 If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
217 get_hex_digit(ignore_space
)
223 ch
= readchar(timeout
);
224 if (ch
>= '0' && ch
<= '9')
226 else if (ch
>= 'A' && ch
<= 'F')
227 return ch
- 'A' + 10;
228 else if (ch
>= 'a' && ch
<= 'f')
229 return ch
- 'a' + 10;
230 else if (ch
== ' ' && ignore_space
)
235 error("Invalid hex digit from remote system.");
240 /* Get a byte from monitor and put it in *BYT. Accept any number
248 val
= get_hex_digit (1) << 4;
249 val
|= get_hex_digit (0);
253 /* Get N 32-bit words from remote, each preceded by a space,
254 and put them in registers starting at REGNO. */
256 get_hex_regs (n
, regno
)
263 for (i
= 0; i
< n
; i
++)
268 for (j
= 0; j
< 8; j
++)
269 val
= (val
<< 4) + get_hex_digit (j
== 0);
270 supply_register (regno
++, (char *) &val
);
274 /* This is called not only when we first attach, but also when the
275 user types "run" after having attached. */
277 monitor_create_inferior (execfile
, args
, env
)
285 error("Can't pass arguments to remote MONITOR process");
287 if (execfile
== 0 || exec_bfd
== 0)
288 error("No exec file specified");
290 entry_pt
= (int) bfd_get_start_address (exec_bfd
);
293 fputs ("\nIn Create_inferior()", log_file
);
296 /* The "process" (board) is already stopped awaiting our commands, and
297 the program is already downloaded. We just set its PC and go. */
299 clear_proceed_status ();
301 /* Tell wait_for_inferior that we've started a new process. */
302 init_wait_for_inferior ();
304 /* Set up the "saved terminal modes" of the inferior
305 based on what modes we are starting it with. */
306 target_terminal_init ();
308 /* Install inferior's terminal modes. */
309 target_terminal_inferior ();
311 /* insert_step_breakpoint (); FIXME, do we need this? */
312 proceed ((CORE_ADDR
)entry_pt
, -1, 0); /* Let 'er rip... */
315 /* Open a connection to a remote debugger.
316 NAME is the filename used for communication. */
318 static int baudrate
= 9600;
319 static char dev_name
[100];
322 general_open(args
, name
, from_tty
)
328 error ("Use `target %s DEVICE-NAME' to use a serial port, or \n\
329 `target %s HOST-NAME:PORT-NUMBER' to use a network connection.", name
, name
);
331 target_preopen(from_tty
);
336 strcpy(dev_name
, args
);
337 monitor_desc
= SERIAL_OPEN(dev_name
);
339 if (monitor_desc
== NULL
)
340 perror_with_name(dev_name
);
342 /* The baud rate was specified when GDB was started. */
343 if (SERIAL_SETBAUDRATE (monitor_desc
, sr_get_baud_rate()))
345 SERIAL_CLOSE (monitor_desc
);
346 perror_with_name (name
);
349 SERIAL_RAW(monitor_desc
);
351 #if defined (LOG_FILE)
352 log_file
= fopen (LOG_FILE
, "w");
353 if (log_file
== NULL
)
354 perror_with_name (LOG_FILE
);
357 /* Hello? Are you there? */
358 printf_monitor("\r"); /* CR wakes up monitor */
363 printf("Remote %s connected to %s\n", target_shortname
,
368 rom68k_open(args
, from_tty
)
372 push_target(&rom68k_ops
);
373 push_monitor (&rom68k_cmds
);
375 general_open (args
, "rom68k", from_tty
);
379 mon68_open(args
, from_tty
)
383 push_target(&mon68_ops
);
384 push_monitor (&mon68_cmds
);
386 general_open (args
, "mon68", from_tty
);
390 bug_open(args
, from_tty
)
394 push_target(&monitor_bug_ops
);
395 push_monitor (&bug_cmds
);
397 general_open (args
, "bug", from_tty
);
401 * _close -- Close out all files and local state before this target loses control.
405 monitor_close (quitting
)
408 SERIAL_CLOSE(monitor_desc
);
411 #if defined (LOG_FILE)
413 if (ferror(log_file
))
414 fprintf(stderr
, "Error writing log file.\n");
415 if (fclose(log_file
) != 0)
416 fprintf(stderr
, "Error closing log file.\n");
421 /* Terminate the open connection to the remote debugger.
422 Use this when you want to detach and do something else
425 monitor_detach (from_tty
)
428 pop_target(); /* calls monitor_close to do the real work */
430 printf ("Ending remote %s debugging\n", target_shortname
);
434 * _resume -- Tell the remote machine to resume.
437 monitor_resume (pid
, step
, sig
)
441 fprintf (log_file
, "\nIn Resume (step=%d, sig=%d)\n", step
, sig
);
446 printf_monitor (STEP_CMD
);
447 /* wait for the echo. */
448 expect (STEP_CMD
, 1);
452 printf_monitor (GO_CMD
);
453 /* swallow the echo. */
459 * _wait -- Wait until the remote machine stops, then return,
460 * storing status in status just as `wait' would.
464 monitor_wait (pid
, status
)
468 int old_timeout
= timeout
;
470 fputs ("\nIn wait ()", log_file
);
473 WSETEXIT ((*status
), 0);
475 timeout
= 0; /* Don't time out -- user program is running. */
477 expect_prompt(0); /* Wait for prompt, outputting extraneous text */
479 WSETSTOP ((*status
), SIGTRAP
);
481 timeout
= old_timeout
;
486 /* Return the name of register number regno in the form input and output by
487 monitor. Currently, register_names just happens to contain exactly what
488 monitor wants. Lets take advantage of that just as long as possible! */
502 for (p
= reg_names
[regno
]; *p
; p
++)
509 /* read the remote registers into the block regs. */
512 monitor_fetch_registers ()
516 /* yeah yeah, i know this is horribly inefficient. but it isn't done
517 very often... i'll clean it up later. */
519 for (regno
= 0; regno
<= PC_REGNUM
; regno
++)
520 monitor_fetch_register(regno
);
523 /* Fetch register REGNO, or all registers if REGNO is -1.
524 Returns errno value. */
526 monitor_fetch_register (regno
)
532 fprintf (log_file
, "\nIn Fetch Register (reg=%s)\n", get_reg_name (regno
));
538 monitor_fetch_registers ();
542 char *name
= get_reg_name (regno
);
543 printf_monitor (GET_REG
, name
);
545 expect (REG_DELIM
, 1);
546 if (strcasecmp (name
, "SR") == 0)
549 for (j
= 0; j
< 4; j
++)
550 val
= (val
<< 4) + get_hex_digit (j
== 0);
551 supply_register (regno
, (char *) &val
);
555 get_hex_regs (1, regno
);
560 printf_monitor (CMD_END
);
567 /* Store the remote registers from the contents of the block REGS. */
570 monitor_store_registers ()
574 for (regno
= 0; regno
<= PC_REGNUM
; regno
++)
575 monitor_store_register(regno
);
577 registers_changed ();
580 /* Store register REGNO, or all if REGNO == 0.
581 return errno value. */
583 monitor_store_register (regno
)
587 fprintf (log_file
, "\nIn Store_register (regno=%d)\n", regno
);
590 monitor_store_registers ();
594 printf ("Setting register %s to 0x%x\n", get_reg_name (regno
), read_register (regno
));
596 printf_monitor (SET_REG
, get_reg_name (regno
),
597 read_register (regno
));
603 /* Get ready to modify the registers array. On machines which store
604 individual registers, this doesn't need to do anything. On machines
605 which store all the registers in one fell swoop, this makes sure
606 that registers contains all the registers from the program being
610 monitor_prepare_to_store ()
612 /* Do nothing, since we can store individual regs */
616 monitor_files_info ()
618 printf ("\tAttached to %s at %d baud.\n",
622 /* Copy LEN bytes of data from debugger memory at MYADDR
623 to inferior's memory at MEMADDR. Returns length moved. */
625 monitor_write_inferior_memory (memaddr
, myaddr
, len
)
627 unsigned char *myaddr
;
634 fprintf (log_file
, "\nIn Write_inferior_memory (memaddr=%x, len=%d)\n", memaddr
, len
);
636 for (i
= 0; i
< len
; i
++)
638 printf_monitor (MEM_SET_CMD
, memaddr
+ i
);
639 expect (sprintf (buf
, MEM_PROMPT
, memaddr
+ i
), 1);
641 printf_monitor ("%x", myaddr
[i
]);
643 printf ("\nSet 0x%x to 0x%x\n", memaddr
+ i
, myaddr
[i
]);
646 /*** expect (sprintf (buf, MEM_PROMPT, memaddr + i +1), 1);
647 expect (CMD_DELIM); ***/
648 printf_monitor (CMD_END
);
655 /* Read LEN bytes from inferior memory at MEMADDR. Put the result
656 at debugger address MYADDR. Returns length moved. */
658 monitor_read_inferior_memory(memaddr
, myaddr
, len
)
666 /* Number of bytes read so far. */
669 /* Starting address of this pass. */
670 unsigned long startaddr
;
672 /* Number of bytes to read in this pass. */
676 fprintf (log_file
, "\nIn Read_inferior_memory (memaddr=%x, len=%d)\n", memaddr
, len
);
679 /* Note that this code works correctly if startaddr is just less
680 than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
681 thing). That is, something like
682 monitor_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
683 works--it never adds len To memaddr and gets 0. */
684 /* However, something like
685 monitor_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
686 doesn't need to work. Detect it and give up if there's an attempt
688 if (((memaddr
- 1) + len
) < memaddr
) {
698 if ((startaddr
% 16) != 0)
699 len_this_pass
-= startaddr
% 16;
700 if (len_this_pass
> (len
- count
))
701 len_this_pass
= (len
- count
);
703 printf ("\nDisplay %d bytes at %x\n", len_this_pass
, startaddr
);
705 for (i
= 0; i
< len_this_pass
; i
++)
707 printf_monitor (MEM_DIS_CMD
, startaddr
);
708 expect (sprintf(buf
, MEM_PROMPT
, startaddr
), 1);
709 get_hex_byte (&myaddr
[count
++]);
711 printf ("\nRead a 0x%x from 0x%x\n", myaddr
[count
-1], startaddr
);
715 printf_monitor (CMD_END
);
724 /* FIXME-someday! merge these two. */
726 monitor_xfer_inferior_memory (memaddr
, myaddr
, len
, write
, target
)
731 struct target_ops
*target
; /* ignored */
734 return monitor_write_inferior_memory (memaddr
, myaddr
, len
);
736 return monitor_read_inferior_memory (memaddr
, myaddr
, len
);
740 monitor_kill (args
, from_tty
)
744 return; /* ignore attempts to kill target system */
747 /* Clean up when a program exits.
748 The program actually lives on in the remote processor's RAM, and may be
749 run again without a download. Don't leave it full of breakpoint
753 monitor_mourn_inferior ()
755 remove_breakpoints ();
756 generic_mourn_inferior (); /* Do all the proper things now */
759 #define MAX_MONITOR_BREAKPOINTS 16
761 extern int memory_breakpoint_size
;
762 static CORE_ADDR breakaddr
[MAX_MONITOR_BREAKPOINTS
] = {0};
765 monitor_insert_breakpoint (addr
, shadow
)
772 fprintf (log_file
, "\nIn Insert_breakpoint (addr=%x)\n", addr
);
774 for (i
= 0; i
<= MAX_MONITOR_BREAKPOINTS
; i
++)
775 if (breakaddr
[i
] == 0)
779 printf ("Breakpoint at %x\n", addr
);
780 monitor_read_inferior_memory(addr
, shadow
, memory_breakpoint_size
);
781 printf_monitor(SET_BREAK_CMD
, addr
);
786 fprintf(stderr
, "Too many breakpoints (> 16) for monitor\n");
791 * _remove_breakpoint -- Tell the monitor to remove a breakpoint
794 monitor_remove_breakpoint (addr
, shadow
)
801 fprintf (log_file
, "\nIn Remove_breakpoint (addr=%x)\n", addr
);
803 for (i
= 0; i
< MAX_MONITOR_BREAKPOINTS
; i
++)
804 if (breakaddr
[i
] == addr
)
807 /* some monitors remove breakpoints based on the address */
808 if (strcasecmp (target_shortname
, "bug") == 0)
809 printf_monitor(CLR_BREAK_CMD
, addr
);
811 printf_monitor(CLR_BREAK_CMD
, i
);
816 fprintf(stderr
, "Can't find breakpoint associated with 0x%x\n", addr
);
820 /* Load a file. This is usually an srecord, which is ascii. No
821 protocol, just sent line by line. */
823 #define DOWNLOAD_LINE_SIZE 100
829 char buf
[DOWNLOAD_LINE_SIZE
];
833 printf ("Loading %s to monitor\n", arg
);
835 download
= fopen (arg
, "r");
836 if (download
== NULL
)
838 error (sprintf (buf
, "%s Does not exist", arg
));
842 printf_monitor (LOAD_CMD
);
843 /* expect ("Waiting for S-records from host... ", 1); */
845 while (!feof (download
))
847 bytes_read
= fread (buf
, sizeof (char), DOWNLOAD_LINE_SIZE
, download
);
854 if (SERIAL_WRITE(monitor_desc
, buf
, bytes_read
)) {
855 fprintf(stderr
, "SERIAL_WRITE failed: (while downloading) %s\n", safe_strerror(errno
));
859 while (i
++ <=200000) {} ; /* Ugly HACK, probably needs flow control */
860 if (bytes_read
< DOWNLOAD_LINE_SIZE
)
862 if (!feof (download
))
863 error ("Only read %d bytes\n", bytes_read
);
872 if (!feof (download
))
873 error ("Never got EOF while downloading");
877 /* Put a command string, in args, out to MONITOR. Output from MONITOR is placed
878 on the users terminal until the prompt is seen. */
881 monitor_command (args
, fromtty
)
886 fprintf (log_file
, "\nIn command (args=%s)\n", args
);
888 if (monitor_desc
== NULL
)
889 error("monitor target not open.");
892 error("Missing command.");
894 printf_monitor("%s\r", args
);
900 /* Connect the user directly to MONITOR. This command acts just like the
901 'cu' or 'tip' command. Use <CR>~. or <CR>~^D to break out. */
903 static struct ttystate ttystate
;
907 { printf("\r\n[Exiting connect mode]\r\n");
908 /*SERIAL_RESTORE(0, &ttystate);*/
912 connect_command (args
, fromtty
)
923 if (monitor_desc
== NULL
)
924 error("monitor target not open.");
927 fprintf("This command takes no args. They have been ignored.\n");
929 printf("[Entering connect mode. Use ~. or ~^D to escape]\n");
931 serial_raw(0, &ttystate
);
933 make_cleanup(cleanup_tty
, 0);
942 FD_SET(monitor_desc
, &readfds
);
943 numfds
= select(sizeof(readfds
)*8, &readfds
, 0, 0, 0);
948 perror_with_name("select");
950 if (FD_ISSET(0, &readfds
))
951 { /* tty input, send to monitor */
954 perror_with_name("connect");
956 printf_monitor("%c", c
);
970 if (c
== '.' || c
== '\004')
977 if (FD_ISSET(monitor_desc
, &readfds
))
993 * Define the monitor command strings. Since these are passed directly
994 * through to a printf style function, we need can include formatting
995 * strings. We also need a CR or LF on the end.
997 struct monitor_ops rom68k_cmds
= {
998 "go \r", /* execute or usually GO command */
999 "go \r", /* continue command */
1000 "st \r", /* single step */
1001 "db %x\r", /* set a breakpoint */
1002 "cb %x\r", /* clear a breakpoint */
1003 "pm %x\r", /* set memory to a value */
1004 "pm %x\r", /* display memory */
1005 "-%08X ", /* prompt memory commands use */
1006 "pr %s %x\r", /* set a register */
1007 ": ", /* delimiter between registers */
1008 "pr %s\r", /* read a register */
1009 "dc \r", /* download command */
1010 "ROM68K :->", /* monitor command prompt */
1011 "=", /* end-of-command delimitor */
1012 ".\r" /* optional command terminator */
1015 struct monitor_ops bug_cmds
= {
1016 "go \r", /* execute or usually GO command */
1017 "go \r", /* continue command */
1018 "gn \r", /* single step */
1019 "br %x\r", /* set a breakpoint */
1020 "nobr %x\r", /* clear a breakpoint */
1021 "mm %x\r", /* set memory to a value */
1022 "mm %x\r", /* display memory */
1023 "%08X", /* prompt memory commands use */
1024 "rs %s %x\r", /* set a register */
1025 "=", /* delimiter between registers */
1026 "rm %s\r", /* read a register */
1027 "lo 0\r", /* download command */
1028 "Bug>", /* monitor command prompt */
1029 "? ", /* end-of-command delimitor */
1030 ".\r" /* optional command terminator */
1033 /* Define the target subroutine names */
1034 struct monitor_ops mon68_cmds
= {
1035 "", /* execute or usually GO command */
1036 "", /* continue command */
1037 "", /* single step */
1038 "", /* set a breakpoint */
1039 "", /* clear a breakpoint */
1040 "", /* set memory to a value */
1041 "", /* display memory */
1042 "", /* set a register */
1043 "", /* delimiter between registers */
1044 "", /* read a register */
1045 "", /* download command */
1046 ">", /* monitor command prompt */
1047 "", /* end-of-command delimitor */
1048 "" /* optional command terminator */
1051 struct target_ops rom68k_ops
= {
1053 "Integrated System's ROM68K remote debug monitor",
1054 "Use a remote computer running the ROM68K debug monitor.\n\
1055 Specify the serial device it is connected to (e.g. /dev/ttya).",
1062 monitor_fetch_register
,
1063 monitor_store_register
,
1064 monitor_prepare_to_store
,
1065 monitor_xfer_inferior_memory
,
1067 monitor_insert_breakpoint
,
1068 monitor_remove_breakpoint
, /* Breakpoints */
1073 0, /* Terminal handling */
1075 monitor_load
, /* load */
1076 0, /* lookup_symbol */
1077 monitor_create_inferior
,
1078 monitor_mourn_inferior
,
1080 0, /* notice_signals */
1087 1, /* all mem, mem, stack, regs, exec */
1089 0, /* Section pointers */
1090 OPS_MAGIC
, /* Always the last thing */
1093 struct target_ops monitor_bug_ops
= {
1095 "Motorola's BUG remote serial debug monitor",
1096 "Use a remote computer running Motorola's BUG debug monitor.\n\
1097 Specify the serial device it is connected to (e.g. /dev/ttya).",
1104 monitor_fetch_register
,
1105 monitor_store_register
,
1106 monitor_prepare_to_store
,
1107 monitor_xfer_inferior_memory
,
1109 monitor_insert_breakpoint
,
1110 monitor_remove_breakpoint
, /* Breakpoints */
1115 0, /* Terminal handling */
1117 monitor_load
, /* load */
1118 0, /* lookup_symbol */
1119 monitor_create_inferior
,
1120 monitor_mourn_inferior
,
1122 0, /* notice_signals */
1129 1, /* all mem, mem, stack, regs, exec */
1131 0, /* Section pointers */
1132 OPS_MAGIC
, /* Always the last thing */
1135 struct target_ops mon68_ops
= {
1137 "Intermetric's MON68 remote serial debug monitor",
1138 "Use a remote computer running the MON68 debug monitor.\n\
1139 Specify the serial device it is connected to (e.g. /dev/ttya).",
1146 monitor_fetch_register
,
1147 monitor_store_register
,
1148 monitor_prepare_to_store
,
1149 monitor_xfer_inferior_memory
,
1151 monitor_insert_breakpoint
,
1152 monitor_remove_breakpoint
, /* Breakpoints */
1157 0, /* Terminal handling */
1159 monitor_load
, /* load */
1160 0, /* lookup_symbol */
1161 monitor_create_inferior
,
1162 monitor_mourn_inferior
,
1164 0, /* notice_signals */
1171 1, /* all mem, mem, stack, regs, exec */
1173 0, /* Section pointers */
1174 OPS_MAGIC
, /* Always the last thing */
1178 _initialize_remote_monitors ()
1181 add_set_cmd ("hash", no_class
, var_boolean
,
1183 "Set display of activity while downloading a file.\n\
1184 When enabled, a period \'.\' is displayed.",
1188 /* generic monitor command */
1189 add_com ("monitor <command>", class_obscure
, monitor_command
,
1190 "Send a command to the debug monitor.");
1192 add_com ("connect", class_obscure
, connect_command
,
1193 "Connect the terminal directly up to a serial based command monitor.\n\
1194 Use <CR>~. or <CR>~^D to break out.");
1197 add_target (&rom68k_ops
);
1198 /* add_target (&mon68_ops); */
1199 add_target (&monitor_bug_ops
);