From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3628 invoked by alias); 24 Aug 2004 04:15:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3470 invoked from network); 24 Aug 2004 04:15:21 -0000 Received: from unknown (HELO mclean.mail.mindspring.net) (207.69.200.57) by sourceware.org with SMTP; 24 Aug 2004 04:15:21 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by mclean.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BzSiC-0007tt-00; Tue, 24 Aug 2004 00:15:08 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 2D8084B102; Tue, 24 Aug 2004 00:15:25 -0400 (EDT) Date: Tue, 24 Aug 2004 04:15:00 -0000 From: Michael Chastain To: gdb@sources.redhat.com, bob@brasko.net Subject: Re: GDB/MI Output Syntax Message-ID: <412AC0DC.nailDS61X8G63@mindspring.com> References: <20040824031242.GA15980@white> In-Reply-To: <20040824031242.GA15980@white> User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00309.txt.bz2 Bob Rossi wrote: ~"GNU gdb 6.1-debian\n" ~"Copyright 2004 Free Software Foundation, Inc.\n" ~"GDB is free software, covered by the GNU General Public License, and you are\n" ~"welcome to change it and/or distribute copies of it under certain conditions.\n" ~"Type \"show copying\" to see the conditions.\n" ~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n" ~"This GDB was configured as \"i386-linux\"." ~"\n" (gdb) This looks almost okay to me, it's just got a few differences with newline characters versus the grammar output -> (out-of-band-record)* [result-record] "gdb" NL (out-of-band-record)* -> stream_record stream_record stream_record stream_record stream_record stream_record stream_record stream_record stream_record -> console_stream_output console_stream_output -> "~" C_STRING [result-record] -> It is eight stream-records in a row, where each stream-record is a console-stream-output. The gotcha is that the grammar as written does not allow for a NL after a console-stream-output or a stream-record. bob> Once my parser is finalized, I propose we validate the output of GDB bob> against it somehow in the testsuite. That would be awesome. But how can we hook up a bison grammar to TCL ... something for me to sleep on. Although that's not my area of test suite; that is Andrew and Elena's area. If we put a machine-compilable grammer into the gdb doco, then front end authors could file PR's whenever gdb produces output that doesn't meet the grammar. Conversely, if the gdb team updates the MI, we would be forced to update the grammar to keep our test suite passing, and the updated grammar would tip off the front end writers that new output forms are coming at them. bob> Updating the grammar to match the output of GDB is propably OK, since bob> most parser's somehow don't care that it doesn't match the grammar as it bob> is. Why is that? (this is one point where XML shines) My guess -- only a guess -- is that the front ends are just good enough at parsing to get the job done. You're a front end writer and I'm not. You tell me!