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: [RFC 03/32] introduce async_callback_ftype


> 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


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