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. */
46 /* External data declarations */
47 extern int stop_soon_quietly; /* for wait_for_inferior */
49 /* Forward data declarations */
50 extern struct target_ops bug_ops; /* Forward declaration */
52 /* Forward function declarations */
54 static int bug_clear_breakpoints PARAMS((void));
55 static void bug_close PARAMS((int quitting));
56 static void bug_write_cr PARAMS((char *string));
58 static int bug_read_inferior_memory PARAMS((CORE_ADDR memaddr,
59 unsigned char *myaddr,
62 static int bug_write_inferior_memory PARAMS((CORE_ADDR memaddr,
63 unsigned char *myaddr,
66 /* This is the serial descriptor to our target. */
68 static serial_t desc = NULL;
70 /* This is our data cache. */
72 static DCACHE *bug_dcache;
74 /* This variable is somewhat arbitrary. It's here so that it can be
75 set from within a running gdb. */
77 static int srec_max_retries = 3;
79 /* Each S-record download to the target consists of an S0 header
80 record, some number of S3 data records, and one S7 termination
81 record. I call this download a "frame". Srec_frame says how many
82 bytes will be represented in each frame. */
84 static int srec_frame = 160;
86 /* This variable determines how many bytes will be represented in each
89 static int srec_bytes = 40;
91 /* At one point it appeared to me as though the bug monitor could not
92 really be expected to receive two sequential characters at 9600
93 baud reliably. Echo-pacing is an attempt to force data across the
94 line even in this condition. Specifically, in echo-pace mode, each
95 character is sent one at a time and we look for the echo before
96 sending the next. This is excruciatingly slow. */
98 static int srec_echo_pace = 0;
100 /* How long to wait after an srec for a possible error message.
101 Similar to the above, I tried sleeping after sending each S3 record
102 in hopes that I might actually see error messages from the bug
103 monitor. This might actually work if we were to use sleep
104 intervals smaller than 1 second. */
106 static int srec_sleep = 0;
108 /* Every srec_noise records, flub the checksum. This is a debugging
109 feature. Set the variable to something other than 1 in order to
110 inject *deliberate* checksum errors. One might do this if one
111 wanted to test error handling and recovery. */
113 static int srec_noise = 0;
115 /***********************************************************************
116 * I/O stuff stolen from remote-eb.c
117 ***********************************************************************/
119 /* with a timeout of 2, we time out waiting for the prompt after an
121 static int timeout = 4;
123 static const char *dev_name;
125 /* Descriptor for I/O to remote machine. Initialize it to -1 so that
126 bug_open knows that we don't have a file open when the program
129 static int is_open = 0;
135 error ("remote device not open");
144 /* Read a character from the remote system, doing all the fancy
151 buf = SERIAL_READCHAR (desc, timeout);
153 if (buf == SERIAL_TIMEOUT)
154 error ("Timeout reading from remote system.");
167 buf = SERIAL_READCHAR (desc, timeout);
168 if (buf == SERIAL_TIMEOUT)
174 printf ("<timeout>");
185 buf = SERIAL_READCHAR (desc, 0);
186 if (buf == SERIAL_TIMEOUT)
192 printf ("<empty poll>");
197 /* Keep discarding input from the remote system, until STRING is found.
198 Let the user break out immediately. */
208 if (readchar () == *p)
222 /* Keep discarding input until we see the bug prompt.
224 The convention for dealing with the prompt is that you
226 o *then* wait for the prompt.
228 Thus the last thing that a procedure does with the serial line
229 will be an expect_prompt(). Exception: bug_resume does not
230 wait for the prompt, because the terminal is being handed over
231 to the inferior. However, the next thing which happens after that
232 is a bug_wait which does wait for the prompt.
233 Note that this includes abnormal exit, e.g. error(). This is
234 necessary to prevent getting into states from which we can't
242 /* Get a hex digit from the remote system & return its value.
243 If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
245 get_hex_digit (ignore_space)
253 if (ch >= '0' && ch <= '9')
255 else if (ch >= 'A' && ch <= 'F')
256 return ch - 'A' + 10;
257 else if (ch >= 'a' && ch <= 'f')
258 return ch - 'a' + 10;
259 else if (ch != ' ' || !ignore_space)
262 error ("Invalid hex digit from remote system.");
267 /* Get a byte from bug_desc and put it in *BYT. Accept any number
275 val = get_hex_digit (1) << 4;
276 val |= get_hex_digit (0);
280 /* Read a 32-bit hex word from the bug, preceded by a space */
288 for (j = 0; j < 8; j++)
289 val = (val << 4) + get_hex_digit (j == 0);
293 /* Called when SIGALRM signal sent due to alarm() timeout. */
295 /* Number of SIGTRAPs we need to simulate. That is, the next
296 NEED_ARTIFICIAL_TRAP calls to bug_wait should just return
297 SIGTRAP without actually waiting for anything. */
299 static int need_artificial_trap = 0;
302 bug_kill (arg, from_tty)
310 * Download a file specified in 'args', to the bug.
314 bug_load (args, fromtty)
324 dcache_flush (bug_dcache);
326 abfd = bfd_openr (args, 0);
329 printf_filtered ("Unable to open file %s\n", args);
333 if (bfd_check_format (abfd, bfd_object) == 0)
335 printf_filtered ("File is not an object file\n");
340 while (s != (asection *) NULL)
342 if (s->flags & SEC_LOAD)
346 char *buffer = xmalloc (srec_frame);
348 printf_filtered ("%s\t: 0x%4x .. 0x%4x ", s->name, s->vma, s->vma + s->_raw_size);
350 for (i = 0; i < s->_raw_size; i += srec_frame)
352 if (srec_frame > s->_raw_size - i)
353 srec_frame = s->_raw_size - i;
355 bfd_get_section_contents (abfd, s, buffer, i, srec_frame);
356 bug_write_inferior_memory (s->vma + i, buffer, srec_frame);
357 printf_filtered ("*");
360 printf_filtered ("\n");
365 sprintf (buffer, "rs ip %lx", (unsigned long) abfd->start_address);
366 bug_write_cr (buffer);
370 /* This is called not only when we first attach, but also when the
371 user types "run" after having attached. */
373 bug_create_inferior (execfile, args, env)
381 error ("Can't pass arguments to remote bug process.");
383 if (execfile == 0 || exec_bfd == 0)
384 error ("No exec file specified");
386 entry_pt = (int) bfd_get_start_address (exec_bfd);
389 bug_kill (NULL, NULL);
390 bug_clear_breakpoints ();
391 init_wait_for_inferior ();
395 insert_breakpoints (); /* Needed to get correct instruction in cache */
396 proceed (entry_pt, -1, 0);
415 while (*s && !isspace (*s))
421 copy = xmalloc (len + 1);
422 memcpy (copy, word, len);
428 static int baudrate = 9600;
431 bug_open (name, from_tty)
435 push_target (&bug_ops);
443 dev_name = strdup (name);
445 if (!(desc = SERIAL_OPEN (dev_name)))
446 perror_with_name ((char *) dev_name);
451 bug_dcache = dcache_init (bug_read_inferior_memory, bug_write_inferior_memory);
453 /* Hello? Are you there? */
454 SERIAL_WRITE (desc, "\r", 1);
457 /* Clear any break points */
458 bug_clear_breakpoints ();
460 printf_filtered ("Connected to remote 187bug system.\n");
463 /* Close out all files and local state before this target loses control. */
469 /* Clear any break points */
470 bug_clear_breakpoints ();
478 /* Terminate the open connection to the remote debugger.
479 Use this when you want to detach and do something else
482 bug_detach (args, from_tty)
487 bug_clear_breakpoints ();
489 pop_target (); /* calls bug_close to do the real work */
492 printf_filtered ("Ending remote %s debugging\n", target_shortname);
495 /* Tell the remote machine to resume. */
498 bug_resume (pid, step, sig)
501 dcache_flush (bug_dcache);
507 /* Force the next bug_wait to return a trap. Not doing anything
508 about I/O from the target means that the user has to type
509 "continue" to see any. FIXME, this should be fixed. */
510 need_artificial_trap = 1;
518 /* Given a null terminated list of strings LIST, read the input until we find one of
519 them. Return the index of the string found or -1 on error. '?' means match
520 any single character. Note that with the algorithm we use, the initial
521 character of the string cannot recur in the string, or we will not find some
522 cases of the string in the input. If PASSTHROUGH is non-zero, then
523 pass non-matching data on. */
526 multi_scan (list, passthrough)
530 char *swallowed = NULL; /* holding area */
531 char *swallowed_p = swallowed; /* Current position in swallowed. */
539 /* Look through the strings. Count them. Find the largest one so we can
540 allocate a holding area. */
542 for (max_length = string_count = i = 0;
546 int length = strlen(list[i]);
548 if (length > max_length)
552 /* if we have no strings, then something is wrong. */
553 if (string_count == 0)
556 /* otherwise, we will need a holding area big enough to hold almost two
557 copies of our largest string. */
558 swallowed_p = swallowed = alloca(max_length << 1);
560 /* and a list of pointers to current scan points. */
561 plist = alloca(string_count * sizeof(*plist));
564 for (i = 0; i < string_count; ++i)
567 for (ch = readchar(); /* loop forever */ ; ch = readchar())
569 QUIT; /* Let user quit and leave process running */
572 for (i = 0; i < string_count; ++i)
574 if (ch == *plist[i] || *plist[i] == '?')
577 if (*plist[i] == '\0')
593 /* Print out any characters which have been swallowed. */
596 for (p = swallowed; p < swallowed_p; ++p)
602 swallowed_p = swallowed;
609 /* Wait until the remote machine stops, then return,
610 storing status in STATUS just as `wait' would. */
612 static char *wait_strings[] = {
614 "Exception: Data Access Fault (Local Bus Timeout)",
623 int old_timeout = timeout;
624 int old_immediate_quit = immediate_quit;
626 WSETEXIT ((*status), 0);
628 /* read off leftovers from resume so that the rest can be passed
629 back out as stdout. */
630 if (need_artificial_trap == 0)
632 expect("Effective address: ");
633 (void) get_hex_word();
637 timeout = -1; /* Don't time out -- user program is running. */
638 immediate_quit = 1; /* Helps ability to QUIT */
640 switch (multi_scan(wait_strings, need_artificial_trap == 0))
642 case 0: /* breakpoint case */
643 WSETSTOP ((*status), SIGTRAP);
644 /* user output from the target can be discarded here. (?) */
648 case 1: /* bus error */
649 WSETSTOP ((*status), SIGBUS);
650 /* user output from the target can be discarded here. (?) */
654 case 2: /* normal case */
655 if (need_artificial_trap != 0)
658 WSETSTOP ((*status), SIGTRAP);
659 need_artificial_trap--;
665 WSETEXIT ((*status), 0);
669 case -1: /* trouble */
671 fprintf_filtered (stderr,
672 "Trouble reading target during wait\n");
676 timeout = old_timeout;
677 immediate_quit = old_immediate_quit;
681 /* Return the name of register number REGNO
682 in the form input and output by bug.
684 Returns a pointer to a static buffer containing the answer. */
689 static char *rn[] = {
690 "r00", "r01", "r02", "r03", "r04", "r05", "r06", "r07",
691 "r08", "r09", "r10", "r11", "r12", "r13", "r14", "r15",
692 "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
693 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
695 /* these get confusing because we omit a few and switch some ordering around. */
697 "cr01", /* 32 = psr */
698 "fcr62", /* 33 = fpsr*/
699 "fcr63", /* 34 = fpcr */
700 "ip", /* this is something of a cheat. */
702 "cr05", /* 36 = snip */
703 "cr06", /* 37 = sfip */
716 SERIAL_WRITE (desc, a, l);
719 for (i = 0; i < l; i++)
731 bug_write (s, strlen (s));
736 #if 0 /* not currently used */
737 /* Read from remote while the input matches STRING. Return zero on
738 success, -1 on failure. */
752 printf("\nNext character is '%c' - %d and s is \"%s\".\n", c, c, --s);
762 bug_srec_write_cr (s)
774 SERIAL_WRITE(desc, p, 1);
775 while (readchar_nofail() != *p);
780 /* return(bug_scan (s) || bug_scan ("\n")); */
786 /* Store register REGNO, or all if REGNO == -1. */
789 bug_fetch_register(regno)
792 REGISTER_TYPE regval;
799 for (i = 0; i < NUM_REGS; ++i)
800 bug_fetch_register(i);
805 bug_write_cr(get_reg_name(regno));
807 regval = get_hex_word();
810 /* the following registers contain flag bits in the lower to bit slots.
812 if (regno == PC_REGNUM /* aka sxip */
813 || regno == NPC_REGNUM /* aka snip */
814 || regno == SFIP_REGNUM) /* aka sfip */
817 supply_register(regno, (char *) ®val);
823 /* Store register REGNO, or all if REGNO == -1. */
826 bug_store_register (regno)
836 for (i = 0; i < NUM_REGS; ++i)
837 bug_store_register(i);
843 regname = (get_reg_name(regno));
845 sprintf(buffer, "rs %s %08x",
847 read_register(regno));
849 bug_write_cr(buffer);
856 /* Get ready to modify the registers array. On machines which store
857 individual registers, this doesn't need to do anything. On machines
858 which store all the registers in one fell swoop, this makes sure
859 that registers contains all the registers from the program being
863 bug_prepare_to_store ()
865 /* Do nothing, since we can store individual regs */
868 /* Read a word from remote address ADDR and return it.
869 * This goes through the data cache.
872 bug_fetch_word (addr)
875 return dcache_fetch (bug_dcache, addr);
878 /* Write a word WORD into remote address ADDR.
879 This goes through the data cache. */
882 bug_store_word (addr, word)
886 dcache_poke (bug_dcache, addr, word);
890 bug_xfer_inferior_memory (memaddr, myaddr, len, write, target)
895 struct target_ops *target; /* ignored */
899 /* Round starting address down to longword boundary. */
900 register CORE_ADDR addr;
902 /* Round ending address up; get number of longwords that makes. */
905 /* Allocate buffer of that many longwords. */
906 register int *buffer;
908 addr = memaddr & -sizeof (int);
909 count = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
911 buffer = (int *) alloca (count * sizeof (int));
915 /* Fill start and end extra bytes of buffer with existing memory data. */
917 if (addr != memaddr || len < (int) sizeof (int))
919 /* Need part of initial word -- fetch it. */
920 buffer[0] = bug_fetch_word (addr);
923 if (count > 1) /* FIXME, avoid if even boundary */
926 = bug_fetch_word (addr + (count - 1) * sizeof (int));
929 /* Copy data to be written over corresponding part of buffer */
931 bcopy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
933 /* Write the entire buffer. */
935 for (i = 0; i < count; i++, addr += sizeof (int))
938 bug_store_word (addr, buffer[i]);
949 /* Read all the longwords */
950 for (i = 0; i < count; i++, addr += sizeof (int))
953 buffer[i] = bug_fetch_word (addr);
961 /* Copy appropriate bytes out of the buffer. */
962 bcopy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
973 command = (srec_echo_pace ? "lo 0 ;x" : "lo 0");
975 bug_write_cr (command);
978 bug_srec_write_cr ("S0030000FC");
982 /* This is an extremely vulnerable and fragile function. I've made
983 considerable attempts to make this deterministic, but I've
984 certainly forgotten something. The trouble is that S-records are
985 only a partial file format, not a protocol. Worse, apparently the
986 m88k bug monitor does not run in real time while receiving
987 S-records. Hence, we must pay excruciating attention to when and
988 where error messages are returned, and what has actually been sent.
990 Each call represents a chunk of memory to be sent to the target.
991 We break that chunk into an S0 header record, some number of S3
992 data records each containing srec_bytes, and an S7 termination
995 static char *srecord_strings[] = {
1002 bug_write_inferior_memory (memaddr, myaddr, len)
1004 unsigned char *myaddr;
1011 char buffer[(srec_bytes + 8) << 1];
1019 if (retries > srec_max_retries)
1025 printf("\n<retrying...>\n");
1027 /* This expect_prompt call is extremely important. Without
1028 it, we will tend to resend our packet so fast that it
1029 will arrive before the bug monitor is ready to receive
1030 it. This would lead to a very ugly resend loop. */
1045 thisgo = len - done;
1046 if (thisgo > srec_bytes)
1047 thisgo = srec_bytes;
1049 address = memaddr + done;
1050 sprintf (buf, "S3%02X%08X", thisgo + 4 + 1, address);
1053 checksum += (thisgo + 4 + 1
1055 + ((address >> 8) & 0xff)
1056 + ((address >> 16) & 0xff)
1057 + ((address >> 24) & 0xff));
1059 for (idx = 0; idx < thisgo; idx++)
1061 sprintf (buf, "%02X", myaddr[idx + done]);
1062 checksum += myaddr[idx + done];
1068 /* FIXME-NOW: insert a deliberate error every now and then.
1069 This is intended for testing/debugging the error handling
1071 static int counter = 0;
1072 if (++counter > srec_noise)
1079 sprintf(buf, "%02X", ~checksum & 0xff);
1080 bug_srec_write_cr (buffer);
1082 if (srec_sleep != 0)
1085 /* This pollchar is probably redundant to the multi_scan
1086 below. Trouble is, we can't be sure when or where an
1087 error message will appear. Apparently, when running at
1088 full speed from a typical sun4, error messages tend to
1089 appear to arrive only *after* the s7 record. */
1091 if ((x = pollchar()) != 0)
1094 printf("\n<retrying...>\n");
1098 /* flush any remaining input and verify that we are back
1099 at the prompt level. */
1101 /* start all over again. */
1110 bug_srec_write_cr("S7060000000000F9");
1113 /* Having finished the load, we need to figure out whether we
1115 } while (multi_scan(srecord_strings, 0) == 0);;
1123 char *file = "nothing";
1126 file = bfd_get_filename (exec_bfd);
1130 printf_filtered ("\tAttached to DOS asynctsr and running program %s\n", file);
1132 printf_filtered ("\tAttached to %s at %d baud and running program %s\n", dev_name, baudrate, file);
1134 printf_filtered ("\ton an m88k processor.\n");
1137 /* Copy LEN bytes of data from debugger memory at MYADDR
1138 to inferior's memory at MEMADDR. Returns errno value.
1139 * sb/sh instructions don't work on unaligned addresses, when TU=1.
1142 /* Read LEN bytes from inferior memory at MEMADDR. Put the result
1143 at debugger address MYADDR. Returns errno value. */
1145 bug_read_inferior_memory (memaddr, myaddr, len)
1147 unsigned char *myaddr;
1156 unsigned int inaddr;
1157 unsigned int checksum;
1159 sprintf(request, "du 0 %x:&%d", memaddr, len);
1160 bug_write_cr(request);
1162 p = buffer = alloca(len);
1164 /* scan up through the header */
1165 expect("S0030000FC");
1167 while (p < buffer + len)
1169 /* scan off any white space. */
1170 while (readchar() != 'S') ;;
1172 /* what kind of s-rec? */
1175 /* scan record size */
1176 get_hex_byte(&size);
1190 inaddr = (inaddr << 8) + c;
1193 /* intentional fall through */
1196 inaddr = (inaddr << 8) + c;
1199 /* intentional fall through */
1202 inaddr = (inaddr << 8) + c;
1206 inaddr = (inaddr << 8) + c;
1213 error("reading s-records.");
1216 if (inaddr < memaddr
1217 || (memaddr + len) < (inaddr + size))
1218 error("srec out of memory range.");
1220 if (p != buffer + inaddr - memaddr)
1221 error("srec out of sequence.");
1223 for (; size; --size, ++p)
1230 if (c != (~checksum & 0xff))
1231 error("bad s-rec checksum");
1236 if (p != buffer + len)
1239 memcpy(myaddr, buffer, len);
1243 #define MAX_BREAKS 16
1244 static int num_brkpts = 0;
1246 bug_insert_breakpoint (addr, save)
1248 char *save; /* Throw away, let bug save instructions */
1252 if (num_brkpts < MAX_BREAKS)
1257 sprintf (buffer, "br %x", addr);
1258 bug_write_cr (buffer);
1264 fprintf_filtered (stderr,
1265 "Too many break points, break point not installed\n");
1271 bug_remove_breakpoint (addr, save)
1273 char *save; /* Throw away, let bug save instructions */
1280 sprintf (buffer, "nobr %x", addr);
1281 bug_write_cr (buffer);
1288 /* Clear the bugs notion of what the break points are */
1290 bug_clear_breakpoints ()
1295 bug_write_cr ("nobr");
1306 bug_clear_breakpoints ();
1307 generic_mourn_inferior ();
1310 /* Put a command string, in args, out to the bug. The bug is assumed to
1311 be in raw mode, all writing/reading done through desc.
1312 Ouput from the bug is placed on the users terminal until the
1313 prompt from the bug is seen.
1314 FIXME: Can't handle commands that take input. */
1317 bug_com (args, fromtty)
1326 /* Clear all input so only command relative output is displayed */
1328 bug_write_cr (args);
1329 bug_write ("\030", 1);
1334 bug_device (args, fromtty)
1339 dev_name = get_word (&args);
1354 int newrate = atoi (s);
1357 if (SERIAL_SETBAUDRATE (desc, newrate))
1358 error ("Can't use %d baud\n", newrate);
1360 printf_filtered ("Checking target is in sync\n");
1362 printf_filtered ("Sending commands to set target to %d\n",
1365 sprintf (buffer, "tm %d. N 8 1", baudrate);
1366 bug_write_cr (buffer);
1371 struct target_ops bug_ops =
1373 "bug", "Remote BUG monitor",
1374 "Use the mvme187 board running the BUG monitor connected\n\
1377 bug_open, bug_close,
1378 0, bug_detach, bug_resume, bug_wait, /* attach */
1379 bug_fetch_register, bug_store_register,
1380 bug_prepare_to_store,
1381 bug_xfer_inferior_memory,
1383 bug_insert_breakpoint, bug_remove_breakpoint, /* Breakpoints */
1384 0, 0, 0, 0, 0, /* Terminal handling */
1385 bug_kill, /* FIXME, kill */
1387 0, /* lookup_symbol */
1388 bug_create_inferior, /* create_inferior */
1389 bug_mourn, /* mourn_inferior FIXME */
1391 0, /* notice_signals */
1392 process_stratum, 0, /* next */
1393 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
1394 0, 0, /* Section pointers */
1395 OPS_MAGIC, /* Always the last thing */
1399 _initialize_remote_bug ()
1401 add_target (&bug_ops);
1403 add_com ("bug <command>", class_obscure, bug_com,
1404 "Send a command to the BUG monitor.");
1406 add_com ("device", class_obscure, bug_device,
1407 "Set the terminal line for BUG communications");
1410 add_com ("speed", class_obscure, bug_speed,
1411 "Set the terminal line speed for BUG communications");
1415 (add_set_cmd ("srec-bytes", class_support, var_uinteger,
1416 (char *) &srec_bytes,
1418 Set the number of bytes represented in each S-record.\n\
1419 This affects the communication protocol with the remote target.",
1424 (add_set_cmd ("srec-max-retries", class_support, var_uinteger,
1425 (char *) &srec_max_retries,
1427 Set the number of retries for shipping S-records.\n\
1428 This affects the communication protocol with the remote target.",
1433 (add_set_cmd ("srec-frame", class_support, var_uinteger,
1434 (char *) &srec_frame,
1436 Set the number of bytes in an S-record frame.\n\
1437 This affects the communication protocol with the remote target.",
1442 (add_set_cmd ("srec-noise", class_support, var_zinteger,
1443 (char *) &srec_noise,
1445 Set number of S-record to send before deliberately flubbing a checksum.\n\
1446 Zero means flub none at all. This affects the communication protocol\n\
1447 with the remote target.",
1452 (add_set_cmd ("srec-sleep", class_support, var_zinteger,
1453 (char *) &srec_sleep,
1455 Set number of seconds to sleep after an S-record for a possible error message to arrive.\n\
1456 This affects the communication protocol with the remote target.",
1461 (add_set_cmd ("srec-echo-pace", class_support, var_boolean,
1462 (char *) &srec_echo_pace,
1464 Set echo-verification.\n\
1465 When on, use verification by echo when downloading S-records. This is\n\
1466 much slower, but generally more reliable.",