gdbsupport: allow passing format string to scoped_debug_start_end
[deliverable/binutils-gdb.git] / gdb / target-debug.h
index 12818da6679f739886caafbdbb0e42468c652873..c3004c2c229b556ca558255b2f98ae8777722f94 100644 (file)
@@ -1,6 +1,6 @@
 /* GDB target debugging macros
 
-   Copyright (C) 2014-2020 Free Software Foundation, Inc.
+   Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,8 +44,6 @@
 #define target_debug_do_print(E)                       \
   fputs_unfiltered ((E), gdb_stdlog);
 
-#define target_debug_print_struct_target_ops_p(X)      \
-  target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_enum_target_object(X)       \
   target_debug_do_print (plongest (X))
 #define target_debug_print_CORE_ADDR(X)                \
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_struct_ui_file_p(X) \
   target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_target_section_table_p(X)   \
-  target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_async_callback_ftype_p(X) \
+#define target_debug_print_const_target_section_table_p(X)     \
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_void_p(X) \
   target_debug_do_print (host_address_to_string (X))
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_struct_bp_location_p(X)     \
   target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_struct_trace_state_variable_p(X)    \
-  target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_const_trace_state_variable_r(X)     \
   target_debug_do_print (host_address_to_string (&X))
 #define target_debug_print_struct_trace_status_p(X)    \
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_static_tracepoint_marker_p(X)       \
   target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_struct_traceframe_info_p(X) \
-  target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_struct_btrace_target_info_p(X)      \
   target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_VEC__btrace_block_s__pp(X)  \
-  target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_const_struct_frame_unwind_p(X)      \
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_struct_btrace_data_p(X)     \
   target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_enum_btrace_format(X)       \
-  target_debug_do_print (plongest (X))
 #define target_debug_print_enum_record_method(X)       \
   target_debug_do_print (plongest (X))
 #define target_debug_print_const_struct_btrace_config_p(X)     \
   target_debug_do_print (host_address_to_string (inf))
 #define target_debug_print_record_print_flags(X) \
   target_debug_do_print (plongest (X))
-#define target_debug_print_enum_info_proc_what(X) \
-  target_debug_do_print (plongest (X))
 #define target_debug_print_thread_control_capabilities(X) \
   target_debug_do_print (plongest (X))
 #define target_debug_print_thread_info_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)  \
@@ -228,4 +212,28 @@ target_debug_print_signals (gdb::array_view<const unsigned char> sigs)
   fputs_unfiltered (" }", gdb_stdlog);
 }
 
+static void
+target_debug_print_size_t (size_t size)
+{
+  fprintf_unfiltered (gdb_stdlog, "%s", pulongest (size));
+}
+
+static void
+target_debug_print_const_gdb_byte_vector_r (const gdb::byte_vector &vector)
+{
+  fputs_unfiltered ("{", gdb_stdlog);
+
+  for (size_t i = 0; i < vector.size (); i++)
+    {
+      fprintf_unfiltered (gdb_stdlog, " %s",
+                         phex_nz (vector[i], 1));
+    }
+  fputs_unfiltered (" }", gdb_stdlog);
+}
+
+static void
+target_debug_print_gdb_byte_vector_r (gdb::byte_vector &vector)
+{
+  target_debug_print_const_gdb_byte_vector_r (vector);
+}
 #endif /* TARGET_DEBUG_H */
This page took 0.024899 seconds and 4 git commands to generate.