aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-18 00:07:10 +0000
committerPedro Alves <palves@redhat.com>2016-11-23 01:11:50 +0000
commit4eefa7bcf286b879f61b9e1ec1c97230f5345104 (patch)
tree8d5d638852acfdb0d9c440cb63b09e4ead66e63c /gdb/gdbserver/remote-utils.c
parent400b2f29938dab7d9c4f46c9d1b0dc23dab0518b (diff)
downloadfsf-binutils-gdb-4eefa7bcf286b879f61b9e1ec1c97230f5345104.zip
fsf-binutils-gdb-4eefa7bcf286b879f61b9e1ec1c97230f5345104.tar.gz
fsf-binutils-gdb-4eefa7bcf286b879f61b9e1ec1c97230f5345104.tar.bz2
gdbserver: Use debug_printf for debug output
gdb/gdbserver/ChangeLog: 2016-11-23 Pedro Alves <palves@redhat.com> * linux-low.c (check_zombie_leaders): Use debug_printf for debug output. * notif.c (handle_notif_ack, notif_event_enque): Likewise. * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use debug_printf and debug_flush for debug output. * server.c (handle_general_set): Likewise. * thread-db.c (try_thread_db_load): Use debug_printf for debug output.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 1d51010..3212ec9 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -664,18 +664,18 @@ putpkt_binary_1 (char *buf, int cnt, int is_notif)
if (remote_debug)
{
if (is_notif)
- fprintf (stderr, "putpkt (\"%s\"); [notif]\n", buf2);
+ debug_printf ("putpkt (\"%s\"); [notif]\n", buf2);
else
- fprintf (stderr, "putpkt (\"%s\"); [noack mode]\n", buf2);
- fflush (stderr);
+ debug_printf ("putpkt (\"%s\"); [noack mode]\n", buf2);
+ debug_flush ();
}
break;
}
if (remote_debug)
{
- fprintf (stderr, "putpkt (\"%s\"); [looking for ack]\n", buf2);
- fflush (stderr);
+ debug_printf ("putpkt (\"%s\"); [looking for ack]\n", buf2);
+ debug_flush ();
}
cc = readchar ();
@@ -688,8 +688,8 @@ putpkt_binary_1 (char *buf, int cnt, int is_notif)
if (remote_debug)
{
- fprintf (stderr, "[received '%c' (0x%x)]\n", cc, cc);
- fflush (stderr);
+ debug_printf ("[received '%c' (0x%x)]\n", cc, cc);
+ debug_flush ();
}
/* Check for an input interrupt while we're here. */
@@ -889,7 +889,7 @@ readchar (void)
if (readchar_bufcnt == 0)
{
if (remote_debug)
- fprintf (stderr, "readchar: Got EOF\n");
+ debug_printf ("readchar: Got EOF\n");
}
else
perror ("readchar");
@@ -977,8 +977,8 @@ getpkt (char *buf)
break;
if (remote_debug)
{
- fprintf (stderr, "[getpkt: discarding char '%c']\n", c);
- fflush (stderr);
+ debug_printf ("[getpkt: discarding char '%c']\n", c);
+ debug_flush ();
}
if (c < 0)
@@ -1024,8 +1024,8 @@ getpkt (char *buf)
{
if (remote_debug)
{
- fprintf (stderr, "getpkt (\"%s\"); [sending ack] \n", buf);
- fflush (stderr);
+ debug_printf ("getpkt (\"%s\"); [sending ack] \n", buf);
+ debug_flush ();
}
if (write_prim ("+", 1) != 1)
@@ -1033,16 +1033,16 @@ getpkt (char *buf)
if (remote_debug)
{
- fprintf (stderr, "[sent ack]\n");
- fflush (stderr);
+ debug_printf ("[sent ack]\n");
+ debug_flush ();
}
}
else
{
if (remote_debug)
{
- fprintf (stderr, "getpkt (\"%s\"); [no ack sent] \n", buf);
- fflush (stderr);
+ debug_printf ("getpkt (\"%s\"); [no ack sent] \n", buf);
+ debug_flush ();
}
}