This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 1/2] Change iterate_over_breakpoints to take a function_view


>>>>> cbiesinger  <cbiesinger@chromium.org> writes:

> From: Christian Biesinger <cbiesinger@google.com>
> This allows callers to pass in capturing lambdas. I have not changed the
> signature to remove the void* argument or to change the return type to
> bool; that can be done in a future cleanup.

> gdb/ChangeLog:

> 2019-10-09  Christian Biesinger  <cbiesinger@google.com>

> 	* breakpoint.c (iterate_over_breakpoints): Change function pointer to
> 	a gdb::function_view.
> 	* breakpoint.h (iterate_over_breakpoints): Likewise.
> +iterate_over_breakpoints
> +  (gdb::function_view<int (breakpoint *, void *)> callback, void *data)

I think normally a function_view conversion would remove the "void *"
callback data, because that can be passed in via the closure now.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]