Remove mem_region_vector typedef
authorSimon Marchi <simon.marchi@ericsson.com>
Sun, 3 Dec 2017 18:01:03 +0000 (13:01 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sun, 3 Dec 2017 18:06:14 +0000 (13:06 -0500)
Now that make-target-delegates understands namespaces and templates,
this typedef is no longer useful.

gdb/ChangeLog:

* target.h (mem_region_vector): Remove.
(struct target_ops) <to_memory_map>: Change return type to
std::vector<mem_region>.
* target-debug.h (target_debug_print_mem_region_vector): Rename
to ...
(target_debug_print_std_vector_mem_region): ... this.
* target-delegates.c: Re-generate.

gdb/ChangeLog
gdb/target-debug.h
gdb/target-delegates.c
gdb/target.h

index a360083f51152cb12e7bccc42e31107c312969e1..d1704c0c21ec2fa76844544326a1eeea6f0440e4 100644 (file)
@@ -1,3 +1,13 @@
+2017-12-03  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * target.h (mem_region_vector): Remove.
+       (struct target_ops) <to_memory_map>: Change return type to
+       std::vector<mem_region>.
+       * target-debug.h (target_debug_print_mem_region_vector): Rename
+       to ...
+       (target_debug_print_std_vector_mem_region): ... this.
+       * target-delegates.c: Re-generate.
+
 2017-12-03  Pedro Alves  <palves@redhat.com>
 
        * make-target-delegates (munge_type): Also munge '<', '>', and
index 068495e4804219049beff45fce639272455f9d92..d1d7fb5b832b22d03e324707b692662ea630a495 100644 (file)
   target_debug_do_print (host_address_to_string (X))
 #define target_debug_print_bfd_p(X) \
   target_debug_do_print (host_address_to_string (X))
-#define target_debug_print_mem_region_vector(X) \
+#define target_debug_print_std_vector_mem_region(X) \
   target_debug_do_print (host_address_to_string (X.data ()))
 #define target_debug_print_VEC_static_tracepoint_marker_p_p(X) \
   target_debug_do_print (host_address_to_string (X))
index 1cbe6f80448a0a58a4e58d2399c55a8b6d74c594..9691074bfe21785e053b1dd22d037637de4fd3a3 100644 (file)
@@ -2148,29 +2148,29 @@ debug_get_memory_xfer_limit (struct target_ops *self)
   return result;
 }
 
-static mem_region_vector
+static std::vector<mem_region>
 delegate_memory_map (struct target_ops *self)
 {
   self = self->beneath;
   return self->to_memory_map (self);
 }
 
-static mem_region_vector
+static std::vector<mem_region>
 tdefault_memory_map (struct target_ops *self)
 {
   return std::vector<mem_region> ();
 }
 
-static mem_region_vector
+static std::vector<mem_region>
 debug_memory_map (struct target_ops *self)
 {
-  mem_region_vector result;
+  std::vector<mem_region> result;
   fprintf_unfiltered (gdb_stdlog, "-> %s->to_memory_map (...)\n", debug_target.to_shortname);
   result = debug_target.to_memory_map (&debug_target);
   fprintf_unfiltered (gdb_stdlog, "<- %s->to_memory_map (", debug_target.to_shortname);
   target_debug_print_struct_target_ops_p (&debug_target);
   fputs_unfiltered (") = ", gdb_stdlog);
-  target_debug_print_mem_region_vector (result);
+  target_debug_print_std_vector_mem_region (result);
   fputs_unfiltered ("\n", gdb_stdlog);
   return result;
 }
index 0d1e7bd6e8d3d9a60fed70745dd9745b3fd10e92..638e2f06e684fa81c8defe0292dc8a810667b2a7 100644 (file)
@@ -418,11 +418,6 @@ typedef void async_callback_ftype (enum inferior_event_type event_type,
 #define TARGET_DEFAULT_RETURN(ARG)
 #define TARGET_DEFAULT_FUNC(ARG)
 
-/* Define a typedef, because make-target-delegates doesn't currently handle type
-   names with templates.  */
-
-typedef std::vector<mem_region> mem_region_vector;
-
 struct target_ops
   {
     struct target_ops *beneath;        /* To the target under this one.  */
@@ -777,7 +772,7 @@ struct target_ops
        This method should not cache data; if the memory map could
        change unexpectedly, it should be invalidated, and higher
        layers will re-fetch it.  */
-    mem_region_vector (*to_memory_map) (struct target_ops *)
+    std::vector<mem_region> (*to_memory_map) (struct target_ops *)
       TARGET_DEFAULT_RETURN (std::vector<mem_region> ());
 
     /* Erases the region of flash memory starting at ADDRESS, of
This page took 0.033734 seconds and 4 git commands to generate.