aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-mips.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1996-01-09 00:37:35 +0000
committerStan Shebs <shebs@codesourcery.com>1996-01-09 00:37:35 +0000
commit1f2337586059fdc512ffd2b4145f11f454bb663f (patch)
tree4066601a1ee3cac6d0e2108678b021dfdbff6058 /gdb/remote-mips.c
parent3d015864852399a6a09457345b76a241072e78a8 (diff)
downloadgdb-1f2337586059fdc512ffd2b4145f11f454bb663f.zip
gdb-1f2337586059fdc512ffd2b4145f11f454bb663f.tar.gz
gdb-1f2337586059fdc512ffd2b4145f11f454bb663f.tar.bz2
* remote-mips.c (mips_receive_header): Recognize \012 instead
of \n, but write \n when program sends a \012. * ser-mac.c (mac_input_buffer): Increase size of buffer.
Diffstat (limited to 'gdb/remote-mips.c')
-rw-r--r--gdb/remote-mips.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index db3223b..2038410 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -498,11 +498,17 @@ mips_receive_header (hdr, pgarbage, ch, timeout)
we can't deal with a QUIT out of target_wait. */
if (! mips_initializing || remote_debug > 0)
{
- if (ch < 0x20 && ch != '\n')
+ /* Note that the host's idea of newline may not
+ correspond to the target's idea, so recognize
+ newline by its actual ASCII code, but write it
+ out using the \n notation. */
+ if (ch < 0x20 && ch != '\012')
{
putchar_unfiltered ('^');
putchar_unfiltered (ch + 0x40);
}
+ else if (ch == '\012')
+ putchar_unfiltered ('\n');
else
putchar_unfiltered (ch);
gdb_flush (gdb_stdout);