Use warning in event-loop
authorTom Tromey <tom@tromey.com>
Mon, 13 Apr 2020 18:42:59 +0000 (12:42 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 13 Apr 2020 20:10:04 +0000 (14:10 -0600)
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.

gdb/ChangeLog
gdb/event-loop.c

index 508a5517f95f8d37b3b7694dc61448939de60257..d4facee888418efd96444d923d2dabec656fcd40 100644 (file)
@@ -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>.
index 880fc30d9d6fa4b4d8488a89b4c94839401604b6..a5d2f6fa1cc4cc00df49dd1cd0523d9585854727 100644 (file)
@@ -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