Remove it, change users (well, a single one) to use all_bp_locations.
This requires moving all_bp_locations to breakpoint.h to expose it.
gdb/ChangeLog:
	* breakpoint.h (iterate_over_bp_locations): Remove.  Update
	users to use all_bp_locations.
	(all_bp_locations): New.
	* breakpoint.c (all_bp_locations): Make non-static.
	(iterate_over_bp_locations): Remove.
Change-Id: Iaf1f716d6c2c5b2975579b3dc113a86f5d0975be
+2021-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * breakpoint.h (iterate_over_bp_locations): Remove.  Update
+       users to use all_bp_locations.
+       (all_bp_locations): New.
+       * breakpoint.c (all_bp_locations): Make non-static.
+       (iterate_over_bp_locations): Remove.
+
 2021-05-27  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * breakpoint.h (iterate_over_breakpoints): Remove.  Update
 
 
 static std::vector<bp_location *> bp_locations;
 
-static const std::vector<bp_location *> &
+/* See breakpoint.h.  */
+
+const std::vector<bp_location *> &
 all_bp_locations ()
 {
   return bp_locations;
   update_global_location_list (UGLL_INSERT);
 }
 
-/* Invoke CALLBACK for each of bp_location.  */
-
-void
-iterate_over_bp_locations (gdb::function_view<void (bp_location *)> callback)
-{
-  for (bp_location *loc : all_bp_locations ())
-    callback (loc);
-}
-
 /* This is used when we need to synch breakpoint conditions between GDB and the
    target.  It is the case with deleting and disabling of breakpoints when using
    always-inserted mode.  */
 
 
 extern void breakpoint_auto_delete (bpstat);
 
-extern void iterate_over_bp_locations
-  (gdb::function_view<void (bp_location *)> callback);
-
 /* Return the chain of command lines to execute when this breakpoint
    is hit.  */
 extern struct command_line *breakpoint_commands (struct breakpoint *b);
 
 tracepoint_range all_tracepoints ();
 
+/* Return a range to iterate over all breakpoint locations.  */
+
+const std::vector<bp_location *> &all_bp_locations ();
+
 /* Nonzero if the specified PC cannot be a location where functions
    have been inlined.  */
 
 
    active.  */
 static std::vector<record_full_breakpoint> record_full_breakpoints;
 
-static void
-record_full_sync_record_breakpoints (struct bp_location *loc)
-{
-  if (loc->loc_type != bp_loc_software_breakpoint)
-      return;
-
-  if (loc->inserted)
-    {
-      record_full_breakpoints.emplace_back
-       (loc->target_info.placed_address_space,
-        loc->target_info.placed_address,
-        1);
-    }
-}
-
 /* Sync existing breakpoints to record_full_breakpoints.  */
 
 static void
 {
   record_full_breakpoints.clear ();
 
-  iterate_over_bp_locations (record_full_sync_record_breakpoints);
+  for (bp_location *loc : all_bp_locations ())
+    {
+      if (loc->loc_type != bp_loc_software_breakpoint)
+       continue;
+
+      if (loc->inserted)
+       record_full_breakpoints.emplace_back
+         (loc->target_info.placed_address_space,
+          loc->target_info.placed_address, 1);
+    }
 }
 
 /* Behavior is conditional on RECORD_FULL_IS_REPLAY.  We will not actually