diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-06-17 14:00:31 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-06-17 14:00:31 +0000 |
commit | 59d521c1795f3a42344b6986aafbe233a30bbc06 (patch) | |
tree | 7239d2546d7fcacfa37b90d2b6f175673ccb6b9c | |
parent | 55d98a80d4df41739239f3c7af531ea6ae65d9fd (diff) | |
download | gdb-59d521c1795f3a42344b6986aafbe233a30bbc06.zip gdb-59d521c1795f3a42344b6986aafbe233a30bbc06.tar.gz gdb-59d521c1795f3a42344b6986aafbe233a30bbc06.tar.bz2 |
Remove arbitrary printf output limit placed on pmon targets
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/remote-mips.c | 31 |
2 files changed, 29 insertions, 9 deletions
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 <cagney@b1.cygnus.com> + + * remote-mips.c: Include <ctype.h> + (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 <cagney@b1.cygnus.com> * 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 <sys/types.h> #include <sys/stat.h> +#include <ctype.h> + /* 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.", |