Change return type of gdbarch_software_single_step to vector<CORE_ADDR>
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index 67d5988a0c210940d8cd737802c833acfe8b3f04..e8d8d09df548a90f6e822876f06a6c65a7e031b3 100644 (file)
@@ -15079,22 +15079,18 @@ int
 insert_single_step_breakpoints (struct gdbarch *gdbarch)
 {
   struct regcache *regcache = get_current_regcache ();
-  VEC (CORE_ADDR) * next_pcs;
+  std::vector<CORE_ADDR> next_pcs;
 
   next_pcs = gdbarch_software_single_step (gdbarch, regcache);
 
-  if (next_pcs != NULL)
+  if (!next_pcs.empty ())
     {
-      int i;
-      CORE_ADDR pc;
       struct frame_info *frame = get_current_frame ();
       struct address_space *aspace = get_frame_address_space (frame);
 
-      for (i = 0; VEC_iterate (CORE_ADDR, next_pcs, i, pc); i++)
+      for (CORE_ADDR pc : next_pcs)
        insert_single_step_breakpoint (gdbarch, aspace, pc);
 
-      VEC_free (CORE_ADDR, next_pcs);
-
       return 1;
     }
   else
This page took 0.026483 seconds and 4 git commands to generate.