gdb: remove duplicate declaration of 'find_thread_ptid'
[deliverable/binutils-gdb.git] / gdb / breakpoint.h
index f31498a54eb812f6aab76b845d5f1ce29592668c..e40504f14ed3fe2b6be5d6393d7c3e6882dca0af 100644 (file)
@@ -31,6 +31,7 @@
 #include "gdbsupport/filtered-iterator.h"
 #include "gdbsupport/function-view.h"
 #include "gdbsupport/refcounted-object.h"
+#include "gdbsupport/safe-iterator.h"
 #include "cli/cli-script.h"
 
 struct block;
@@ -1312,9 +1313,6 @@ extern void breakpoint_init_inferior (enum inf_context);
 
 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);
@@ -1711,21 +1709,28 @@ public:
   DISABLE_COPY_AND_ASSIGN (scoped_rbreak_breakpoints);
 };
 
-/* Breakpoint iterator function.
-
-   Calls a callback function once for each breakpoint, so long as the
-   callback function returns false.  If the callback function returns
-   true, the iteration will end and the current breakpoint will be
-   returned.  This can be useful for implementing a search for a
-   breakpoint with arbitrary attributes, or for applying an operation
-   to every breakpoint.  */
-extern struct breakpoint *iterate_over_breakpoints
-  (gdb::function_view<bool (breakpoint *)>);
-
 /* Breakpoint linked list iterator.  */
 
 using breakpoint_iterator = next_iterator<breakpoint>;
 
+/* Breakpoint linked list range.  */
+
+using breakpoint_range = next_adapter<breakpoint, breakpoint_iterator>;
+
+/* Return a range to iterate over all breakpoints.  */
+
+breakpoint_range all_breakpoints ();
+
+/* Breakpoint linked list range, safe against deletion of the current
+   breakpoint while iterating.  */
+
+using breakpoint_safe_range = basic_safe_range<breakpoint_range>;
+
+/* Return a range to iterate over all breakpoints.  This range is safe against
+   deletion of the current breakpoint while iterating.  */
+
+breakpoint_safe_range all_breakpoints_safe ();
+
 /* Breakpoint filter to only keep tracepoints.  */
 
 struct tracepoint_filter
@@ -1747,6 +1752,10 @@ using tracepoint_range = next_adapter<breakpoint, tracepoint_iterator>;
 
 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.  */
 
This page took 0.029682 seconds and 4 git commands to generate.