From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28967 invoked by alias); 8 Apr 2004 22:45:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28954 invoked from network); 8 Apr 2004 22:45:01 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 8 Apr 2004 22:45:01 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1BBiGZ-0000IL-T0; Thu, 08 Apr 2004 18:44:59 -0400 Date: Thu, 08 Apr 2004 22:45:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Generate observer.[hc] Message-ID: <20040408224459.GA935@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <4075BF8E.9080706@gnu.org> <20040408222914.GA32726@nevyn.them.org> <4075D4D9.7000104@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4075D4D9.7000104@gnu.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-04/txt/msg00207.txt.bz2 On Thu, Apr 08, 2004 at 06:40:25PM -0400, Andrew Cagney wrote: > >On Thu, Apr 08, 2004 at 05:09:34PM -0400, Andrew Cagney wrote: > > > >>>Hello, > >>> > >>>The attached adds the script observer.sh that can be used to generate: > >>> observer.h > >>> observer.ch (#included by observer.c) > >>>aat build time using doc/observer.texi as the input. > >>> > >>>While this is more ambitious than gdbarch.* (which are explicitly > >>>generated and then committed to CVS) I suspect it is prefered. > >>> > >>>Comments? > >>> > >>>Once this is in I can add a few observers, and start deleting all those > >>>hooks and events. > > > > > >I like it, and the patch looks fine to me. My only complaint is that I > >don't much like the .ch suffix. But then, using .c is probably pretty > >confusing too, so I don't have a better idea - I won't complain. > > So far I've been through .hh .cc .hc .ch .... GCC uses .inc for this. Is that any better? > >>>-@deftypefun extern struct observer *observer_attach_normal_stop > >>>(observer_normal_stop_ftype *@var{f}) > > > > > >Also, my instinct when reading this manual would be to just remove > >these obsolete "extern"s. Which would break the script, since it would > >try to generate an event for observer_detach_@var{event}. So I think > >that either that should be fixed or there should be a comment somewhere > >to leave them in. > > Oops, thats the wrong example, try: > > +@deftypefun void normal_stop (struct bpstats *@var{bs}) > > (yes the externs can go) My point was that the script generated an observer for every "@deftypefun void". So it would try to generate one for the literal string "observer_detach_@var{event}". Of course, I pasted in the wrong line in my message, so my complaint probably didn't make sense. I meant to quote: +@deftypefun extern void observer_detach_@var{event} (struct observer *@var{observer}); -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer