diff options
author | Rob Savoye <rob@cygnus> | 1995-02-09 02:21:40 +0000 |
---|---|---|
committer | Rob Savoye <rob@cygnus> | 1995-02-09 02:21:40 +0000 |
commit | 151e7820c7460be261142e031fe35a7a193f8acd (patch) | |
tree | d336824e626ec81cbf6f1b55464e3e8cae1fcefa | |
parent | ce2349c52d0781d941027e209eafacef9462def6 (diff) | |
download | gdb-151e7820c7460be261142e031fe35a7a193f8acd.zip gdb-151e7820c7460be261142e031fe35a7a193f8acd.tar.gz gdb-151e7820c7460be261142e031fe35a7a193f8acd.tar.bz2 |
* monitor.c: Fix so all the output shows up in the GUI command
window.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/monitor.c | 44 |
2 files changed, 28 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bb3415a..ce96113 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Wed Feb 8 19:19:56 1995 Rob Savoye <rob@darkstar.cygnus.com> + + * monitor.c: Fix so all the output shows up in the GUI command + window. + Mon Feb 6 18:50:59 1995 Stan Shebs <shebs@andros.cygnus.com> * i386-tdep.c (_initialize_i386_tdep): Put void decl on separate diff --git a/gdb/monitor.c b/gdb/monitor.c index 7c6e3da..0a546f4 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -327,7 +327,7 @@ debuglogs(va_alist) *p = '\0'; /* terminate the string */ if (sr_get_debug() > level) - puts (newbuf); + printf_unfiltered ("%s\n", newbuf); #ifdef LOG_FILE /* write to the monitor log */ if (log_file != 0x0) { @@ -402,9 +402,12 @@ expect (string, discard) } } else { if (!discard) { + putc_unfiltered (c); +#if 0 fwrite(string, 1, (p - 1) - string, stdout); putchar((char)c); fflush(stdout); +#endif } p = string; } @@ -622,18 +625,19 @@ monitor_open(args, name, from_tty) SERIAL_RAW(monitor_desc); -#if !defined(__GO32__) && !defined(GDB_TARGET_IS_PA_ELF) /* some systems only work with 2 stop bits */ +#if !defined(__GO32__) && !defined(GDB_TARGET_IS_PA_ELF) if (STOPBITS == 2) { - temptempio = (TERMINAL *)SERIAL_GET_TTY_STATE(monitor_desc); + if (!strchr (dev_name, ':')) { /* don't set for a tcp connection */ + temptempio = (TERMINAL *)SERIAL_GET_TTY_STATE(monitor_desc); #ifdef HAVE_SGTTY - temptempio->sg_cflag |= baud_rate | CSTOPB; + temptempio->sg_cflag |= baud_rate | CSTOPB; #else - temptempio->c_cflag |= baud_rate | CSTOPB; -/*** temptempio->c_lflag |= ~0x00000008; turn off echo ***/ + temptempio->c_cflag |= baud_rate | CSTOPB; #endif - SERIAL_SET_TTY_STATE(monitor_desc, temptempio); - debuglogs (4, "Set serial port to 2 stop bits"); + SERIAL_SET_TTY_STATE(monitor_desc, temptempio); + debuglogs (4, "Set serial port to 2 stop bits"); + } } #endif /* __GO32__ */ @@ -1026,14 +1030,8 @@ monitor_write_inferior_memory (memaddr, myaddr, len) *p++ = num[7]; *p++ = ':'; /* add the colon delimeter */ for (j = 0; j < len; j++) { /* copy the data in after converting it */ -#if 0 - hexword2ascii (num, myaddr[j]); -#endif *p++ = tohex ((myaddr[j] >> 4) & 0xf); *p++ = tohex (myaddr[j] & 0xf); -#if 0 - strcpy ((buf+14)+(j * 2), num+6); -#endif } make_gdb_packet (packet, buf); @@ -1472,8 +1470,10 @@ monitor_load_srec (args, protocol) if (GETACK) /* ACKnowledged, get next data chunk */ break; } else { /* assume we got an ACK */ - if (hashmark) - printf_filtered ("#"); + if (hashmark) { + putc_unfiltered ('#'); + fflush (gdb_stdout); + } debuglogs (3, "Got an ACK, sending next packet"); break; } @@ -1485,10 +1485,12 @@ monitor_load_srec (args, protocol) } else { /* no protocols at all */ printf_monitor ("%s\n", srec); } - if (hashmark) - printf_filtered ("#"); + if (hashmark) { + putc_unfiltered ('#'); + fflush (gdb_stdout); + } type = 3; /* switch to a 4 byte address record */ - fflush (stdout); + fflush (gdb_stdout); } free (buffer); } else { @@ -1496,7 +1498,7 @@ monitor_load_srec (args, protocol) } s = s->next; } - printf_filtered ("\n"); + putc_unfiltered ('\n'); /* write a type 7 terminator record. no data for a type 7, @@ -1517,7 +1519,7 @@ monitor_load_srec (args, protocol) } if (hashmark) - putchar ('\n'); + putc_unfiltered ('\n'); expect_prompt (); } |