aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-10-09 13:50:20 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-10-15 15:29:55 +0200
commit95da600f404ca159242f49441d9b4ea78183852b (patch)
treee72c73cbdad57163586abb1c6ead09661d0fbb96 /gdb/solib-svr4.c
parent9b142ddb4a115b6e58fabb05920bdd94811fda98 (diff)
downloadgdb-95da600f404ca159242f49441d9b4ea78183852b.zip
gdb-95da600f404ca159242f49441d9b4ea78183852b.tar.gz
gdb-95da600f404ca159242f49441d9b4ea78183852b.tar.bz2
Change iterate_over_breakpoints to take a function_view
This allows callers to pass in capturing lambdas. Also changes the return type to bool. gdb/ChangeLog: 2019-10-15 Christian Biesinger <cbiesinger@google.com> * breakpoint.c (iterate_over_breakpoints): Change function pointer to a gdb::function_view and return value to bool. * breakpoint.h (iterate_over_breakpoints): Likewise. * dummy-frame.c (pop_dummy_frame_bpt): Update. (pop_dummy_frame): Update. * guile/scm-breakpoint.c (bpscm_build_bp_list): Update. (gdbscm_breakpoints): Update. * python/py-breakpoint.c (build_bp_list): Update. (gdbpy_breakpoints): Update. * python/py-finishbreakpoint.c (bpfinishpy_detect_out_scope_cb): Update. (bpfinishpy_handle_stop): Update. (bpfinishpy_handle_exit): Update. * solib-svr4.c (svr4_update_solib_event_breakpoint): Update. (svr4_update_solib_event_breakpoints): Update. Change-Id: Ia9de4deecae562a70a40f5cd49f5a74d64570251
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index aa4af34..486ae12 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1991,15 +1991,15 @@ svr4_handle_solib_event (void)
/* Helper function for svr4_update_solib_event_breakpoints. */
-static int
-svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg)
+static bool
+svr4_update_solib_event_breakpoint (struct breakpoint *b)
{
struct bp_location *loc;
if (b->type != bp_shlib_event)
{
/* Continue iterating. */
- return 0;
+ return false;
}
for (loc = b->loc; loc != NULL; loc = loc->next)
@@ -2027,7 +2027,7 @@ svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg)
}
/* Continue iterating. */
- return 0;
+ return false;
}
/* Enable or disable optional solib event breakpoints as appropriate.
@@ -2036,7 +2036,7 @@ svr4_update_solib_event_breakpoint (struct breakpoint *b, void *arg)
static void
svr4_update_solib_event_breakpoints (void)
{
- iterate_over_breakpoints (svr4_update_solib_event_breakpoint, NULL);
+ iterate_over_breakpoints (svr4_update_solib_event_breakpoint);
}
/* Create and register solib event breakpoints. PROBES is an array