Make collect_probes return an std::vector
[deliverable/binutils-gdb.git] / gdb / dtrace-probe.c
index c611b16375d7747c9c45d5582a9e4488f072d0b2..f9209ece1a571ab7e761122ffea9fad0d902af47 100644 (file)
@@ -313,7 +313,8 @@ struct dtrace_dof_probe
 
 static void
 dtrace_process_dof_probe (struct objfile *objfile,
-                         struct gdbarch *gdbarch, VEC (probe_p) **probesp,
+                         struct gdbarch *gdbarch,
+                         std::vector<probe *> *probesp,
                          struct dtrace_dof_hdr *dof,
                          struct dtrace_dof_probe *probe,
                          struct dtrace_dof_provider *provider,
@@ -448,7 +449,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
       ret->enablers = VEC_copy (dtrace_probe_enabler_s, enablers);
 
       /* Successfully created probe.  */
-      VEC_safe_push (probe_p, *probesp, (struct probe *) ret);
+      probesp->push_back ((struct probe *) ret);
     }
 
   do_cleanups (cleanup);
@@ -461,7 +462,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
 
 static void
 dtrace_process_dof (asection *sect, struct objfile *objfile,
-                   VEC (probe_p) **probesp, struct dtrace_dof_hdr *dof)
+                   std::vector<probe *> *probesp, struct dtrace_dof_hdr *dof)
 {
   struct gdbarch *gdbarch = get_objfile_arch (objfile);
   struct dtrace_dof_sect *section;
@@ -620,7 +621,7 @@ dtrace_get_arg (struct dtrace_probe *probe, unsigned n,
 /* Implementation of the get_probes method.  */
 
 static void
-dtrace_get_probes (VEC (probe_p) **probesp, struct objfile *objfile)
+dtrace_get_probes (std::vector<probe *> *probesp, struct objfile *objfile)
 {
   bfd *abfd = objfile->obfd;
   asection *sect = NULL;
@@ -908,8 +909,6 @@ info_probes_dtrace_command (char *arg, int from_tty)
   info_probes_for_ops (arg, from_tty, &dtrace_probe_ops);
 }
 
-void _initialize_dtrace_probe (void);
-
 void
 _initialize_dtrace_probe (void)
 {
This page took 0.02462 seconds and 4 git commands to generate.