aboutsummaryrefslogtreecommitdiff
path: root/gdb/monitor.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1995-02-24 05:09:37 +0000
committerStu Grossman <grossman@cygnus>1995-02-24 05:09:37 +0000
commit82fc34323433466bc79aabaf88fb4694dfa8138e (patch)
tree3b5555cf21c20d7255bfc563eba757052ca78a31 /gdb/monitor.c
parentb5f105b7eb49e29c9d3e8ab53a00ac16ddcfa1c2 (diff)
downloadgdb-82fc34323433466bc79aabaf88fb4694dfa8138e.zip
gdb-82fc34323433466bc79aabaf88fb4694dfa8138e.tar.gz
gdb-82fc34323433466bc79aabaf88fb4694dfa8138e.tar.bz2
* monitor.c (monitor_load_ascii_srec): Add a one second sleep
after send LOAD_CMD to prevent loss of first S-record.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r--gdb/monitor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 0a546f4..1f72153 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -692,9 +692,9 @@ monitor_close (quitting)
#if defined (LOG_FILE)
if (log_file) {
if (ferror(log_file))
- fprintf(stderr, "Error writing log file.\n");
+ printf_filtered ("Error writing log file.\n");
if (fclose(log_file) != 0)
- fprintf(stderr, "Error closing log file.\n");
+ printf_filtered ("Error closing log file.\n");
}
#endif
}
@@ -1436,6 +1436,7 @@ monitor_load_srec (args, protocol)
}
printf_monitor (LOAD_CMD); /* tell the monitor to load */
+ sleep (3);
if (protocol == XMODEM) { /* get the NAK from the target */
if (GETNAK) {
debuglogs (3, "Got the NAK to start loading");
@@ -1472,7 +1473,7 @@ monitor_load_srec (args, protocol)
} else { /* assume we got an ACK */
if (hashmark) {
putc_unfiltered ('#');
- fflush (gdb_stdout);
+ gdb_flush (gdb_stdout);
}
debuglogs (3, "Got an ACK, sending next packet");
break;
@@ -1487,7 +1488,7 @@ monitor_load_srec (args, protocol)
}
if (hashmark) {
putc_unfiltered ('#');
- fflush (gdb_stdout);
+ gdb_flush (gdb_stdout);
}
type = 3; /* switch to a 4 byte address record */
fflush (gdb_stdout);