gdb: defer commit resume until all available events are consumed
[deliverable/binutils-gdb.git] / gdb / target-debug.h
index 1e904b95d6086785619d4d2f44fe970e314f4323..1d52634c3b88bb0f82b89e89f783cd627b204f6f 100644 (file)
@@ -1,6 +1,6 @@
 /* GDB target debugging macros
 
-   Copyright (C) 2014-2018 Free Software Foundation, Inc.
+   Copyright (C) 2014-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -82,6 +82,8 @@
   target_debug_do_print (host_address_to_string (*(X)))
 #define target_debug_print_enum_gdb_signal(X)  \
   target_debug_do_print (gdb_signal_to_name (X))
+#define target_debug_print_gdb_signal(X)       \
+  target_debug_do_print (gdb_signal_to_name (X))
 #define target_debug_print_ULONGEST(X)         \
   target_debug_do_print (hex_string (X))
 #define target_debug_print_ULONGEST_p(X)       \
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_thread_info_pp(X)           \
   target_debug_do_print (host_address_to_string (X))
+#define target_debug_print_std_string(X) \
+  target_debug_do_print ((X).c_str ())
+#define target_debug_print_gdb_byte_vector(X)  \
+  target_debug_do_print (host_address_to_string (X.data ()))
+#define target_debug_print_displaced_step_finish_status(X) \
+  target_debug_do_print (host_address_to_string (X))
+#define target_debug_print_displaced_step_prepare_status(X) \
+  target_debug_do_print (host_address_to_string (X))
+
 
 static void
 target_debug_print_struct_target_waitstatus_p (struct target_waitstatus *status)
@@ -209,20 +220,16 @@ target_debug_print_options (int options)
 }
 
 static void
-target_debug_print_signals (unsigned char *sigs)
+target_debug_print_signals (gdb::array_view<const unsigned char> sigs)
 {
   fputs_unfiltered ("{", gdb_stdlog);
-  if (sigs != NULL)
-    {
-      int i;
-
-      for (i = 0; i < GDB_SIGNAL_LAST; i++)
-       if (sigs[i])
-         {
-           fprintf_unfiltered (gdb_stdlog, " %s",
-                               gdb_signal_to_name ((enum gdb_signal) i));
-         }
-    }
+
+  for (size_t i = 0; i < sigs.size (); i++)
+    if (sigs[i] != 0)
+      {
+       fprintf_unfiltered (gdb_stdlog, " %s",
+                           gdb_signal_to_name ((enum gdb_signal) i));
+      }
   fputs_unfiltered (" }", gdb_stdlog);
 }
 
This page took 0.024988 seconds and 4 git commands to generate.