This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 03/32] introduce async_callback_ftype
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Tue, 14 Jan 2014 14:50:12 +0400
- Subject: Re: [RFC 03/32] introduce async_callback_ftype
- Authentication-results: sourceware.org; auth=none
- References: <1389640367-5571-1-git-send-email-tromey at redhat dot com> <1389640367-5571-4-git-send-email-tromey at redhat dot com> <52D512FB dot 7010006 at redhat dot com>
> On 01/13/2014 07:12 PM, Tom Tromey wrote:
> > This introduces async_callback_ftype. This is needed for
> > make-target-delegates to work properly, as it doesn't implement a real
> > parser. I think it's also an ok cleanup in its own right.
>
> Agreed. This could go in immediately.
>
> >
> > 2014-01-08 Tom Tromey <tromey@redhat.com>
> >
> > * target.h (async_callback_ftype): New typedef.
> > (struct target_ops) <to_async>: Use it.
Just a tiny comment:
> > ---
> > gdb/ChangeLog | 5 +++++
> > gdb/target.h | 7 +++++--
> > 2 files changed, 10 insertions(+), 2 deletions(-)
> >
> > diff --git a/gdb/target.h b/gdb/target.h
> > index b219cff..78c9d34 100644
> > --- a/gdb/target.h
> > +++ b/gdb/target.h
> > @@ -341,6 +341,10 @@ extern ULONGEST get_target_memory_unsigned (struct target_ops *ops,
> >
> > struct thread_info; /* fwd decl for parameter list below: */
> >
> > +/* The type of the callback to the to_async method. */
> > +
> > +typedef void async_callback_ftype (enum inferior_event_type, void *);
I think it would be nice if the arguments were named, giving us more
tools to better document the intended behavior of this callback. It's
also a way to help implementors to choose consistent names for those
parameters. As for the documentation, unless completely trivial, it
seems reasonable to me to leave that for later, or even someone else!
Thanks!
--
Joel