From 0406545d0668c0d2900654a8ec65bdaf23d157c9 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 22 Apr 2021 22:00:39 -0400 Subject: gdb: use function_view for iterate_over_bp_locations' callback Use a function_view instead of function pointer + data. Actually, nothing uses the data anyway, but that makes iterate_over_bp_locations more like iterate_over_breakpoints. gdb/ChangeLog: * breakpoint.c (iterate_over_bp_locations): Change callback to function view, remove data parameter. * breakpoint.h (iterate_over_bp_locations): Likewise. * record-full.c (record_full_sync_record_breakpoints): Remove data parameter. Change-Id: I66cdc94a505f67bc640bcc66865fb535ee939a57 --- gdb/breakpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index c2d0ffb..a20464a 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2943,13 +2943,13 @@ insert_breakpoints (void) /* Invoke CALLBACK for each of bp_location. */ void -iterate_over_bp_locations (walk_bp_location_callback callback) +iterate_over_bp_locations (gdb::function_view callback) { struct bp_location *loc, **loc_tmp; ALL_BP_LOCATIONS (loc, loc_tmp) { - callback (loc, NULL); + callback (loc); } } -- cgit v1.1