1 /* Remote debugging interface for boot monitors, for GDB.
2 Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 /* This file was derived from remote-eb.c, which did a similar job, but for
21 an AMD-29K running EBMON. That file was in turn derived from remote.c
22 as mentioned in the following comment (left in for comic relief):
24 "This is like remote.c but is for a different situation--
25 having a PC running os9000 hook up with a unix machine with
26 a serial line, and running ctty com2 on the PC. os9000 has a debug
27 monitor called ROMBUG running. Not to mention that the PC
28 has PC/NFS, so it can access the same executables that gdb can,
29 over the net in real time."
31 In reality, this module talks to a debug monitor called 'ROMBUG', which
32 We communicate with ROMBUG via a direct serial line, the network version
33 of ROMBUG is not available yet.
36 /* FIXME This file needs to be rewritten if it's to work again, either
37 to self-contained or to use the new monitor interface. */
43 #ifdef ANSI_PROTOTYPES
49 #include "gdb_string.h"
50 #include <sys/types.h>
54 #include "remote-utils.h"
58 #include "gdb-stabs.h"
60 struct cmd_list_element *showlist;
61 extern struct target_ops rombug_ops; /* Forward declaration */
62 extern struct monitor_ops rombug_cmds; /* Forward declaration */
63 extern struct cmd_list_element *setlist;
64 extern struct cmd_list_element *unsetlist;
65 extern int attach_flag;
67 static void rombug_close();
68 static void rombug_fetch_register();
69 static void rombug_fetch_registers();
70 static void rombug_store_register();
72 static int sr_get_debug(); /* flag set by "set remotedebug" */
74 static int hashmark; /* flag set by "set hash" */
75 static int rombug_is_open = 0;
77 /* FIXME: Replace with sr_get_debug (). */
78 #define LOG_FILE "monitor.log"
80 static int monitor_log = 0;
81 static int tty_xon = 0;
82 static int tty_xoff = 0;
84 static int timeout = 10;
85 static int is_trace_mode = 0;
86 /* Descriptor for I/O to remote machine. Initialize it to NULL*/
87 static serial_t monitor_desc = NULL;
89 static CORE_ADDR bufaddr = 0;
90 static int buflen = 0;
91 static char readbuf[16];
93 /* Send data to monitor. Works just like printf. */
95 #ifdef ANSI_PROTOTYPES
96 printf_monitor(char *pattern, ...)
98 printf_monitor(va_alist)
106 #ifdef ANSI_PROTOTYPES
107 va_start (args, pattern);
111 pattern = va_arg(args, char *);
114 vsprintf(buf, pattern, args);
117 if (SERIAL_WRITE(monitor_desc, buf, strlen(buf)))
118 fprintf(stderr, "SERIAL_WRITE failed: %s\n", safe_strerror(errno));
121 /* Read a character from the remote system, doing all the fancy timeout stuff*/
128 c = SERIAL_READCHAR(monitor_desc, timeout);
133 if (monitor_log && isascii(c))
134 putc(c & 0x7f, log_file);
139 if (c == SERIAL_TIMEOUT)
142 return c; /* Polls shouldn't generate timeout errors */
144 error("Timeout reading from remote system.");
147 perror_with_name("remote-monitor");
150 /* Scan input from the remote system, until STRING is found. If DISCARD is
151 non-zero, then discard non-matching input, else print it out.
152 Let the user break out immediately. */
154 expect(string, discard)
162 printf ("Expecting \"%s\"\n", string);
167 c = readchar(timeout);
176 printf ("\nMatched\n");
184 fwrite(string, 1, (p - 1) - string, stdout);
193 /* Keep discarding input until we see the ROMBUG prompt.
195 The convention for dealing with the prompt is that you
197 o *then* wait for the prompt.
199 Thus the last thing that a procedure does with the serial line
200 will be an expect_prompt(). Exception: rombug_resume does not
201 wait for the prompt, because the terminal is being handed over
202 to the inferior. However, the next thing which happens after that
203 is a rombug_wait which does wait for the prompt.
204 Note that this includes abnormal exit, e.g. error(). This is
205 necessary to prevent getting into states from which we can't
208 expect_prompt(discard)
212 /* This is a convenient place to do this. The idea is to do it often
213 enough that we never lose much data if we terminate abnormally. */
217 expect("trace", discard);
219 expect (PROMPT, discard);
223 /* Get a hex digit from the remote system & return its value.
224 If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
226 get_hex_digit(ignore_space)
232 ch = readchar(timeout);
233 if (ch >= '0' && ch <= '9')
235 else if (ch >= 'A' && ch <= 'F')
236 return ch - 'A' + 10;
237 else if (ch >= 'a' && ch <= 'f')
238 return ch - 'a' + 10;
239 else if (ch == ' ' && ignore_space)
244 error("Invalid hex digit from remote system.");
249 /* Get a byte from monitor and put it in *BYT. Accept any number
257 val = get_hex_digit (1) << 4;
258 val |= get_hex_digit (0);
262 /* Get N 32-bit words from remote, each preceded by a space,
263 and put them in registers starting at REGNO. */
265 get_hex_regs (n, regno)
273 for (i = 0; i < n; i++)
278 for (j = 0; j < 4; j++)
281 if (TARGET_BYTE_ORDER == BIG_ENDIAN)
282 val = (val << 8) + b;
284 val = val + (b << (j*8));
286 supply_register (regno++, (char *) &val);
290 /* This is called not only when we first attach, but also when the
291 user types "run" after having attached. */
293 rombug_create_inferior (execfile, args, env)
301 error("Can't pass arguments to remote ROMBUG process");
303 if (execfile == 0 || exec_bfd == 0)
304 error("No exec file specified");
306 entry_pt = (int) bfd_get_start_address (exec_bfd);
309 fputs ("\nIn Create_inferior()", log_file);
312 /* The "process" (board) is already stopped awaiting our commands, and
313 the program is already downloaded. We just set its PC and go. */
315 init_wait_for_inferior ();
316 proceed ((CORE_ADDR)entry_pt, TARGET_SIGNAL_DEFAULT, 0);
319 /* Open a connection to a remote debugger.
320 NAME is the filename used for communication. */
322 static char dev_name[100];
325 rombug_open(args, from_tty)
330 error ("Use `target RomBug DEVICE-NAME' to use a serial port, or \n\
331 `target RomBug HOST-NAME:PORT-NUMBER' to use a network connection.");
333 target_preopen(from_tty);
336 unpush_target(&rombug_ops);
338 strcpy(dev_name, args);
339 monitor_desc = SERIAL_OPEN(dev_name);
340 if (monitor_desc == NULL)
341 perror_with_name(dev_name);
343 /* if baud rate is set by 'set remotebaud' */
344 if (SERIAL_SETBAUDRATE (monitor_desc, sr_get_baud_rate()))
346 SERIAL_CLOSE (monitor_desc);
347 perror_with_name ("RomBug");
349 SERIAL_RAW(monitor_desc);
350 if (tty_xon || tty_xoff)
352 struct hardware_ttystate { struct termios t;} *tty_s;
354 tty_s =(struct hardware_ttystate *)SERIAL_GET_TTY_STATE(monitor_desc);
355 if (tty_xon) tty_s->t.c_iflag |= IXON;
356 if (tty_xoff) tty_s->t.c_iflag |= IXOFF;
357 SERIAL_SET_TTY_STATE(monitor_desc, (serial_ttystate) tty_s);
362 log_file = fopen (LOG_FILE, "w");
363 if (log_file == NULL)
364 perror_with_name (LOG_FILE);
366 push_monitor (&rombug_cmds);
367 printf_monitor("\r"); /* CR wakes up monitor */
369 push_target (&rombug_ops);
373 printf("Remote %s connected to %s\n", target_shortname,
376 rombug_fetch_registers();
378 printf_monitor ("ov e \r");
385 * Close out all files and local state before this target loses control.
389 rombug_close (quitting)
392 if (rombug_is_open) {
393 SERIAL_CLOSE(monitor_desc);
399 if (ferror(log_file))
400 fprintf(stderr, "Error writing log file.\n");
401 if (fclose(log_file) != 0)
402 fprintf(stderr, "Error closing log file.\n");
408 rombug_link(mod_name, text_reloc)
410 CORE_ADDR *text_reloc;
416 printf_monitor("l %s \r", mod_name);
418 printf_monitor(".r \r");
419 expect(REG_DELIM, 1);
420 for (i=0; i <= 7; i++)
423 for (j = 0; j < 4; j++)
426 val = (val << 8) + b;
434 /* Terminate the open connection to the remote debugger.
435 Use this when you want to detach and do something else
438 rombug_detach (from_tty)
442 printf_monitor (GO_CMD);
445 pop_target(); /* calls rombug_close to do the real work */
447 printf ("Ending remote %s debugging\n", target_shortname);
451 * Tell the remote machine to resume.
454 rombug_resume (pid, step, sig)
456 enum target_signal sig;
459 fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
464 printf_monitor (STEP_CMD);
465 /* wait for the echo. **
466 expect (STEP_CMD, 1);
471 printf_monitor (GO_CMD);
472 /* swallow the echo. **
481 * Wait until the remote machine stops, then return,
482 * storing status in status just as `wait' would.
486 rombug_wait (pid, status)
488 struct target_waitstatus *status;
490 int old_timeout = timeout;
491 struct section_offsets *offs;
493 struct obj_section *obj_sec;
496 fputs ("\nIn wait ()", log_file);
498 status->kind = TARGET_WAITKIND_EXITED;
499 status->value.integer = 0;
501 timeout = -1; /* Don't time out -- user program is running. */
502 expect ("eax:", 0); /* output any message before register display */
503 expect_prompt(1); /* Wait for prompt, outputting extraneous text */
505 status->kind = TARGET_WAITKIND_STOPPED;
506 status->value.sig = TARGET_SIGNAL_TRAP;
507 timeout = old_timeout;
508 rombug_fetch_registers();
511 pc = read_register(PC_REGNUM);
512 addr = read_register(DATABASE_REG);
513 obj_sec = find_pc_section (pc);
516 if (obj_sec->objfile != symfile_objfile)
517 new_symfile_objfile(obj_sec->objfile, 1, 0);
518 offs = ((struct section_offsets *)
519 alloca (sizeof (struct section_offsets)
520 + (symfile_objfile->num_sections * sizeof (offs->offsets))));
521 memcpy (offs, symfile_objfile->section_offsets,
522 (sizeof (struct section_offsets) +
523 (symfile_objfile->num_sections * sizeof (offs->offsets))));
524 ANOFFSET (offs, SECT_OFF_DATA) = addr;
525 ANOFFSET (offs, SECT_OFF_BSS) = addr;
527 objfile_relocate(symfile_objfile, offs);
533 /* Return the name of register number regno in the form input and output by
534 monitor. Currently, register_names just happens to contain exactly what
535 monitor wants. Lets take advantage of that just as long as possible! */
550 for (p = reg_names[regno]; *p; p++)
554 p = (char *)reg_names[regno];
561 /* read the remote registers into the block regs. */
564 rombug_fetch_registers ()
570 printf_monitor (GET_REG);
581 for (regno = 8; regno <= 15; regno++)
583 expect(REG_DELIM, 1);
584 if (regno >= 8 && regno <= 13)
587 for (j = 0; j < 2; j++)
590 if (TARGET_BYTE_ORDER == BIG_ENDIAN)
591 val = (val << 8) + b;
593 val = val + (b << (j*8));
596 if (regno == 8) i = 10;
597 if (regno >= 9 && regno <= 12) i = regno + 3;
598 if (regno == 13) i = 11;
599 supply_register (i, (char *) &val);
601 else if (regno == 14)
603 get_hex_regs(1, PC_REGNUM);
605 else if (regno == 15)
612 supply_register(regno, (char *) &val);
619 /* Fetch register REGNO, or all registers if REGNO is -1.
620 Returns errno value. */
622 rombug_fetch_register (regno)
629 fprintf (log_file, "\nIn Fetch Register (reg=%s)\n", get_reg_name (regno));
635 rombug_fetch_registers ();
639 char *name = get_reg_name (regno);
640 printf_monitor (GET_REG);
641 if (regno >= 10 && regno <= 15)
646 expect (REG_DELIM, 1);
648 for (j = 0; j < 2; j++)
651 if (TARGET_BYTE_ORDER == BIG_ENDIAN)
652 val = (val << 8) + b;
654 val = val + (b << (j*8));
656 supply_register (regno, (char *) &val);
658 else if (regno == 8 || regno == 9)
664 expect (REG_DELIM, 1);
665 get_hex_regs (1, regno);
670 expect (REG_DELIM, 1);
686 /* Store the remote registers from the contents of the block REGS. */
689 rombug_store_registers ()
693 for (regno = 0; regno <= PC_REGNUM; regno++)
694 rombug_store_register(regno);
696 registers_changed ();
699 /* Store register REGNO, or all if REGNO == 0.
700 return errno value. */
702 rombug_store_register (regno)
708 fprintf (log_file, "\nIn Store_register (regno=%d)\n", regno);
711 rombug_store_registers ();
715 printf ("Setting register %s to 0x%x\n", get_reg_name (regno), read_register (regno));
717 name = get_reg_name(regno);
718 if (name == 0) return;
719 printf_monitor (SET_REG, name, read_register (regno));
726 /* Get ready to modify the registers array. On machines which store
727 individual registers, this doesn't need to do anything. On machines
728 which store all the registers in one fell swoop, this makes sure
729 that registers contains all the registers from the program being
733 rombug_prepare_to_store ()
735 /* Do nothing, since we can store individual regs */
741 printf ("\tAttached to %s at %d baud.\n",
742 dev_name, sr_get_baud_rate());
745 /* Copy LEN bytes of data from debugger memory at MYADDR
746 to inferior's memory at MEMADDR. Returns length moved. */
748 rombug_write_inferior_memory (memaddr, myaddr, len)
750 unsigned char *myaddr;
757 fprintf (log_file, "\nIn Write_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
759 printf_monitor (MEM_SET_CMD, memaddr);
760 for (i = 0; i < len; i++)
762 expect (CMD_DELIM, 1);
763 printf_monitor ("%x \r", myaddr[i]);
765 printf ("\nSet 0x%x to 0x%x\n", memaddr + i, myaddr[i]);
767 expect (CMD_DELIM, 1);
769 printf_monitor (CMD_END);
778 /* Read LEN bytes from inferior memory at MEMADDR. Put the result
779 at debugger address MYADDR. Returns length moved. */
781 rombug_read_inferior_memory(memaddr, myaddr, len)
788 /* Number of bytes read so far. */
791 /* Starting address of this pass. */
792 unsigned long startaddr;
794 /* Number of bytes to read in this pass. */
798 fprintf (log_file, "\nIn Read_inferior_memory (memaddr=%x, len=%d)\n", memaddr, len);
800 /* Note that this code works correctly if startaddr is just less
801 than UINT_MAX (well, really CORE_ADDR_MAX if there was such a
802 thing). That is, something like
803 rombug_read_bytes (CORE_ADDR_MAX - 4, foo, 4)
804 works--it never adds len To memaddr and gets 0. */
805 /* However, something like
806 rombug_read_bytes (CORE_ADDR_MAX - 3, foo, 4)
807 doesn't need to work. Detect it and give up if there's an attempt
809 if (((memaddr - 1) + len) < memaddr) {
813 if (bufaddr <= memaddr && (memaddr+len) <= (bufaddr+buflen))
815 memcpy(myaddr, &readbuf[memaddr-bufaddr], len);
824 if ((startaddr % 16) != 0)
825 len_this_pass -= startaddr % 16;
826 if (len_this_pass > (len - count))
827 len_this_pass = (len - count);
829 printf ("\nDisplay %d bytes at %x\n", len_this_pass, startaddr);
831 printf_monitor (MEM_DIS_CMD, startaddr, 8);
833 for (i = 0; i < 16; i++)
835 get_hex_byte (&readbuf[i]);
839 memcpy(&myaddr[count], readbuf, len_this_pass);
840 count += len_this_pass;
841 startaddr += len_this_pass;
842 expect(CMD_DELIM, 1);
845 printf_monitor (CMD_END);
852 /* FIXME-someday! merge these two. */
854 rombug_xfer_inferior_memory (memaddr, myaddr, len, write, target)
859 struct target_ops *target; /* ignored */
862 return rombug_write_inferior_memory (memaddr, myaddr, len);
864 return rombug_read_inferior_memory (memaddr, myaddr, len);
868 rombug_kill (args, from_tty)
872 return; /* ignore attempts to kill target system */
875 /* Clean up when a program exits.
876 The program actually lives on in the remote processor's RAM, and may be
877 run again without a download. Don't leave it full of breakpoint
881 rombug_mourn_inferior ()
883 remove_breakpoints ();
884 generic_mourn_inferior (); /* Do all the proper things now */
887 #define MAX_MONITOR_BREAKPOINTS 16
889 extern int memory_breakpoint_size;
890 static CORE_ADDR breakaddr[MAX_MONITOR_BREAKPOINTS] = {0};
893 rombug_insert_breakpoint (addr, shadow)
900 fprintf (log_file, "\nIn Insert_breakpoint (addr=%x)\n", addr);
902 for (i = 0; i <= MAX_MONITOR_BREAKPOINTS; i++)
903 if (breakaddr[i] == 0)
907 printf ("Breakpoint at %x\n", addr);
908 rombug_read_inferior_memory(addr, shadow, memory_breakpoint_size);
909 printf_monitor(SET_BREAK_CMD, addr);
915 fprintf(stderr, "Too many breakpoints (> 16) for monitor\n");
920 * _remove_breakpoint -- Tell the monitor to remove a breakpoint
923 rombug_remove_breakpoint (addr, shadow)
930 fprintf (log_file, "\nIn Remove_breakpoint (addr=%x)\n", addr);
932 for (i = 0; i < MAX_MONITOR_BREAKPOINTS; i++)
933 if (breakaddr[i] == addr)
936 printf_monitor(CLR_BREAK_CMD, addr);
942 fprintf(stderr, "Can't find breakpoint associated with 0x%x\n", addr);
946 /* Load a file. This is usually an srecord, which is ascii. No
947 protocol, just sent line by line. */
949 #define DOWNLOAD_LINE_SIZE 100
954 /* this part comment out for os9* */
957 char buf[DOWNLOAD_LINE_SIZE];
961 printf ("Loading %s to monitor\n", arg);
963 download = fopen (arg, "r");
964 if (download == NULL)
966 error (sprintf (buf, "%s Does not exist", arg));
970 printf_monitor (LOAD_CMD);
971 /* expect ("Waiting for S-records from host... ", 1); */
973 while (!feof (download))
975 bytes_read = fread (buf, sizeof (char), DOWNLOAD_LINE_SIZE, download);
982 if (SERIAL_WRITE(monitor_desc, buf, bytes_read)) {
983 fprintf(stderr, "SERIAL_WRITE failed: (while downloading) %s\n", safe_strerror(errno));
987 while (i++ <=200000) {} ; /* Ugly HACK, probably needs flow control */
988 if (bytes_read < DOWNLOAD_LINE_SIZE)
990 if (!feof (download))
991 error ("Only read %d bytes\n", bytes_read);
1000 if (!feof (download))
1001 error ("Never got EOF while downloading");
1006 /* Put a command string, in args, out to MONITOR.
1007 Output from MONITOR is placed on the users terminal until the prompt
1011 rombug_command (args, fromtty)
1015 if (monitor_desc == NULL)
1016 error("monitor target not open.");
1019 fprintf (log_file, "\nIn command (args=%s)\n", args);
1022 error("Missing command.");
1024 printf_monitor("%s\r", args);
1029 /* Connect the user directly to MONITOR. This command acts just like the
1030 'cu' or 'tip' command. Use <CR>~. or <CR>~^D to break out. */
1032 static struct ttystate ttystate;
1036 { printf("\r\n[Exiting connect mode]\r\n");
1037 /*SERIAL_RESTORE(0, &ttystate);*/
1041 connect_command (args, fromtty)
1052 if (monitor_desc == NULL)
1053 error("monitor target not open.");
1056 fprintf("This command takes no args. They have been ignored.\n");
1058 printf("[Entering connect mode. Use ~. or ~^D to escape]\n");
1060 serial_raw(0, &ttystate);
1062 make_cleanup(cleanup_tty, 0);
1070 FD_SET(0, &readfds);
1071 FD_SET(monitor_desc, &readfds);
1072 numfds = select(sizeof(readfds)*8, &readfds, 0, 0, 0);
1074 while (numfds == 0);
1077 perror_with_name("select");
1079 if (FD_ISSET(0, &readfds))
1080 { /* tty input, send to monitor */
1083 perror_with_name("connect");
1085 printf_monitor("%c", c);
1099 if (c == '.' || c == '\004')
1106 if (FD_ISSET(monitor_desc, &readfds))
1122 * Define the monitor command strings. Since these are passed directly
1123 * through to a printf style function, we need can include formatting
1124 * strings. We also need a CR or LF on the end.
1126 #warning FIXME: monitor interface pattern strings, stale struct decl
1127 struct monitor_ops rombug_cmds = {
1128 "g \r", /* execute or usually GO command */
1129 "g \r", /* continue command */
1130 "t \r", /* single step */
1131 "b %x\r", /* set a breakpoint */
1132 "k %x\r", /* clear a breakpoint */
1133 "c %x\r", /* set memory to a value */
1134 "d %x %d\r", /* display memory */
1135 "$%08X", /* prompt memory commands use */
1136 ".%s %x\r", /* set a register */
1137 ":", /* delimiter between registers */
1138 ". \r", /* read a register */
1139 "mf \r", /* download command */
1140 "RomBug: ", /* monitor command prompt */
1141 ": ", /* end-of-command delimitor */
1142 ".\r" /* optional command terminator */
1145 struct target_ops rombug_ops ;
1147 static void init_rombug_ops(void)
1149 rombug_ops.to_shortname = "rombug";
1150 rombug_ops.to_longname = "Microware's ROMBUG debug monitor";
1151 rombug_ops.to_doc = "Use a remote computer running the ROMBUG debug monitor.\n\
1152 Specify the serial device it is connected to (e.g. /dev/ttya).",
1153 rombug_ops.to_open = rombug_open;
1154 rombug_ops.to_close = rombug_close;
1155 rombug_ops.to_attach = 0;
1156 rombug_ops.to_detach = rombug_detach;
1157 rombug_ops.to_resume = rombug_resume;
1158 rombug_ops.to_wait = rombug_wait;
1159 rombug_ops.to_fetch_registers = rombug_fetch_register;
1160 rombug_ops.to_store_registers = rombug_store_register;
1161 rombug_ops.to_prepare_to_store = rombug_prepare_to_store;
1162 rombug_ops.to_xfer_memory = rombug_xfer_inferior_memory;
1163 rombug_ops.to_files_info = rombug_files_info;
1164 rombug_ops.to_insert_breakpoint = rombug_insert_breakpoint;
1165 rombug_ops.to_remove_breakpoint = rombug_remove_breakpoint; /* Breakpoints */
1166 rombug_ops.to_terminal_init = 0;
1167 rombug_ops.to_terminal_inferior = 0;
1168 rombug_ops.to_terminal_ours_for_output = 0;
1169 rombug_ops.to_terminal_ours = 0;
1170 rombug_ops.to_terminal_info = 0; /* Terminal handling */
1171 rombug_ops.to_kill = rombug_kill;
1172 rombug_ops.to_load = rombug_load; /* load */
1173 rombug_ops.to_lookup_symbol = rombug_link; /* lookup_symbol */
1174 rombug_ops.to_create_inferior = rombug_create_inferior;
1175 rombug_ops.to_mourn_inferior = rombug_mourn_inferior;
1176 rombug_ops.to_can_run = 0; /* can_run */
1177 rombug_ops.to_notice_signals = 0; /* notice_signals */
1178 rombug_ops.to_thread_alive = 0;
1179 rombug_ops.to_stop = 0; /* to_stop */
1180 rombug_ops.to_stratum = process_stratum;
1181 rombug_ops.DONT_USE = 0; /* next */
1182 rombug_ops.to_has_all_memory = 1;
1183 rombug_ops.to_has_memory = 1;
1184 rombug_ops.to_has_stack = 1;
1185 rombug_ops.to_has_registers = 1;
1186 rombug_ops.to_has_execution = 1; /* has execution */
1187 rombug_ops.to_sections = 0;
1188 rombug_ops.to_sections_end = 0; /* Section pointers */
1189 rombug_ops.to_magic = OPS_MAGIC; /* Always the last thing */
1193 _initialize_remote_os9k ()
1196 add_target (&rombug_ops);
1199 add_set_cmd ("hash", no_class, var_boolean, (char *)&hashmark,
1200 "Set display of activity while downloading a file.\nWhen enabled, a period \'.\' is displayed.",
1205 add_set_cmd ("timeout", no_class, var_zinteger,
1207 "Set timeout in seconds for remote MIPS serial I/O.",
1212 add_set_cmd ("remotelog", no_class, var_zinteger,
1213 (char *) &monitor_log,
1214 "Set monitor activity log on(=1) or off(=0).",
1219 add_set_cmd ("remotexon", no_class, var_zinteger,
1221 "Set remote tty line XON control",
1226 add_set_cmd ("remotexoff", no_class, var_zinteger,
1228 "Set remote tty line XOFF control",
1232 add_com ("rombug <command>", class_obscure, rombug_command,
1233 "Send a command to the debug monitor.");
1235 add_com ("connect", class_obscure, connect_command,
1236 "Connect the terminal directly up to a serial based command monitor.\nUse <CR>~. or <CR>~^D to break out.");