This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 1/2] Change iterate_over_breakpoints to take a function_view
- From: Tom Tromey <tom at tromey dot com>
- To: cbiesinger at chromium dot org
- Cc: gdb-patches at sourceware dot org, Christian Biesinger <cbiesinger at google dot com>
- Date: Wed, 09 Oct 2019 15:02:04 -0600
- Subject: Re: [PATCH v2 1/2] Change iterate_over_breakpoints to take a function_view
- References: <20191009193938.147076-1-cbiesinger@chromium.org>
>>>>> 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