aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-05-27 14:58:38 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-05-27 14:58:38 -0400
commit055c879fcf242e43a6ef8190f83905109922da93 (patch)
tree540862da9c8482b7adfe5151f0d32f42d2445cdd /gdb/breakpoint.c
parent240edef62f0cb5c6cb3dc6da9e35bd8f8af69e01 (diff)
downloadgdb-055c879fcf242e43a6ef8190f83905109922da93.zip
gdb-055c879fcf242e43a6ef8190f83905109922da93.tar.gz
gdb-055c879fcf242e43a6ef8190f83905109922da93.tar.bz2
gdb: remove iterate_over_bp_locations function
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
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 401367d..4d5c0dd 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -521,7 +521,9 @@ all_tracepoints ()
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;
@@ -2913,15 +2915,6 @@ insert_breakpoints (void)
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. */