1 /* Remote debugging interface for Hitachi HMS Monitor Version 1.0
2 Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3 Contributed by Cygnus Support. Written by Steve Chamberlain
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
36 #include "remote-utils.h"
37 /* External data declarations */
38 extern int stop_soon_quietly
; /* for wait_for_inferior */
40 /* Forward data declarations */
41 extern struct target_ops hms_ops
; /* Forward declaration */
43 /* Forward function declarations */
44 static void hms_fetch_registers ();
45 static int hms_store_registers ();
46 static void hms_close ();
47 static int hms_clear_breakpoints ();
49 extern struct target_ops hms_ops
;
50 static void hms_drain ();
51 static void add_commands ();
52 static void remove_commands ();
54 static int quiet
= 1; /* FIXME - can be removed after Dec '94 */
56 static DCACHE
*remote_dcache
;
60 /***********************************************************************
61 * I/O stuff stolen from remote-eb.c
62 ***********************************************************************/
64 static int timeout
= 2;
66 static const char *dev_name
;
68 /* Descriptor for I/O to remote machine. Initialize it to -1 so that
69 hms_open knows that we don't have a file open when the program
72 static int before
= 0xdead;
73 static int is_open
= 0;
74 static int after
= 0xdead;
83 error ("remote device not open");
90 /* Read a character from the remote system, doing all the fancy
97 buf
= SERIAL_READCHAR (desc
, timeout
);
99 if (buf
== SERIAL_TIMEOUT
)
101 hms_write (".\r\n", 3);
102 error ("Timeout reading from remote system.");
104 if (buf
== SERIAL_ERROR
)
106 error ("Serial port error!");
109 if (!quiet
|| remote_debug
)
110 printf_unfiltered ("%c", buf
);
120 int b
= SERIAL_READCHAR (desc
, 0);
121 if (b
== SERIAL_TIMEOUT
)
131 buf
= SERIAL_READCHAR (desc
, timeout
);
132 if (buf
== SERIAL_TIMEOUT
)
134 if (!quiet
|| remote_debug
)
135 printf_unfiltered ("%c", buf
);
141 /* Keep discarding input from the remote system, until STRING is found.
142 Let the user break out immediately. */
171 /* Keep discarding input until we see the hms prompt.
173 The convention for dealing with the prompt is that you
175 o *then* wait for the prompt.
177 Thus the last thing that a procedure does with the serial line
178 will be an expect_prompt(). Exception: hms_resume does not
179 wait for the prompt, because the terminal is being handed over
180 to the inferior. However, the next thing which happens after that
181 is a hms_wait which does wait for the prompt.
182 Note that this includes abnormal exit, e.g. error(). This is
183 necessary to prevent getting into states from which we can't
191 /* Get a hex digit from the remote system & return its value.
192 If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
194 get_hex_digit (ignore_space
)
202 if (ch
>= '0' && ch
<= '9')
204 else if (ch
>= 'A' && ch
<= 'F')
205 return ch
- 'A' + 10;
206 else if (ch
>= 'a' && ch
<= 'f')
207 return ch
- 'a' + 10;
208 else if (ch
== ' ' && ignore_space
)
213 error ("Invalid hex digit from remote system.");
218 /* Get a byte from hms_desc and put it in *BYT. Accept any number
226 val
= get_hex_digit (1) << 4;
227 val
|= get_hex_digit (0);
231 /* Read a 32-bit hex word from the hms, preceded by a space */
239 for (j
= 0; j
< 8; j
++)
240 val
= (val
<< 4) + get_hex_digit (j
== 0);
244 /* Called when SIGALRM signal sent due to alarm() timeout. */
246 /* Number of SIGTRAPs we need to simulate. That is, the next
247 NEED_ARTIFICIAL_TRAP calls to hms_wait should just return
248 SIGTRAP without actually waiting for anything. */
250 static int need_artificial_trap
= 0;
253 hms_kill (arg
, from_tty
)
260 /* This is called not only when we first attach, but also when the
261 user types "run" after having attached. */
263 hms_create_inferior (execfile
, args
, env
)
272 error ("Can't pass arguments to remote hms process.");
274 if (execfile
== 0 || exec_bfd
== 0)
275 error ("No exec file specified");
277 entry_pt
= (int) bfd_get_start_address (exec_bfd
);
280 hms_kill (NULL
, NULL
);
281 hms_clear_breakpoints ();
282 init_wait_for_inferior ();
286 insert_breakpoints (); /* Needed to get correct instruction in cache */
287 proceed (entry_pt
, TARGET_SIGNAL_DEFAULT
, 0);
290 /* Open a connection to a remote debugger.
291 NAME is the filename used for communication, then a space,
299 while (*s
&& !isspace (*s
))
320 while (*s
&& !isspace (*s
))
326 copy
= xmalloc (len
+ 1);
327 memcpy (copy
, word
, len
);
333 static int baudrate
= 9600;
340 /* Put this port into NORMAL mode, send the 'normal' character */
342 hms_write ("\001", 1); /* Control A */
343 hms_write ("\r\n", 2); /* Cr */
347 ok
= SERIAL_READCHAR (desc
, timeout
);
354 if (readchar_nofail () == 'r')
357 /* Not the right baudrate, or the board's not on */
363 if (!SERIAL_SETBAUDRATE (desc
, baudrate
))
364 error ("Can't set baudrate");
369 /* Close out all files and local state before this target loses control. */
375 /* Clear any break points */
377 hms_clear_breakpoints ();
378 sleep (1); /* Let any output make it all the way back */
381 SERIAL_WRITE (desc
, "R\r\n", 3);
387 /* Terminate the open connection to the remote debugger. Use this
388 when you want to detach and do something else with your gdb. */ void
389 hms_detach (args
, from_tty
)
395 hms_clear_breakpoints ();
398 pop_target (); /* calls hms_close to do the real work
401 printf_filtered ("Ending remote %s debugging\n",
405 /* Tell the remote machine to resume. */
408 hms_resume (pid
, step
, sig
)
413 dcache_flush (remote_dcache
);
420 /* Force the next hms_wait to return a trap. Not doing anything
421 about I/O from the target means that the user has to type "continue"
422 to see any. FIXME, this should be fixed. */
423 need_artificial_trap
= 1;
432 /* Wait until the remote machine stops, then return, storing status in
433 STATUS just as `wait' would. */
436 hms_wait (pid
, status
)
438 struct target_waitstatus
*status
;
440 /* Strings to look for. '?' means match any single character. Note
441 that with the algorithm we use, the initial character of the string
442 cannot recur in the string, or we will not find some cases of the
443 string in the input. */
445 static char bpt
[] = "At breakpoint:";
447 /* It would be tempting to look for "\n[__exit + 0x8]\n" but that
448 requires loading symbols with "yc i" and even if we did do that we
449 don't know that the file has symbols. */
450 static char exitmsg
[] = "HMS>";
454 /* Large enough for either sizeof (bpt) or sizeof (exitmsg) chars.
458 /* Current position in swallowed. */
459 char *swallowed_p
= swallowed
;
463 int old_timeout
= timeout
;
465 old_immediate_quit
= immediate_quit
;
466 int swallowed_cr
= 0;
468 status
->kind
= TARGET_WAITKIND_EXITED
;
469 status
->value
.integer
= 0;
471 if (need_artificial_trap
!= 0)
474 TARGET_WAITKIND_STOPPED
;
475 status
->value
.sig
= TARGET_SIGNAL_TRAP
;
476 need_artificial_trap
--;
480 timeout
= 5; /* Don't time out for a while - user program is running.
482 immediate_quit
= 1; /* Helps ability to QUIT */
485 QUIT
; /* Let user quit and leave process running */
502 (ch
== *ep
|| *ep
== '?')
522 /* Print out any characters which have been swallowed. */
523 for (p
= swallowed
; p
< swallowed_p
; ++p
)
524 putchar_unfiltered (*p
);
525 swallowed_p
= swallowed
;
527 if ((ch
!= '\r' && ch
!= '\n') || swallowed_cr
> 10)
529 putchar_unfiltered (ch
);
538 status
->kind
= TARGET_WAITKIND_STOPPED
;
539 status
->value
.sig
= TARGET_SIGNAL_TRAP
;
544 status
->kind
= TARGET_WAITKIND_EXITED
;
545 status
->value
.integer
=
549 timeout
= old_timeout
;
550 immediate_quit
= old_immediate_quit
;
555 /* Return the name of register number REGNO in the form input and
558 Returns a pointer to a static buffer containing the answer. */
569 /* Read the remote registers. */
572 gethex (length
, start
, ok
)
582 if (*start
>= 'a' && *start
<= 'f')
584 result
+= *start
- 'a' + 10;
586 else if (*start
>= 'A' &&
589 result
+= *start
- 'A' + 10;
592 (*start
>= '0' && *start
<= '9')
594 result
+= *start
- '0';
604 timed_read (buf
, n
, timeout
)
631 SERIAL_WRITE (desc
, a
, l
);
633 if (!quiet
|| remote_debug
)
635 printf_unfiltered ("<");
636 for (i
= 0; i
< l
; i
++)
638 printf_unfiltered ("%c", a
[i
]);
640 printf_unfiltered (">");
647 hms_write (s
, strlen (s
));
648 hms_write ("\r\n", 2);
651 #ifdef GDB_TARGET_IS_H8500
653 /* H8/500 monitor reg dump looks like:
656 PC:8000 SR:070C .7NZ.. CP:00 DP:00 EP:00 TP:00 BR:00
657 R0-R7: FF5A 0001 F4FE F500 0000 F528 F528 F4EE
663 supply_val (n
, size
, ptr
, segptr
)
674 raw
[0] = gethex (2, ptr
, &ok
);
675 raw
[1] = gethex (2, ptr
+ 2, &ok
);
676 supply_register (n
, raw
);
679 raw
[0] = gethex (2, ptr
, &ok
);
680 supply_register (n
, raw
);
684 int v
= gethex (4, ptr
, &ok
);
685 v
|= gethex (2, segptr
, &ok
) << 16;
687 raw
[1] = (v
>> 16) & 0xff;
688 raw
[2] = (v
>> 8) & 0xff;
689 raw
[3] = (v
>> 0) & 0xff;
690 supply_register (n
, raw
);
696 hms_fetch_register (dummy
)
699 #define REGREPLY_SIZE 108
700 char linebuf
[REGREPLY_SIZE
+ 1];
705 LONGEST reg
[NUM_REGS
];
713 s
= timed_read (linebuf
+ 1, REGREPLY_SIZE
, 1);
715 linebuf
[REGREPLY_SIZE
] = 0;
717 if (linebuf
[3] == 'P' &&
720 linebuf
[105] == 'H' &&
721 linebuf
[106] == 'M' &&
728 -------1---------2---------3---------4---------5-----
729 345678901234567890123456789012345678901234567890123456
730 PC:8000 SR:070C .7NZ.. CP:00 DP:00 EP:00 TP:00 BR:00**
731 ---6---------7---------8---------9--------10----
732 789012345678901234567890123456789012345678901234
733 R0-R7: FF5A 0001 F4FE F500 0000 F528 F528 F4EE**
741 supply_val (PC_REGNUM
, 4, linebuf
+ 6, linebuf
+ 29);
743 supply_val (CCR_REGNUM
, 2, linebuf
+ 14);
744 supply_val (SEG_C_REGNUM
, 1, linebuf
+ 29);
745 supply_val (SEG_D_REGNUM
, 1, linebuf
+ 35);
746 supply_val (SEG_E_REGNUM
, 1, linebuf
+ 41);
747 supply_val (SEG_T_REGNUM
, 1, linebuf
+ 47);
748 for (i
= 0; i
< 8; i
++)
755 char *src
= linebuf
+ 64 + 5 * i
;
756 char *segsrc
= linebuf
+ sr
[i
];
757 supply_val (R0_REGNUM
+ i
, 2, src
);
758 supply_val (PR0_REGNUM
+ i
, 4, src
, segsrc
);
771 #ifdef GDB_TARGET_IS_H8300
773 hms_fetch_register (dummy
)
776 #define REGREPLY_SIZE 79
777 char linebuf
[REGREPLY_SIZE
+ 1];
782 unsigned LONGEST reg
[NUM_REGS
];
790 s
= timed_read (linebuf
, 1, 1);
792 while (linebuf
[0] != 'r')
793 s
= timed_read (linebuf
, 1, 1);
795 s
= timed_read (linebuf
+ 1, REGREPLY_SIZE
- 1, 1);
797 linebuf
[REGREPLY_SIZE
] = 0;
799 if (linebuf
[0] == 'r' &&
803 linebuf
[75] == 'H' &&
804 linebuf
[76] == 'M' &&
808 PC=XXXX CCR=XX:XXXXXXXX R0-R7= XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
809 5436789012345678901234567890123456789012345678901234567890123456789012
814 reg
[PC_REGNUM
] = gethex (4, linebuf
+ 6, &gottok
);
815 reg
[CCR_REGNUM
] = gethex (2, linebuf
+ 15, &gottok
);
816 for (i
= 0; i
< 8; i
++)
818 reg
[i
] = gethex (4, linebuf
+ 34 + 5 * i
, &gottok
);
823 for (i
= 0; i
< NUM_REGS
; i
++)
828 swapped
[0] = (reg
[i
]) >> 8;
830 supply_register (i
, swapped
);
834 /* Store register REGNO, or all if REGNO == -1.
835 Return errno value. */
837 hms_store_register (regno
)
842 for (regno
= 0; regno
< NUM_REGS
; regno
++)
844 hms_store_register (regno
);
849 char *name
= get_reg_name (regno
);
851 /* Some regs dont really exist */
852 if (!(name
[0] == 'p' && name
[1] == 'r')
853 && !(name
[0] == 'c' && name
[1] == 'y')
854 && !(name
[0] == 't' && name
[1] == 'i')
855 && !(name
[0] == 'i' && name
[1] == 'n'))
857 sprintf (buffer
, "r %s=%x", name
, read_register (regno
));
858 hms_write_cr (buffer
);
865 /* Get ready to modify the registers array. On machines which store
866 individual registers, this doesn't need to do anything. On machines
867 which store all the registers in one fell swoop, this makes sure
868 that registers contains all the registers from the program being
872 hms_prepare_to_store ()
874 /* Do nothing, since we can store individual regs */
878 translate_addr (addr
)
886 /* Read a word from remote address ADDR and return it.
887 * This goes through the data cache.
890 hms_fetch_word (addr
)
893 return dcache_fetch (remote_dcache
, addr
);
896 /* Write a word WORD into remote address ADDR.
897 This goes through the data cache. */
900 hms_store_word (addr
, word
)
904 dcache_poke (remote_dcache
, addr
, word
);
908 hms_xfer_inferior_memory (memaddr
, myaddr
, len
, write
, target
)
913 struct target_ops
*target
; /* ignored */
917 /* Round starting address down to longword boundary. */
918 register CORE_ADDR addr
;
920 /* Round ending address up; get number of longwords that makes. */
923 /* Allocate buffer of that many longwords. */
924 register int *buffer
;
927 addr
= memaddr
& -sizeof (int);
928 count
= (((memaddr
+ len
) - addr
) + sizeof (int) - 1) / sizeof (int);
930 buffer
= (int *) alloca (count
* sizeof (int));
934 /* Fill start and end extra bytes of buffer with existing memory data. */
936 if (addr
!= memaddr
|| len
< (int) sizeof (int))
938 /* Need part of initial word -- fetch it. */
939 buffer
[0] = hms_fetch_word (addr
);
942 if (count
> 1) /* FIXME, avoid if even boundary */
945 = hms_fetch_word (addr
+ (count
- 1) * sizeof (int));
948 /* Copy data to be written over corresponding part of buffer */
950 memcpy ((char *) buffer
+ (memaddr
& (sizeof (int) - 1)), myaddr
, len
);
952 /* Write the entire buffer. */
954 for (i
= 0; i
< count
; i
++, addr
+= sizeof (int))
957 hms_store_word (addr
, buffer
[i
]);
967 /* Read all the longwords */
968 for (i
= 0; i
< count
; i
++, addr
+= sizeof (int))
971 buffer
[i
] = hms_fetch_word (addr
);
979 /* Copy appropriate bytes out of the buffer. */
980 memcpy (myaddr
, (char *) buffer
+ (memaddr
& (sizeof (int) - 1)), len
);
987 hms_write_inferior_memory (memaddr
, myaddr
, len
)
989 unsigned char *myaddr
;
1005 thisgo
= len
- done
;
1009 sprintf (ptr
, "M.B %4x =", memaddr
+ done
);
1011 for (idx
= 0; idx
< thisgo
; idx
++)
1013 sprintf (ptr
, "%2x ", myaddr
[idx
+ done
]);
1016 hms_write_cr (buffer
);
1025 char *file
= "nothing";
1028 file
= bfd_get_filename (exec_bfd
);
1032 printf_filtered ("\tAttached to DOS asynctsr and running program %s\n", file
);
1034 printf_filtered ("\tAttached to %s at %d baud and running program %s\n", dev_name
, baudrate
, file
);
1036 printf_filtered ("\ton an H8/300 processor.\n");
1039 /* Copy LEN bytes of data from debugger memory at MYADDR
1040 to inferior's memory at MEMADDR. Returns errno value.
1041 * sb/sh instructions don't work on unaligned addresses, when TU=1.
1044 /* Read LEN bytes from inferior memory at MEMADDR. Put the result
1045 at debugger address MYADDR. Returns errno value. */
1047 hms_read_inferior_memory (memaddr
, myaddr
, len
)
1052 /* Align to nearest low 16 bits */
1055 CORE_ADDR start
= memaddr
;
1056 CORE_ADDR end
= memaddr
+ len
- 1;
1061 AAAA: XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX '................'
1062 012345678901234567890123456789012345678901234567890123456789012345
1072 sprintf (buffer
, "m %4x %4x", start
& 0xffff, end
& 0xffff);
1075 hms_write_cr (buffer
);
1076 /* drop the echo and newline */
1077 for (i
= 0; i
< 13; i
++)
1080 /* Grab the lines as they come out and fill the area */
1091 buffer
[0] = readchar ();
1092 while (buffer
[0] == '\r'
1093 || buffer
[0] == '\n')
1094 buffer
[0] = readchar ();
1096 if (buffer
[0] == 'M')
1099 for (i
= 1; i
< 50; i
++)
1101 buffer
[i
] = readchar ();
1103 /* sometimes we loose characters in the ascii representation of the
1104 data. I don't know where. So just scan for the end of line */
1106 while (i
!= '\n' && i
!= '\r')
1109 /* Now parse the line */
1111 addr
= gethex (4, buffer
, &ok
);
1113 for (p
= 0; p
< 16; p
+= 2)
1115 byte
[p
] = gethex (2, buffer
+ idx
, &ok
);
1116 byte
[p
+ 1] = gethex (2, buffer
+ idx
+ 2, &ok
);
1120 for (p
= 0; p
< 16; p
++)
1122 if (addr
+ p
>= memaddr
&&
1123 addr
+ p
< memaddr
+ len
)
1125 myaddr
[(addr
+ p
) - memaddr
] = byte
[p
];
1131 #ifdef GDB_TARGET_IS_H8500
1134 #ifdef GDB_TARGET_IS_H8300
1145 #define MAX_BREAKS 16
1146 static int num_brkpts
= 0;
1148 hms_insert_breakpoint (addr
, save
)
1150 char *save
; /* Throw away, let hms save instructions */
1154 if (num_brkpts
< MAX_BREAKS
)
1159 sprintf (buffer
, "b %x", addr
& 0xffff);
1160 hms_write_cr (buffer
);
1166 fprintf_filtered (gdb_stderr
,
1167 "Too many break points, break point not installed\n");
1173 hms_remove_breakpoint (addr
, save
)
1175 char *save
; /* Throw away, let hms save instructions */
1182 sprintf (buffer
, "b - %x", addr
& 0xffff);
1183 hms_write_cr (buffer
);
1190 /* Clear the hmss notion of what the break points are */
1192 hms_clear_breakpoints ()
1197 hms_write_cr ("b -");
1205 hms_clear_breakpoints ();
1206 unpush_target (&hms_ops
);
1207 generic_mourn_inferior ();
1210 /* Put a command string, in args, out to the hms. The hms is assumed to
1211 be in raw mode, all writing/reading done through desc.
1212 Ouput from the hms is placed on the users terminal until the
1213 prompt from the hms is seen.
1214 FIXME: Can't handle commands that take input. */
1217 hms_com (args
, fromtty
)
1226 /* Clear all input so only command relative output is displayed */
1228 hms_write_cr (args
);
1229 /* hms_write ("\030", 1); */
1234 hms_open (name
, from_tty
)
1247 dev_name
= strdup (name
);
1249 if (!(desc
= SERIAL_OPEN (dev_name
)))
1250 perror_with_name ((char *) dev_name
);
1254 push_target (&hms_ops
);
1255 dcache_init (hms_read_inferior_memory
,
1256 hms_write_inferior_memory
);
1258 /* Hello? Are you there? */
1259 SERIAL_WRITE (desc
, "\r\n", 2);
1262 /* Clear any break points */
1263 hms_clear_breakpoints ();
1265 printf_filtered ("Connected to remote board running HMS monitor.\n");
1270 /* Define the target subroutine names */
1272 struct target_ops hms_ops
=
1274 "hms", "Remote HMS monitor",
1275 "Use the H8 evaluation board running the HMS monitor connected\n\
1278 hms_open
, hms_close
,
1279 0, hms_detach
, hms_resume
, hms_wait
, /* attach */
1280 hms_fetch_register
, hms_store_register
,
1281 hms_prepare_to_store
,
1282 hms_xfer_inferior_memory
,
1284 hms_insert_breakpoint
, hms_remove_breakpoint
, /* Breakpoints */
1285 0, 0, 0, 0, 0, /* Terminal handling */
1286 hms_kill
, /* FIXME, kill */
1288 0, /* lookup_symbol */
1289 hms_create_inferior
, /* create_inferior */
1290 hms_mourn
, /* mourn_inferior FIXME */
1292 0, /* notice_signals */
1294 process_stratum
, 0, /* next */
1295 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
1296 0, 0, /* Section pointers */
1297 OPS_MAGIC
, /* Always the last thing */
1300 hms_quiet () /* FIXME - this routine can be removed after Dec '94 */
1304 printf_filtered ("Snoop disabled\n");
1306 printf_filtered ("Snoop enabled\n");
1308 printf_filtered ("`snoop' is obsolete, please use `set remotedebug'.\n");
1316 dev_name
= get_word (&s
);
1329 int newrate
= atoi (s
);
1332 if (SERIAL_SETBAUDRATE (desc
, newrate
))
1333 error ("Can't use %d baud\n", newrate
);
1335 printf_filtered ("Checking target is in sync\n");
1337 printf_filtered ("Sending commands to set target to %d\n",
1340 sprintf (buffer
, "tm %d. N 8 1", baudrate
);
1341 hms_write_cr (buffer
);
1345 /***********************************************************************/
1348 hms_drain (args
, fromtty
)
1355 c
= SERIAL_READCHAR (desc
, 1);
1356 if (c
== SERIAL_TIMEOUT
)
1358 if (c
== SERIAL_ERROR
)
1360 if (c
> ' ' && c
< 127)
1361 printf ("%c", c
& 0xff);
1363 printf ("<%x>", c
& 0xff);
1371 add_com ("hms_drain", class_obscure
, hms_drain
,
1372 "Drain pending hms text buffers.");
1378 extern struct cmd_list_element
*cmdlist
;
1379 delete_cmd ("hms-drain", &cmdlist
);
1384 _initialize_remote_hms ()
1386 add_target (&hms_ops
);
1388 add_com ("hms <command>", class_obscure
, hms_com
,
1389 "Send a command to the HMS monitor.");
1391 /* FIXME - hms_quiet and `snoop' can be removed after Dec '94 */
1392 add_com ("snoop", class_obscure
, hms_quiet
,
1393 "Show what commands are going to the monitor (OBSOLETE - see 'set remotedebug')");
1395 add_com ("device", class_obscure
, hms_device
,
1396 "Set the terminal line for HMS communications");
1398 add_com ("speed", class_obscure
, hms_speed
,
1399 "Set the terminal line speed for HMS communications");