public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Use warning in event-loop
@ 2020-04-13 21:10 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2020-04-13 21:10 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=29f2bf4f224c7b6a02b4acc3e1c22fd776dbc013
commit 29f2bf4f224c7b6a02b4acc3e1c22fd776dbc013
Author: Tom Tromey <tom@tromey.com>
Date: Mon Apr 13 12:42:59 2020 -0600
Use warning in event-loop
Change event-loop.c to avoid printf_unfiltered in favor of warning.
warning is aleady available to code in gdbsupport/.
gdb/ChangeLog
2020-04-13 Tom Tromey <tom@tromey.com>
* event-loop.c (handle_file_event): Use warning, not
printf_unfiltered.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/event-loop.c | 11 +++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 508a5517f95..d4facee8884 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-13 Tom Tromey <tom@tromey.com>
+
+ * event-loop.c (handle_file_event): Use warning, not
+ printf_unfiltered.
+
2020-04-13 Tom Tromey <tom@tromey.com>
* event-loop.c: Include <chrono>.
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index 880fc30d9d6..a5d2f6fa1cc 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -616,11 +616,10 @@ handle_file_event (file_handler *file_ptr, int ready_mask)
/* Work in progress. We may need to tell somebody
what kind of error we had. */
if (mask & POLLERR)
- printf_unfiltered (_("Error detected on fd %d\n"),
- file_ptr->fd);
+ warning (_("Error detected on fd %d"), file_ptr->fd);
if (mask & POLLNVAL)
- printf_unfiltered (_("Invalid or non-`poll'able fd %d\n"),
- file_ptr->fd);
+ warning (_("Invalid or non-`poll'able fd %d"),
+ file_ptr->fd);
file_ptr->error = 1;
}
else
@@ -634,8 +633,8 @@ handle_file_event (file_handler *file_ptr, int ready_mask)
{
if (ready_mask & GDB_EXCEPTION)
{
- printf_unfiltered (_("Exception condition detected "
- "on fd %d\n"), file_ptr->fd);
+ warning (_("Exception condition detected on fd %d"),
+ file_ptr->fd);
file_ptr->error = 1;
}
else
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-13 21:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 21:10 [binutils-gdb] Use warning in event-loop Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).