diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2022-01-16 21:16:02 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-01-18 13:44:38 -0500 |
commit | 91f94053dd72ea88a4d282f94836bc4c0d6c0785 (patch) | |
tree | e2dbe3514f069073026ff19152446e6763296d55 /gdbserver/notif.cc | |
parent | c058728c31684d08da396f1bf50fabaa196dc9d9 (diff) | |
download | fsf-binutils-gdb-91f94053dd72ea88a4d282f94836bc4c0d6c0785.zip fsf-binutils-gdb-91f94053dd72ea88a4d282f94836bc4c0d6c0785.tar.gz fsf-binutils-gdb-91f94053dd72ea88a4d282f94836bc4c0d6c0785.tar.bz2 |
gdbserver: introduce remote_debug_printf
Add remote_debug_printf, and use it for all debug messages controlled by
remote_debug.
Change remote_debug to be a bool, which is trivial in this case.
Change-Id: I90de13cb892faec3830047b571661822b126d6e8
Diffstat (limited to 'gdbserver/notif.cc')
-rw-r--r-- | gdbserver/notif.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdbserver/notif.cc b/gdbserver/notif.cc index 9176a71..3be733f 100644 --- a/gdbserver/notif.cc +++ b/gdbserver/notif.cc @@ -102,9 +102,8 @@ handle_notif_ack (char *own_buf, int packet_len) struct notif_event *head = np->queue.front (); np->queue.pop_front (); - if (remote_debug) - debug_printf ("%s: acking %d\n", np->ack_name, - (int) np->queue.size ()); + remote_debug_printf ("%s: acking %d", np->ack_name, + (int) np->queue.size ()); delete head; } @@ -122,9 +121,8 @@ notif_event_enque (struct notif_server *notif, { notif->queue.push_back (event); - if (remote_debug) - debug_printf ("pending events: %s %d\n", notif->notif_name, - (int) notif->queue.size ()); + remote_debug_printf ("pending events: %s %d", notif->notif_name, + (int) notif->queue.size ()); } |