This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
More log message cleanups ....
- To: gdb-patches@sourceware.cygnus.com
- Subject: More log message cleanups ....
- From: Andrew Cagney <ac131313@cygnus.com>
- Date: Thu, 08 Jul 1999 01:19:30 +1000
- DJ-Gateway: from newsgroup cygnus.patches.gdb
- Newsgroups: cygnus.patches.gdb
- Organization: Cygnus Solutions
Just FYI,
I've checked in the attached which contains another round of log/debug
message cleanups. I've still plenty more to track down.
Andrew
Index: gnu-nat.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gnu-nat.h,v
retrieving revision 2.5
diff -p -r2.5 gnu-nat.h
*** gnu-nat.h 1999/04/02 23:11:56 2.5
--- gnu-nat.h 1999/07/07 15:15:25
*************** extern int gnu_debug_flag;
*** 85,90 ****
#define debug(msg, args...) \
do { if (gnu_debug_flag) \
! fprintf (stderr, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
#endif /* __GNU_NAT_H__ */
--- 85,90 ----
#define debug(msg, args...) \
do { if (gnu_debug_flag) \
! fprintf_unfiltered (gdb_stdlog, "%s: " msg "\r\n", __FUNCTION__ , ##args); } while (0)
#endif /* __GNU_NAT_H__ */
Index: parse.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/parse.c,v
retrieving revision 2.63
diff -p -r2.63 parse.c
*** parse.c 1999/06/08 10:07:39 2.63
--- parse.c 1999/07/07 15:15:28
*************** parse_exp_1 (stringptr, block, comma)
*** 1168,1180 ****
parser, to a prefix form. */
if (expressiondebug)
! dump_prefix_expression (expout, gdb_stdout,
"before conversion to prefix form");
prefixify_expression (expout);
if (expressiondebug)
! dump_postfix_expression (expout, gdb_stdout,
"after conversion to prefix form");
*stringptr = lexptr;
--- 1168,1180 ----
parser, to a prefix form. */
if (expressiondebug)
! dump_prefix_expression (expout, gdb_stdlog,
"before conversion to prefix form");
prefixify_expression (expout);
if (expressiondebug)
! dump_postfix_expression (expout, gdb_stdlog,
"after conversion to prefix form");
*stringptr = lexptr;
Index: remote-mips.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/remote-mips.c,v
retrieving revision 2.91
diff -p -r2.91 remote-mips.c
*** remote-mips.c 1999/04/02 23:11:57 2.91
--- remote-mips.c 1999/07/07 15:15:37
*************** mips_error (va_alist)
*** 523,541 ****
^x notation or in hex. */
static void
! putc_readable (ch)
int ch;
{
if (ch == '\n')
! putchar_unfiltered ('\n');
else if (ch == '\r')
! printf_unfiltered ("\\r");
else if (ch < 0x20) /* ASCII control character */
! printf_unfiltered ("^%c", ch + '@');
else if (ch >= 0x7f) /* non-ASCII characters (rubout or greater) */
! printf_unfiltered ("[%02x]", ch & 0xff);
else
! putchar_unfiltered (ch);
}
--- 523,542 ----
^x notation or in hex. */
static void
! fputc_readable (ch, file)
int ch;
+ struct gdb_file *file;
{
if (ch == '\n')
! fputc_unfiltered ('\n', file);
else if (ch == '\r')
! fprintf_unfiltered (file, "\\r");
else if (ch < 0x20) /* ASCII control character */
! fprintf_unfiltered (file, "^%c", ch + '@');
else if (ch >= 0x7f) /* non-ASCII characters (rubout or greater) */
! fprintf_unfiltered (file, "[%02x]", ch & 0xff);
else
! fputc_unfiltered (ch, file);
}
*************** putc_readable (ch)
*** 543,555 ****
^x notation or in hex. */
static void
! puts_readable (string)
char *string;
{
int c;
while ((c = *string++) != '\0')
! putc_readable (c);
}
--- 544,557 ----
^x notation or in hex. */
static void
! fputs_readable (string, file)
char *string;
+ struct gdb_file *file;
{
int c;
while ((c = *string++) != '\0')
! fputc_readable (c, file);
}
*************** mips_expect_timeout (string, timeout)
*** 566,574 ****
if (remote_debug)
{
! printf_unfiltered ("Expected \"");
! puts_readable (string);
! printf_unfiltered ("\", got \"");
}
immediate_quit = 1;
--- 568,576 ----
if (remote_debug)
{
! fprintf_unfiltered (gdb_stdlog, "Expected \"");
! fputs_readable (string, gdb_stdlog);
! fprintf_unfiltered (gdb_stdlog, "\", got \"");
}
immediate_quit = 1;
*************** mips_expect_timeout (string, timeout)
*** 584,595 ****
if (c == SERIAL_TIMEOUT)
{
if (remote_debug)
! printf_unfiltered ("\": FAIL\n");
return 0;
}
if (remote_debug)
! putc_readable (c);
if (c == *p++)
{
--- 586,597 ----
if (c == SERIAL_TIMEOUT)
{
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "\": FAIL\n");
return 0;
}
if (remote_debug)
! fputc_readable (c, gdb_stdlog);
if (c == *p++)
{
*************** mips_expect_timeout (string, timeout)
*** 597,603 ****
{
immediate_quit = 0;
if (remote_debug)
! printf_unfiltered ("\": OK\n");
return 1;
}
}
--- 599,605 ----
{
immediate_quit = 0;
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "\": OK\n");
return 1;
}
}
*************** mips_readchar (timeout)
*** 699,707 ****
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (ch != SERIAL_TIMEOUT)
! printf_unfiltered ("Read '%c' %d 0x%x\n", ch, ch, ch);
else
! printf_unfiltered ("Timed out in read\n");
}
/* If we have seen mips_monitor_prompt and we either time out, or
--- 701,709 ----
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (ch != SERIAL_TIMEOUT)
! fprintf_unfiltered (gdb_stdlog, "Read '%c' %d 0x%x\n", ch, ch, ch);
else
! fprintf_unfiltered (gdb_stdlog, "Timed out in read\n");
}
/* If we have seen mips_monitor_prompt and we either time out, or
*************** mips_readchar (timeout)
*** 717,723 ****
if (remote_debug > 0)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
! printf_unfiltered ("Reinitializing MIPS debugging mode\n");
mips_need_reply = 0;
mips_initialize ();
--- 719,725 ----
if (remote_debug > 0)
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
! fprintf_unfiltered (gdb_stdlog, "Reinitializing MIPS debugging mode\n");
mips_need_reply = 0;
mips_initialize ();
*************** mips_receive_header (hdr, pgarbage, ch,
*** 771,778 ****
we can't deal with a QUIT out of target_wait. */
if (! mips_initializing || remote_debug > 0)
{
! putc_readable (ch);
! gdb_flush (gdb_stdout);
}
++*pgarbage;
--- 773,780 ----
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);
}
++*pgarbage;
*************** mips_send_packet (s, get_ack)
*** 907,913 ****
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
packet[HDR_LENGTH + len + TRLR_LENGTH] = '\0';
! printf_unfiltered ("Writing \"%s\"\n", packet + 1);
}
if (SERIAL_WRITE (mips_desc, packet,
--- 909,915 ----
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
packet[HDR_LENGTH + len + TRLR_LENGTH] = '\0';
! fprintf_unfiltered (gdb_stdlog, "Writing \"%s\"\n", packet + 1);
}
if (SERIAL_WRITE (mips_desc, packet,
*************** mips_send_packet (s, get_ack)
*** 997,1004 ****
trlr[TRLR_LENGTH] = '\0';
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
! printf_unfiltered ("Got ack %d \"%s%s\"\n",
! HDR_GET_SEQ (hdr), hdr + 1, trlr);
}
/* If this ack is for the current packet, we're done. */
--- 999,1006 ----
trlr[TRLR_LENGTH] = '\0';
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
! fprintf_unfiltered (gdb_stdlog, "Got ack %d \"%s%s\"\n",
! HDR_GET_SEQ (hdr), hdr + 1, trlr);
}
/* If this ack is for the current packet, we're done. */
*************** mips_receive_packet (buff, throw_error,
*** 1074,1080 ****
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! printf_unfiltered ("Ignoring unexpected ACK\n");
continue;
}
--- 1076,1082 ----
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! fprintf_unfiltered (gdb_stdlog, "Ignoring unexpected ACK\n");
continue;
}
*************** mips_receive_packet (buff, throw_error,
*** 1104,1111 ****
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! printf_unfiltered ("Got new SYN after %d chars (wanted %d)\n",
! i, len);
continue;
}
--- 1106,1114 ----
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! fprintf_unfiltered (gdb_stdlog,
! "Got new SYN after %d chars (wanted %d)\n",
! i, len);
continue;
}
*************** mips_receive_packet (buff, throw_error,
*** 1122,1128 ****
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! printf_unfiltered ("Got SYN when wanted trailer\n");
continue;
}
--- 1125,1131 ----
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! fprintf_unfiltered (gdb_stdlog, "Got SYN when wanted trailer\n");
continue;
}
*************** mips_receive_packet (buff, throw_error,
*** 1132,1139 ****
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! printf_unfiltered ("Ignoring sequence number %d (want %d)\n",
! HDR_GET_SEQ (hdr), mips_receive_seq);
continue;
}
--- 1135,1143 ----
/* Don't use _filtered; we can't deal with a QUIT out of
target_wait, and I think this might be called from there. */
if (remote_debug > 0)
! fprintf_unfiltered (gdb_stdlog,
! "Ignoring sequence number %d (want %d)\n",
! HDR_GET_SEQ (hdr), mips_receive_seq);
continue;
}
Index: remote-rdp.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/remote-rdp.c,v
retrieving revision 2.9
diff -p -r2.9 remote-rdp.c
*** remote-rdp.c 1999/01/19 20:45:30 2.9
--- remote-rdp.c 1999/07/07 15:15:39
*************** get_byte ()
*** 186,192 ****
int c = SERIAL_READCHAR (io, timeout);
if (remote_debug)
! printf ("[%02x]\n", c);
if (c == SERIAL_TIMEOUT)
{
--- 186,192 ----
int c = SERIAL_READCHAR (io, timeout);
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "[%02x]\n", c);
if (c == SERIAL_TIMEOUT)
{
*************** put_byte (val)
*** 220,226 ****
char val;
{
if (remote_debug)
! printf ("(%02x)\n", val);
SERIAL_WRITE (io, &val, 1);
}
--- 220,226 ----
char val;
{
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "(%02x)\n", val);
SERIAL_WRITE (io, &val, 1);
}
*************** put_word (val)
*** 236,242 ****
b[3] = val >> 24;
if (remote_debug)
! printf ("(%04x)", val);
SERIAL_WRITE (io, b, 4);
}
--- 236,242 ----
b[3] = val >> 24;
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "(%04x)", val);
SERIAL_WRITE (io, b, 4);
}
*************** rdp_init (cold, tty)
*** 314,320 ****
while (!sync && (restype = SERIAL_READCHAR (io, 1)) > 0)
{
if (remote_debug)
! printf_unfiltered ("[%02x]\n", restype);
switch (restype)
{
--- 314,320 ----
while (!sync && (restype = SERIAL_READCHAR (io, 1)) > 0)
{
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "[%02x]\n", restype);
switch (restype)
{
*************** rdp_init (cold, tty)
*** 349,355 ****
int resval = SERIAL_READCHAR (io, 1);
if (remote_debug)
! printf_unfiltered ("[%02x]\n", resval);
switch (resval)
{
--- 349,355 ----
int resval = SERIAL_READCHAR (io, 1);
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "[%02x]\n", resval);
switch (resval)
{
Index: remote-sds.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/remote-sds.c,v
retrieving revision 1.13
diff -p -r1.13 remote-sds.c
*** remote-sds.c 1999/04/02 23:11:57 1.13
--- remote-sds.c 1999/07/07 15:15:41
*************** sds_interrupt (signo)
*** 394,400 ****
signal (signo, sds_interrupt_twice);
if (remote_debug)
! printf_unfiltered ("sds_interrupt called\n");
buf[0] = 25;
sds_send (buf, 1);
--- 394,400 ----
signal (signo, sds_interrupt_twice);
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "sds_interrupt called\n");
buf[0] = 25;
sds_send (buf, 1);
*************** sds_wait (pid, status)
*** 471,477 ****
retlen = sds_send (buf, 1);
if (remote_debug)
{
! fprintf_unfiltered (gdb_stderr, "Signals: %02x%02x %02x %02x\n",
buf[0], buf[1],
buf[2], buf[3]);
}
--- 471,477 ----
retlen = sds_send (buf, 1);
if (remote_debug)
{
! fprintf_unfiltered (gdb_stdlog, "Signals: %02x%02x %02x %02x\n",
buf[0], buf[1],
buf[2], buf[3]);
}
*************** readchar (timeout)
*** 723,729 ****
ch = SERIAL_READCHAR (sds_desc, timeout);
if (remote_debug > 1 && ch >= 0)
! printf_unfiltered("%c(%x)", ch, ch);
switch (ch)
{
--- 723,729 ----
ch = SERIAL_READCHAR (sds_desc, timeout);
if (remote_debug > 1 && ch >= 0)
! fprintf_unfiltered (gdb_stdlog, "%c(%x)", ch, ch);
switch (ch)
{
*************** putmessage (buf, len)
*** 791,800 ****
if (remote_debug)
{
! fprintf_unfiltered (gdb_stderr, "Message to send: \"");
for (i = 0; i < len; ++i)
! fprintf_unfiltered (gdb_stderr, "%02x", buf[i]);
! fprintf_unfiltered (gdb_stderr, "\"\n");
}
p = buf2;
--- 791,800 ----
if (remote_debug)
{
! fprintf_unfiltered (gdb_stdlog, "Message to send: \"");
for (i = 0; i < len; ++i)
! fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
! fprintf_unfiltered (gdb_stdlog, "\"\n");
}
p = buf2;
*************** putmessage (buf, len)
*** 835,844 ****
if (remote_debug)
{
*p = '\0';
! printf_unfiltered ("Sending encoded: \"%s\"", buf2);
! printf_unfiltered (" (Checksum %d, id %d, length %d)\n",
! header[0], header[1], header[2]);
! gdb_flush (gdb_stdout);
}
if (SERIAL_WRITE (sds_desc, buf2, p - buf2))
perror_with_name ("putmessage: write failed");
--- 835,845 ----
if (remote_debug)
{
*p = '\0';
! fprintf_unfiltered (gdb_stdlog, "Sending encoded: \"%s\"", buf2);
! fprintf_unfiltered (gdb_stdlog,
! " (Checksum %d, id %d, length %d)\n",
! header[0], header[1], header[2]);
! gdb_flush (gdb_stdlog);
}
if (SERIAL_WRITE (sds_desc, buf2, p - buf2))
perror_with_name ("putmessage: write failed");
*************** read_frame (buf)
*** 869,879 ****
{
case SERIAL_TIMEOUT:
if (remote_debug)
! puts_filtered ("Timeout in mid-message, retrying\n");
return 0;
case '$':
if (remote_debug)
! puts_filtered ("Saw new packet start in middle of old one\n");
return 0; /* Start a new packet, count retries */
case '\r':
break;
--- 870,881 ----
{
case SERIAL_TIMEOUT:
if (remote_debug)
! fputs_filtered ("Timeout in mid-message, retrying\n", gdb_stdlog);
return 0;
case '$':
if (remote_debug)
! fputs_filtered ("Saw new packet start in middle of old one\n",
! gdb_stdlog);
return 0; /* Start a new packet, count retries */
case '\r':
break;
*************** read_frame (buf)
*** 882,888 ****
{
*bp = '\000';
if (remote_debug)
! fprintf_unfiltered (gdb_stderr, "Received encoded: \"%s\"\n",
buf);
return 1;
}
--- 884,890 ----
{
*bp = '\000';
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "Received encoded: \"%s\"\n",
buf);
return 1;
}
*************** getmessage (buf, forever)
*** 955,961 ****
error ("Watchdog has expired. Target detached.\n");
}
if (remote_debug)
! puts_filtered ("Timed out.\n");
goto retry;
}
}
--- 957,963 ----
error ("Watchdog has expired. Target detached.\n");
}
if (remote_debug)
! fputs_filtered ("Timed out.\n", gdb_stdlog);
goto retry;
}
}
*************** getmessage (buf, forever)
*** 970,976 ****
c2 = readchar (timeout);
c3 = readchar (timeout);
if (remote_debug)
! fprintf_unfiltered (gdb_stderr, "Trigraph %c%c%c received\n",
c, c2, c3);
if (c3 == '+')
{
--- 972,978 ----
c2 = readchar (timeout);
c3 = readchar (timeout);
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "Trigraph %c%c%c received\n",
c, c2, c3);
if (c3 == '+')
{
*************** getmessage (buf, forever)
*** 1004,1018 ****
if (remote_debug)
{
! fprintf_unfiltered (gdb_stderr,
"... (Got checksum %d, id %d, length %d)\n",
header[0], header[1], header[2]);
! fprintf_unfiltered (gdb_stderr, "Message received: \"");
for (i = 0; i < len; ++i)
{
! fprintf_unfiltered (gdb_stderr, "%02x", (unsigned char) buf[i]);
}
! fprintf_unfiltered (gdb_stderr, "\"\n");
}
/* no ack required? */
--- 1006,1020 ----
if (remote_debug)
{
! fprintf_unfiltered (gdb_stdlog,
"... (Got checksum %d, id %d, length %d)\n",
header[0], header[1], header[2]);
! fprintf_unfiltered (gdb_stdlog, "Message received: \"");
for (i = 0; i < len; ++i)
{
! fprintf_unfiltered (gdb_stdlog, "%02x", (unsigned char) buf[i]);
}
! fprintf_unfiltered (gdb_stdlog, "\"\n");
}
/* no ack required? */
Index: remote-udi.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/remote-udi.c,v
retrieving revision 2.73
diff -p -r2.73 remote-udi.c
*** remote-udi.c 1999/01/19 20:45:30 2.73
--- remote-udi.c 1999/07/07 15:15:44
*************** int regno;
*** 750,759 ****
if (remote_debug)
{
! printf_unfiltered("Fetching all registers\n");
! printf_unfiltered("Fetching PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n",
! read_register(NPC_REGNUM), read_register(PC_REGNUM),
! read_register(PC2_REGNUM));
}
/* There doesn't seem to be any way to get these. */
--- 750,761 ----
if (remote_debug)
{
! fprintf_unfiltered (gdb_stdlog, "Fetching all registers\n");
! fprintf_unfiltered (gdb_stdlog,
! "Fetching PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n",
! read_register (NPC_REGNUM),
! read_register (PC_REGNUM),
! read_register (PC2_REGNUM));
}
/* There doesn't seem to be any way to get these. */
*************** int regno;
*** 791,799 ****
if (remote_debug)
{
! printf_unfiltered("Storing all registers\n");
! printf_unfiltered("PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n", read_register(NPC_REGNUM),
! read_register(PC_REGNUM), read_register(PC2_REGNUM));
}
/* Gr1/rsp */
--- 793,804 ----
if (remote_debug)
{
! fprintf_unfiltered (gdb_stdlog, "Storing all registers\n");
! fprintf_unfiltered (gdb_stdlog,
! "PC0 = 0x%x, PC1 = 0x%x, PC2 = 0x%x\n",
! read_register (NPC_REGNUM),
! read_register (PC_REGNUM),
! read_register (PC2_REGNUM));
}
/* Gr1/rsp */
*************** fetch_register (regno)
*** 1450,1456 ****
supply_register(regno, (char *) &To);
if (remote_debug)
! printf_unfiltered("Fetching register %s = 0x%x\n", REGISTER_NAME (regno), To);
}
/*****************************************************************************/
/* Store a single register indicated by 'regno'.
--- 1455,1462 ----
supply_register(regno, (char *) &To);
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "Fetching register %s = 0x%x\n",
! REGISTER_NAME (regno), To);
}
/*****************************************************************************/
/* Store a single register indicated by 'regno'.
*************** store_register (regno)
*** 1471,1477 ****
From = read_register (regno); /* get data value */
if (remote_debug)
! printf_unfiltered("Storing register %s = 0x%x\n", REGISTER_NAME (regno), From);
if (regno == GR1_REGNUM)
{
--- 1477,1484 ----
From = read_register (regno); /* get data value */
if (remote_debug)
! fprintf_unfiltered (gdb_stdlog, "Storing register %s = 0x%x\n",
! REGISTER_NAME (regno), From);
if (regno == GR1_REGNUM)
{
Index: utils.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/utils.c,v
retrieving revision 1.191
diff -p -r1.191 utils.c
*** utils.c 1999/07/02 17:02:53 1.191
--- utils.c 1999/07/07 15:15:50
*************** puts_debug (prefix, string, suffix)
*** 2251,2266 ****
and the new prefix. */
if ((return_p || (strcmp(prev_prefix, prefix) != 0)) && !new_line)
{
! fputs_unfiltered (prev_suffix, gdb_stderr);
! fputs_unfiltered ("\n", gdb_stderr);
! fputs_unfiltered (prefix, gdb_stderr);
}
/* Print prefix if we printed a newline during the previous call. */
if (new_line)
{
new_line = 0;
! fputs_unfiltered (prefix, gdb_stderr);
}
prev_prefix = prefix;
--- 2251,2266 ----
and the new prefix. */
if ((return_p || (strcmp(prev_prefix, prefix) != 0)) && !new_line)
{
! fputs_unfiltered (prev_suffix, gdb_stdlog);
! fputs_unfiltered ("\n", gdb_stdlog);
! fputs_unfiltered (prefix, gdb_stdlog);
}
/* Print prefix if we printed a newline during the previous call. */
if (new_line)
{
new_line = 0;
! fputs_unfiltered (prefix, gdb_stdlog);
}
prev_prefix = prefix;
*************** puts_debug (prefix, string, suffix)
*** 2273,2292 ****
{
default:
if (isprint (ch))
! fputc_unfiltered (ch, gdb_stderr);
else
! fprintf_unfiltered (gdb_stderr, "\\x%02x", ch & 0xff);
break;
! case '\\': fputs_unfiltered ("\\\\", gdb_stderr); break;
! case '\b': fputs_unfiltered ("\\b", gdb_stderr); break;
! case '\f': fputs_unfiltered ("\\f", gdb_stderr); break;
case '\n': new_line = 1;
! fputs_unfiltered ("\\n", gdb_stderr); break;
! case '\r': fputs_unfiltered ("\\r", gdb_stderr); break;
! case '\t': fputs_unfiltered ("\\t", gdb_stderr); break;
! case '\v': fputs_unfiltered ("\\v", gdb_stderr); break;
}
return_p = ch == '\r';
--- 2273,2292 ----
{
default:
if (isprint (ch))
! fputc_unfiltered (ch, gdb_stdlog);
else
! fprintf_unfiltered (gdb_stdlog, "\\x%02x", ch & 0xff);
break;
! case '\\': fputs_unfiltered ("\\\\", gdb_stdlog); break;
! case '\b': fputs_unfiltered ("\\b", gdb_stdlog); break;
! case '\f': fputs_unfiltered ("\\f", gdb_stdlog); break;
case '\n': new_line = 1;
! fputs_unfiltered ("\\n", gdb_stdlog); break;
! case '\r': fputs_unfiltered ("\\r", gdb_stdlog); break;
! case '\t': fputs_unfiltered ("\\t", gdb_stdlog); break;
! case '\v': fputs_unfiltered ("\\v", gdb_stdlog); break;
}
return_p = ch == '\r';
*************** puts_debug (prefix, string, suffix)
*** 2295,2302 ****
/* Print suffix if we printed a newline. */
if (new_line)
{
! fputs_unfiltered (suffix, gdb_stderr);
! fputs_unfiltered ("\n", gdb_stderr);
}
}
--- 2295,2302 ----
/* Print suffix if we printed a newline. */
if (new_line)
{
! fputs_unfiltered (suffix, gdb_stdlog);
! fputs_unfiltered ("\n", gdb_stdlog);
}
}
Index: xmodem.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/xmodem.c,v
retrieving revision 2.2
diff -p -r2.2 xmodem.c
*** xmodem.c 1995/08/02 03:25:46 2.2
--- xmodem.c 1999/07/07 15:15:50
*************** readchar (desc, timeout)
*** 44,50 ****
c = SERIAL_READCHAR (desc, timeout);
if (remote_debug > 0)
! fputc_unfiltered (c, gdb_stderr);
if (c >= 0)
return c;
--- 44,50 ----
c = SERIAL_READCHAR (desc, timeout);
if (remote_debug > 0)
! fputc_unfiltered (c, gdb_stdlog);
if (c >= 0)
return c;