From: Andrew Cagney Date: Sat, 17 Jun 2000 14:00:31 +0000 (+0000) Subject: Remove arbitrary printf output limit placed on pmon targets X-Git-Tag: readline-pre-41-import~166 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59d521c1795f3a42344b6986aafbe233a30bbc06;p=external%2Fbinutils.git Remove arbitrary printf output limit placed on pmon targets --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a064931..38619e6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +Sat Jun 17 16:00:56 2000 Andrew Cagney + + * remote-mips.c: Include + (mips_receive_header): Write printable characters to gdb_stdtarg + instead of gdb_stdlog. Only count non-printables as invalid. + (mips_syn_garbage): Reduce to 10. + Sat Jun 17 15:39:28 2000 Andrew Cagney * mips-tdep.c (mips_gdbarch_init): When the object file header diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c index 0b75e4c..7954f9e 100644 --- a/gdb/remote-mips.c +++ b/gdb/remote-mips.c @@ -36,6 +36,8 @@ #include #include +#include + /* Microsoft C's stat.h doesn't define all the POSIX file modes. */ #ifndef S_IROTH #define S_IROTH S_IREAD @@ -356,7 +358,7 @@ static int mips_send_retries = 10; /* The number of garbage characters to accept when looking for an SYN for the next packet. */ -static int mips_syn_garbage = 1050; +static int mips_syn_garbage = 10; /* The time to wait for a packet, in seconds. */ static int mips_receive_wait = 5; @@ -753,15 +755,26 @@ mips_receive_header (hdr, pgarbage, ch, timeout) { /* Printing the character here lets the user of gdb see what the program is outputting, if the debugging is - being done on the console port. Don't use _filtered; - we can't deal with a QUIT out of target_wait. */ - if (!mips_initializing || remote_debug > 0) - { - fputc_readable (ch, gdb_stdlog); - gdb_flush (gdb_stdlog); - } + being done on the console port. Don't use _filtered: + we can't deal with a QUIT out of target_wait and + buffered target output confuses the user. */ + if (!mips_initializing || remote_debug > 0) + { + if (isprint (ch) || isspace (ch)) + { + fputc_unfiltered (ch, gdb_stdtarg); + } + else + { + fputc_readable (ch, gdb_stdtarg); + } + gdb_flush (gdb_stdtarg); + } + + /* Only count unprintable characters. */ + if (! (isprint (ch) || isspace (ch))) + (*pgarbage) += 1; - ++*pgarbage; if (mips_syn_garbage > 0 && *pgarbage > mips_syn_garbage) mips_error ("Debug protocol failure: more than %d characters before a sync.",