From 82fc34323433466bc79aabaf88fb4694dfa8138e Mon Sep 17 00:00:00 2001 From: Stu Grossman Date: Fri, 24 Feb 1995 05:09:37 +0000 Subject: [PATCH] * monitor.c (monitor_load_ascii_srec): Add a one second sleep after send LOAD_CMD to prevent loss of first S-record. --- gdb/ChangeLog | 5 +++++ gdb/monitor.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9cdbb9e..f9a2ecd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 23 21:07:25 1995 Stu Grossman (grossman@cygnus.com) + + * monitor.c (monitor_load_ascii_srec): Add a one second sleep + after send LOAD_CMD to prevent loss of first S-record. + Tue Feb 21 20:48:42 1995 Per Bothner * valops.c (call_function_by_hand): Set using_gcc to 2 if gcc-2. 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); -- 2.7.4