From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27615 invoked by alias); 14 Jan 2014 10:50:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27605 invoked by uid 89); 14 Jan 2014 10:50:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 14 Jan 2014 10:50:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BDEFD116422; Tue, 14 Jan 2014 05:50:16 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qSEsmgBmSxBL; Tue, 14 Jan 2014 05:50:16 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5FBD71163EF; Tue, 14 Jan 2014 05:50:16 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DD0A2E0360; Tue, 14 Jan 2014 14:50:12 +0400 (RET) Date: Tue, 14 Jan 2014 10:50:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFC 03/32] introduce async_callback_ftype Message-ID: <20140114105012.GF4762@adacore.com> References: <1389640367-5571-1-git-send-email-tromey@redhat.com> <1389640367-5571-4-git-send-email-tromey@redhat.com> <52D512FB.7010006@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52D512FB.7010006@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-01/txt/msg00421.txt.bz2 > 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 > > > > * target.h (async_callback_ftype): New typedef. > > (struct target_ops) : 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