From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30384 invoked by alias); 24 Aug 2004 03:12:53 -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 30376 invoked from network); 24 Aug 2004 03:12:52 -0000 Received: from unknown (HELO lakermmtao03.cox.net) (68.230.240.36) by sourceware.org with SMTP; 24 Aug 2004 03:12:52 -0000 Received: from white ([68.9.64.121]) by lakermmtao03.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP id <20040824031249.JQJJ12724.lakermmtao03.cox.net@white> for ; Mon, 23 Aug 2004 23:12:49 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1BzRjm-0004Cs-00 for ; Mon, 23 Aug 2004 23:12:42 -0400 Date: Tue, 24 Aug 2004 03:12:00 -0000 From: Bob Rossi To: gdb@sources.redhat.com Subject: GDB/MI Output Syntax Message-ID: <20040824031242.GA15980@white> Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2004-08/txt/msg00307.txt.bz2 Hi, I am working with the MI grammer. Thanks to Michael Chastain's lexer hack I now have a working LL(1) grammer. However, I am a little disappointed in the fact that I need to do this hack. Shouldn't the MI grammar be unambiguous? I understand that everyone in this community hates XML, so I know that is a closed door, however, is it possible to change the MI grammar so that it is not ambigious? Anyways, now that the parser is written, I fired up GDB and sent ~"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) to my parser. The problem is, it was a parse error. This simple output from GDB does not adher to the GDB/MI grammar! I have the very simple patch to the grammar that makes this example work, however, I am scared that the more I parse, the less will work. Does anyone know first hand if this is true? If it is true, I propose that we at least make GDB adher to the grammer. Once my parser is finalized, I propose we validate the output of GDB against it somehow in the testsuite. Maybe by making a gdbmi-validator program that simply invokes GDB, passes all input to GDB and parse's all output, along with passing output back to caller. This would make a trasparent validator of everything GDB/MI says. What does anyone think? As far as the error's are concerned, can the grammar be updated? Updating the grammar to match the output of GDB is propably OK, since most parser's somehow don't care that it doesn't match the grammar as it is. Why is that? (this is one point where XML shines) Thanks, Bob Rossi