1 /* Remote debugging interface for Motorola's MVME187BUG monitor, an embedded
4 Copyright 1992, 1993 Free Software Foundation, Inc.
5 Contributed by Cygnus Support. Written by K. Richard Pixley.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
45 /* External data declarations */
46 extern int stop_soon_quietly; /* for wait_for_inferior */
48 /* Forward data declarations */
49 extern struct target_ops bug_ops; /* Forward declaration */
51 /* Forward function declarations */
53 static int bug_clear_breakpoints PARAMS((void));
54 static void bug_close PARAMS((int quitting));
55 static void bug_write_cr PARAMS((char *string));
57 static int bug_read_inferior_memory PARAMS((CORE_ADDR memaddr,
58 unsigned char *myaddr,
61 static int bug_write_inferior_memory PARAMS((CORE_ADDR memaddr,
62 unsigned char *myaddr,
65 /* This is the serial descriptor to our target. */
67 static serial_t desc = NULL;
69 /* This is our data cache. */
71 static DCACHE *bug_dcache;
73 /* This variable is somewhat arbitrary. It's here so that it can be
74 set from within a running gdb. */
76 static int srec_max_retries = 3;
78 /* Each S-record download to the target consists of an S0 header
79 record, some number of S3 data records, and one S7 termination
80 record. I call this download a "frame". Srec_frame says how many
81 bytes will be represented in each frame. */
83 static int srec_frame = 160;
85 /* This variable determines how many bytes will be represented in each
88 static int srec_bytes = 40;
90 /* At one point it appeared to me as though the bug monitor could not
91 really be expected to receive two sequential characters at 9600
92 baud reliably. Echo-pacing is an attempt to force data across the
93 line even in this condition. Specifically, in echo-pace mode, each
94 character is sent one at a time and we look for the echo before
95 sending the next. This is excruciatingly slow. */
97 static int srec_echo_pace = 0;
99 /* How long to wait after an srec for a possible error message.
100 Similar to the above, I tried sleeping after sending each S3 record
101 in hopes that I might actually see error messages from the bug
102 monitor. This might actually work if we were to use sleep
103 intervals smaller than 1 second. */
105 static int srec_sleep = 0;
107 /* Every srec_noise records, flub the checksum. This is a debugging
108 feature. Set the variable to something other than 1 in order to
109 inject *deliberate* checksum errors. One might do this if one
110 wanted to test error handling and recovery. */
112 static int srec_noise = 0;
114 /***********************************************************************
115 * I/O stuff stolen from remote-eb.c
116 ***********************************************************************/
118 /* with a timeout of 2, we time out waiting for the prompt after an
120 static int timeout = 4;
122 static const char *dev_name;
124 /* Descriptor for I/O to remote machine. Initialize it to -1 so that
125 bug_open knows that we don't have a file open when the program
128 static int is_open = 0;
134 error ("remote device not open");
143 /* Read a character from the remote system, doing all the fancy
150 buf = SERIAL_READCHAR (desc, timeout);
152 if (buf == SERIAL_TIMEOUT)
153 error ("Timeout reading from remote system.");
166 buf = SERIAL_READCHAR (desc, timeout);
167 if (buf == SERIAL_TIMEOUT)
173 printf ("<timeout>");
184 buf = SERIAL_READCHAR (desc, 0);
185 if (buf == SERIAL_TIMEOUT)
191 printf ("<empty poll>");
196 /* Keep discarding input from the remote system, until STRING is found.
197 Let the user break out immediately. */
207 if (readchar () == *p)
221 /* Keep discarding input until we see the bug prompt.
223 The convention for dealing with the prompt is that you
225 o *then* wait for the prompt.
227 Thus the last thing that a procedure does with the serial line
228 will be an expect_prompt(). Exception: bug_resume does not
229 wait for the prompt, because the terminal is being handed over
230 to the inferior. However, the next thing which happens after that
231 is a bug_wait which does wait for the prompt.
232 Note that this includes abnormal exit, e.g. error(). This is
233 necessary to prevent getting into states from which we can't
241 /* Get a hex digit from the remote system & return its value.
242 If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
244 get_hex_digit (ignore_space)
252 if (ch >= '0' && ch <= '9')
254 else if (ch >= 'A' && ch <= 'F')
255 return ch - 'A' + 10;
256 else if (ch >= 'a' && ch <= 'f')
257 return ch - 'a' + 10;
258 else if (ch != ' ' || !ignore_space)
261 error ("Invalid hex digit from remote system.");
266 /* Get a byte from bug_desc and put it in *BYT. Accept any number
274 val = get_hex_digit (1) << 4;
275 val |= get_hex_digit (0);
279 /* Read a 32-bit hex word from the bug, preceded by a space */
287 for (j = 0; j < 8; j++)
288 val = (val << 4) + get_hex_digit (j == 0);
292 /* Called when SIGALRM signal sent due to alarm() timeout. */
294 /* Number of SIGTRAPs we need to simulate. That is, the next
295 NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
296 SIGTRAP without actually waiting for anything. */
298 static int need_artificial_trap = 0;
301 bug_kill (arg, from_tty)
309 * Download a file specified in 'args', to the bug.
313 bug_load (args, fromtty)
323 dcache_flush (bug_dcache);
325 abfd = bfd_openr (args, 0);
328 printf_filtered ("Unable to open file %s\n", args);
332 if (bfd_check_format (abfd, bfd_object) == 0)
334 printf_filtered ("File is not an object file\n");
339 while (s != (asection *) NULL)
341 if (s->flags & SEC_LOAD)
345 char *buffer = xmalloc (srec_frame);
347 printf_filtered ("%s\t: 0x%4x .. 0x%4x ", s->name, s->vma, s->vma + s->_raw_size);
349 for (i = 0; i < s->_raw_size; i += srec_frame)
351 if (srec_frame > s->_raw_size - i)
352 srec_frame = s->_raw_size - i;
354 bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
355 bug_write_inferior_memory (s->vma + i, buffer, srec_frame);
356 printf_filtered ("*");
359 printf_filtered ("\n");
364 sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
365 bug_write_cr (buffer);
369 /* This is called not only when we first attach, but also when the
370 user types "run" after having attached. */
372 bug_create_inferior (execfile, args, env)
380 error ("Can't pass arguments to remote bug process.");
382 if (execfile == 0 || exec_bfd == 0)
383 error ("No exec file specified");
385 entry_pt = (int) bfd_get_start_address (exec_bfd);
388 bug_kill (NULL, NULL);
389 bug_clear_breakpoints ();
390 init_wait_for_inferior ();
394 insert_breakpoints (); /* Needed to get correct instruction in cache */
395 proceed (entry_pt, -1, 0);
414 while (*s && !isspace (*s))
420 copy = xmalloc (len + 1);
421 memcpy (copy, word, len);
427 static int baudrate = 9600;
430 bug_open (name, from_tty)
434 push_target (&bug_ops);
442 dev_name = strdup (name);
444 if (!(desc = SERIAL_OPEN (dev_name)))
445 perror_with_name ((char *) dev_name);
450 bug_dcache = dcache_init (bug_read_inferior_memory, bug_write_inferior_memory);
452 /* Hello? Are you there? */
453 SERIAL_WRITE (desc, "\r", 1);
456 /* Clear any break points */
457 bug_clear_breakpoints ();
459 printf_filtered ("Connected to remote 187bug system.\n");
462 /* Close out all files and local state before this target loses control. */
468 /* Clear any break points */
469 bug_clear_breakpoints ();
477 /* Terminate the open connection to the remote debugger.
478 Use this when you want to detach and do something else
481 bug_detach (args, from_tty)
486 bug_clear_breakpoints ();
488 pop_target (); /* calls bug_close to do the real work */
491 printf_filtered ("Ending remote %s debugging\n", target_shortname);
494 /* Tell the remote machine to resume. */
497 bug_resume (pid, step, sig)
500 dcache_flush (bug_dcache);
506 /* Force the next bug_wait to return a trap. Not doing anything
507 about I/O from the target means that the user has to type
508 "continue" to see any. FIXME, this should be fixed. */
509 need_artificial_trap = 1;
517 /* Given a null terminated list of strings LIST, read the input until we find one of
518 them. Return the index of the string found or -1 on error. '?' means match
519 any single character. Note that with the algorithm we use, the initial
520 character of the string cannot recur in the string, or we will not find some
521 cases of the string in the input. If PASSTHROUGH is non-zero, then
522 pass non-matching data on. */
525 multi_scan (list, passthrough)
529 char *swallowed = NULL; /* holding area */
530 char *swallowed_p = swallowed; /* Current position in swallowed. */
538 /* Look through the strings. Count them. Find the largest one so we can
539 allocate a holding area. */
541 for (max_length = string_count = i = 0;
545 int length = strlen(list[i]);
547 if (length > max_length)
551 /* if we have no strings, then something is wrong. */
552 if (string_count == 0)
555 /* otherwise, we will need a holding area big enough to hold almost two
556 copies of our largest string. */
557 swallowed_p = swallowed = alloca(max_length << 1);
559 /* and a list of pointers to current scan points. */
560 plist = alloca(string_count * sizeof(*plist));
563 for (i = 0; i < string_count; ++i)
566 for (ch = readchar(); /* loop forever */ ; ch = readchar())
568 QUIT; /* Let user quit and leave process running */
571 for (i = 0; i < string_count; ++i)
573 if (ch == *plist[i] || *plist[i] == '?')
576 if (*plist[i] == '\0')
592 /* Print out any characters which have been swallowed. */
595 for (p = swallowed; p < swallowed_p; ++p)
601 swallowed_p = swallowed;
608 /* Wait until the remote machine stops, then return,
609 storing status in STATUS just as `wait' would. */
611 static char *wait_strings[] = {
613 "Exception: Data Access Fault (Local Bus Timeout)",
622 int old_timeout = timeout;
623 int old_immediate_quit = immediate_quit;
625 WSETEXIT ((*status), 0);
627 /* read off leftovers from resume so that the rest can be passed
628 back out as stdout. */
629 if (need_artificial_trap == 0)
631 expect("Effective address: ");
632 (void) get_hex_word();
636 timeout = -1; /* Don't time out -- user program is running. */
637 immediate_quit = 1; /* Helps ability to QUIT */
639 switch (multi_scan(wait_strings, need_artificial_trap == 0))
641 case 0: /* breakpoint case */
642 WSETSTOP ((*status), SIGTRAP);
643 /* user output from the target can be discarded here. (?) */
647 case 1: /* bus error */
648 WSETSTOP ((*status), SIGBUS);
649 /* user output from the target can be discarded here. (?) */
653 case 2: /* normal case */
654 if (need_artificial_trap != 0)
657 WSETSTOP ((*status), SIGTRAP);
658 need_artificial_trap--;
664 WSETEXIT ((*status), 0);
668 case -1: /* trouble */
670 fprintf_filtered (stderr,
671 "Trouble reading target during wait\n");
675 timeout = old_timeout;
676 immediate_quit = old_immediate_quit;
680 /* Return the name of register number REGNO
681 in the form input and output by bug.
683 Returns a pointer to a static buffer containing the answer. */
688 static char *rn[] = {
689 "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
690 "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
691 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
692 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
694 /* these get confusing because we omit a few and switch some ordering around. */
696 "cr01", /* 32 = psr */
697 "fcr62", /* 33 = fpsr*/
698 "fcr63", /* 34 = fpcr */
699 "ip", /* this is something of a cheat. */
701 "cr05", /* 36 = snip */
702 "cr06", /* 37 = sfip */
715 SERIAL_WRITE (desc, a, l);
718 for (i = 0; i < l; i++)
730 bug_write (s, strlen (s));
735 #if 0 /* not currently used */
736 /* Read from remote while the input matches STRING. Return zero on
737 success, -1 on failure. */
751 printf("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
761 bug_srec_write_cr (s)
773 SERIAL_WRITE(desc, p, 1);
774 while (readchar_nofail() != *p);
779 /* return(bug_scan (s) || bug_scan ("\n")); */
785 /* Store register REGNO, or all if REGNO == -1. */
788 bug_fetch_register(regno)
791 REGISTER_TYPE regval;
798 for (i = 0; i < NUM_REGS; ++i)
799 bug_fetch_register(i);
804 bug_write_cr(get_reg_name(regno));
806 regval = get_hex_word();
809 /* the following registers contain flag bits in the lower to bit slots.
811 if (regno == PC_REGNUM /* aka sxip */
812 || regno == NPC_REGNUM /* aka snip */
813 || regno == SFIP_REGNUM) /* aka sfip */
816 supply_register(regno, (char *) ®val);
822 /* Store register REGNO, or all if REGNO == -1. */
825 bug_store_register (regno)
835 for (i = 0; i < NUM_REGS; ++i)
836 bug_store_register(i);
842 regname = (get_reg_name(regno));
844 sprintf(buffer, "rs %s %08x",
846 read_register(regno));
848 bug_write_cr(buffer);
855 /* Get ready to modify the registers array. On machines which store
856 individual registers, this doesn't need to do anything. On machines
857 which store all the registers in one fell swoop, this makes sure
858 that registers contains all the registers from the program being
862 bug_prepare_to_store ()
864 /* Do nothing, since we can store individual regs */
867 /* Read a word from remote address ADDR and return it.
868 * This goes through the data cache.
871 bug_fetch_word (addr)
874 return dcache_fetch (bug_dcache, addr);
877 /* Write a word WORD into remote address ADDR.
878 This goes through the data cache. */
881 bug_store_word (addr, word)
885 dcache_poke (bug_dcache, addr, word);
889 bug_xfer_inferior_memory (memaddr, myaddr, len, write, target)
894 struct target_ops *target; /* ignored */
898 /* Round starting address down to longword boundary. */
899 register CORE_ADDR addr;
901 /* Round ending address up; get number of longwords that makes. */
904 /* Allocate buffer of that many longwords. */
905 register int *buffer;
907 addr = memaddr & -sizeof (int);
908 count = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
910 buffer = (int *) alloca (count * sizeof (int));
914 /* Fill start and end extra bytes of buffer with existing memory data. */
916 if (addr != memaddr || len < (int) sizeof (int))
918 /* Need part of initial word -- fetch it. */
919 buffer[0] = bug_fetch_word (addr);
922 if (count > 1) /* FIXME, avoid if even boundary */
925 = bug_fetch_word (addr + (count - 1) * sizeof (int));
928 /* Copy data to be written over corresponding part of buffer */
930 memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
932 /* Write the entire buffer. */
934 for (i = 0; i < count; i++, addr += sizeof (int))
937 bug_store_word (addr, buffer[i]);
948 /* Read all the longwords */
949 for (i = 0; i < count; i++, addr += sizeof (int))
952 buffer[i] = bug_fetch_word (addr);
960 /* Copy appropriate bytes out of the buffer. */
961 memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
972 command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
974 bug_write_cr (command);
977 bug_srec_write_cr ("S0030000FC");
981 /* This is an extremely vulnerable and fragile function. I've made
982 considerable attempts to make this deterministic, but I've
983 certainly forgotten something. The trouble is that S-records are
984 only a partial file format, not a protocol. Worse, apparently the
985 m88k bug monitor does not run in real time while receiving
986 S-records. Hence, we must pay excruciating attention to when and
987 where error messages are returned, and what has actually been sent.
989 Each call represents a chunk of memory to be sent to the target.
990 We break that chunk into an S0 header record, some number of S3
991 data records each containing srec_bytes, and an S7 termination
994 static char *srecord_strings[] = {
1001 bug_write_inferior_memory (memaddr, myaddr, len)
1003 unsigned char *myaddr;
1010 char buffer[(srec_bytes + 8) << 1];
1018 if (retries > srec_max_retries)
1024 printf("\n<retrying...>\n");
1026 /* This expect_prompt call is extremely important. Without
1027 it, we will tend to resend our packet so fast that it
1028 will arrive before the bug monitor is ready to receive
1029 it. This would lead to a very ugly resend loop. */
1044 thisgo = len - done;
1045 if (thisgo > srec_bytes)
1046 thisgo = srec_bytes;
1048 address = memaddr + done;
1049 sprintf (buf, "S3%02X%08X", thisgo + 4 + 1, address);
1052 checksum += (thisgo + 4 + 1
1054 + ((address >> 8) & 0xff)
1055 + ((address >> 16) & 0xff)
1056 + ((address >> 24) & 0xff));
1058 for (idx = 0; idx < thisgo; idx++)
1060 sprintf (buf, "%02X", myaddr[idx + done]);
1061 checksum += myaddr[idx + done];
1067 /* FIXME-NOW: insert a deliberate error every now and then.
1068 This is intended for testing/debugging the error handling
1070 static int counter = 0;
1071 if (++counter > srec_noise)
1078 sprintf(buf, "%02X", ~checksum & 0xff);
1079 bug_srec_write_cr (buffer);
1081 if (srec_sleep != 0)
1084 /* This pollchar is probably redundant to the multi_scan
1085 below. Trouble is, we can't be sure when or where an
1086 error message will appear. Apparently, when running at
1087 full speed from a typical sun4, error messages tend to
1088 appear to arrive only *after* the s7 record. */
1090 if ((x = pollchar()) != 0)
1093 printf("\n<retrying...>\n");
1097 /* flush any remaining input and verify that we are back
1098 at the prompt level. */
1100 /* start all over again. */
1109 bug_srec_write_cr("S7060000000000F9");
1112 /* Having finished the load, we need to figure out whether we
1114 } while (multi_scan(srecord_strings, 0) == 0);;
1122 char *file = "nothing";
1125 file = bfd_get_filename (exec_bfd);
1129 printf_filtered ("\tAttached to DOS asynctsr and running program %s\n", file);
1131 printf_filtered ("\tAttached to %s at %d baud and running program %s\n", dev_name, baudrate, file);
1133 printf_filtered ("\ton an m88k processor.\n");
1136 /* Copy LEN bytes of data from debugger memory at MYADDR
1137 to inferior's memory at MEMADDR. Returns errno value.
1138 * sb/sh instructions don't work on unaligned addresses, when TU=1.
1141 /* Read LEN bytes from inferior memory at MEMADDR. Put the result
1142 at debugger address MYADDR. Returns errno value. */
1144 bug_read_inferior_memory (memaddr, myaddr, len)
1146 unsigned char *myaddr;
1155 unsigned int inaddr;
1156 unsigned int checksum;
1158 sprintf(request, "du 0 %x:&%d", memaddr, len);
1159 bug_write_cr(request);
1161 p = buffer = alloca(len);
1163 /* scan up through the header */
1164 expect("S0030000FC");
1166 while (p < buffer + len)
1168 /* scan off any white space. */
1169 while (readchar() != 'S') ;;
1171 /* what kind of s-rec? */
1174 /* scan record size */
1175 get_hex_byte(&size);
1189 inaddr = (inaddr << 8) + c;
1192 /* intentional fall through */
1195 inaddr = (inaddr << 8) + c;
1198 /* intentional fall through */
1201 inaddr = (inaddr << 8) + c;
1205 inaddr = (inaddr << 8) + c;
1212 error("reading s-records.");
1215 if (inaddr < memaddr
1216 || (memaddr + len) < (inaddr + size))
1217 error("srec out of memory range.");
1219 if (p != buffer + inaddr - memaddr)
1220 error("srec out of sequence.");
1222 for (; size; --size, ++p)
1229 if (c != (~checksum & 0xff))
1230 error("bad s-rec checksum");
1235 if (p != buffer + len)
1238 memcpy(myaddr, buffer, len);
1242 #define MAX_BREAKS 16
1243 static int num_brkpts = 0;
1245 bug_insert_breakpoint (addr, save)
1247 char *save; /* Throw away, let bug save instructions */
1251 if (num_brkpts < MAX_BREAKS)
1256 sprintf (buffer, "br %x", addr);
1257 bug_write_cr (buffer);
1263 fprintf_filtered (stderr,
1264 "Too many break points, break point not installed\n");
1270 bug_remove_breakpoint (addr, save)
1272 char *save; /* Throw away, let bug save instructions */
1279 sprintf (buffer, "nobr %x", addr);
1280 bug_write_cr (buffer);
1287 /* Clear the bugs notion of what the break points are */
1289 bug_clear_breakpoints ()
1294 bug_write_cr ("nobr");
1305 bug_clear_breakpoints ();
1306 generic_mourn_inferior ();
1309 /* Put a command string, in args, out to the bug. The bug is assumed to
1310 be in raw mode, all writing/reading done through desc.
1311 Ouput from the bug is placed on the users terminal until the
1312 prompt from the bug is seen.
1313 FIXME: Can't handle commands that take input. */
1316 bug_com (args, fromtty)
1325 /* Clear all input so only command relative output is displayed */
1327 bug_write_cr (args);
1328 bug_write ("\030", 1);
1333 bug_device (args, fromtty)
1338 dev_name = get_word (&args);
1353 int newrate = atoi (s);
1356 if (SERIAL_SETBAUDRATE (desc, newrate))
1357 error ("Can't use %d baud\n", newrate);
1359 printf_filtered ("Checking target is in sync\n");
1361 printf_filtered ("Sending commands to set target to %d\n",
1364 sprintf (buffer, "tm %d. N 8 1", baudrate);
1365 bug_write_cr (buffer);
1370 struct target_ops bug_ops =
1372 "bug", "Remote BUG monitor",
1373 "Use the mvme187 board running the BUG monitor connected\n\
1376 bug_open, bug_close,
1377 0, bug_detach, bug_resume, bug_wait, /* attach */
1378 bug_fetch_register, bug_store_register,
1379 bug_prepare_to_store,
1380 bug_xfer_inferior_memory,
1382 bug_insert_breakpoint, bug_remove_breakpoint, /* Breakpoints */
1383 0, 0, 0, 0, 0, /* Terminal handling */
1384 bug_kill, /* FIXME, kill */
1386 0, /* lookup_symbol */
1387 bug_create_inferior, /* create_inferior */
1388 bug_mourn, /* mourn_inferior FIXME */
1390 0, /* notice_signals */
1391 process_stratum, 0, /* next */
1392 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
1393 0, 0, /* Section pointers */
1394 OPS_MAGIC, /* Always the last thing */
1398 _initialize_remote_bug ()
1400 add_target (&bug_ops);
1402 add_com ("bug <command>", class_obscure, bug_com,
1403 "Send a command to the BUG monitor.");
1405 add_com ("device", class_obscure, bug_device,
1406 "Set the terminal line for BUG communications");
1409 add_com ("speed", class_obscure, bug_speed,
1410 "Set the terminal line speed for BUG communications");
1414 (add_set_cmd ("srec-bytes", class_support, var_uinteger,
1415 (char *) &srec_bytes,
1417 Set the number of bytes represented in each S-record.\n\
1418 This affects the communication protocol with the remote target.",
1423 (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
1424 (char *) &srec_max_retries,
1426 Set the number of retries for shipping S-records.\n\
1427 This affects the communication protocol with the remote target.",
1432 (add_set_cmd ("srec-frame", class_support, var_uinteger,
1433 (char *) &srec_frame,
1435 Set the number of bytes in an S-record frame.\n\
1436 This affects the communication protocol with the remote target.",
1441 (add_set_cmd ("srec-noise", class_support, var_zinteger,
1442 (char *) &srec_noise,
1444 Set number of S-record to send before deliberately flubbing a checksum.\n\
1445 Zero means flub none at all. This affects the communication protocol\n\
1446 with the remote target.",
1451 (add_set_cmd ("srec-sleep", class_support, var_zinteger,
1452 (char *) &srec_sleep,
1454 Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
1455 This affects the communication protocol with the remote target.",
1460 (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
1461 (char *) &srec_echo_pace,
1463 Set echo-verification.\n\
1464 When on, use verification by echo when downloading S-records. This is\n\
1465 much slower, but generally more reliable.",