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: "Christian Biesinger via gdb-patches" <gdb-patches at sourceware dot org>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 9 Oct 2019 19:12:55 -0500
- Subject: Re: [PATCH v2 1/2] Change iterate_over_breakpoints to take a function_view
- References: <20191009193938.147076-1-cbiesinger@chromium.org> <87k19dbpkj.fsf@tromey.com>
- Reply-to: Christian Biesinger <cbiesinger at google dot com>
On Wed, Oct 9, 2019 at 4:02 PM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> 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.
OK, sent that as v3 of this patchset.
Christian