From 6e9cd73eb553c372153d6e9ba4934119623fdad3 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 4 May 2022 08:14:22 -0400 Subject: gdb: use gdb::function_view for gdbarch_iterate_over_objfiles_in_search_order callback A rather straightforward patch to change an instance of callback + void pointer to gdb::function_view, allowing pasing lambdas that capture, and eliminating the need for the untyped pointer. Change-Id: I73ed644e7849945265a2c763f79f5456695b0037 --- gdb/gdbarch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/gdbarch.h') diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 6404dc1..3a7b7f9 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -78,8 +78,8 @@ extern struct gdbarch *target_gdbarch (void); /* Callback type for the 'iterate_over_objfiles_in_search_order' gdbarch method. */ -typedef int (iterate_over_objfiles_in_search_order_cb_ftype) - (struct objfile *objfile, void *cb_data); +using iterate_over_objfiles_in_search_order_cb_ftype + = gdb::function_view; /* Callback type for regset section iterators. The callback usually invokes the REGSET's supply or collect method, to which it must -- cgit v1.1