From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26506 invoked by alias); 16 Apr 2004 18:56:03 -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 26491 invoked from network); 16 Apr 2004 18:56:02 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 16 Apr 2004 18:56:02 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 721982B9D; Fri, 16 Apr 2004 14:55:57 -0400 (EDT) Message-ID: <40802C3D.9040906@gnu.org> Date: Fri, 16 Apr 2004 18:56:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Generate observer.[hc] References: <4075BF8E.9080706@gnu.org> <1659-Thu15Apr2004142420+0300-eliz@gnu.org> <407E9FEE.1040906@gnu.org> <6654-Fri16Apr2004095441+0300-eliz@gnu.org> In-Reply-To: <6654-Fri16Apr2004095441+0300-eliz@gnu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00370.txt.bz2 >>Date: Thu, 15 Apr 2004 10:45:02 -0400 >>> From: Andrew Cagney >> >>>> > >>>> > let me play the Devil's >>>> > advocate and ask what significant wins we gain from generating the >>>> > source files from the Texinfo file, that justify maintaining the >>>> > scripts which are required to support this machinery? >> >>> >>> We first establish a one-stop shop for adding observers, and second >>> eliminate the drudgery of churning out the C code needed to implement >>> each observer. > > > That much is understood, but I still have a difficulty to see how > inventing an elaborate machinery for churning C code out of Texinfo > (which is hardly a trivial Sed'ery) is justified by the benefits you > mentioned. I thought perhaps there were other, subtler, benefits > which I didn't see. Are there? This machinery isn't that elaborate. For an example of that look at gdbarch.sh which desperatly needs to be dumbed down :-/ >>> (At a guess, we're going to end up with something between 10 and 20 >>> observers). > > > So what, we will have all of them in the docs? Given the choice between duplicating/triplicating the event code, had a single list and generator, I'll take the latter. Here's the original proposal as it relates to gdbarch.sh: http://sources.redhat.com/ml/gdb-patches/2003-02/msg00384.html when the observer was original posted it discussed doing something similar as a good thing. (yes I've reversed the order so that the observer is the prototype, like I said gdbarch.sh needs to be greatly simplified). Andrew