This is the mail archive of the
mailing list for the GDB project.
Re: GDB/MI Output Syntax
- From: Bob Rossi <bob at brasko dot net>
- To: Michael Chastain <mec dot gnu at mindspring dot com>
- Cc: jingham at apple dot com, gdb at sources dot redhat dot com
- Date: Wed, 5 Jan 2005 18:26:57 -0500
- Subject: Re: GDB/MI Output Syntax
- References: <email@example.com> <76E69B58-F852-11D8-8E70-000A958F4C44@apple.com> <412F87A4.nail3LU117EOV@mindspring.com>
On Fri, Aug 27, 2004 at 03:12:36PM -0400, Michael Chastain wrote:
> Jim Ingham <firstname.lastname@example.org> wrote:
> > The problem is that the sample extension actually adds a command called
> > "sha1". In interactive mode, tcl resolves shortened commands to the
> > full name if the resolution is unique.
> *bonk* *bonk* *bonk*
> That's the sound of me banging my head against the wall. Stupid me!
> > I actually think that building Bob's parser into a Tcl C extension &
> > using that with the DejaGnu testsuite would be brilliant.
> New vistas are opening up to me!
> It would be much better to use TCL data structures to parse MI rather
> than regular expressions. I had a great experience getting away from
> regular expressions with cp_test_ptype_class.
> It's still a dozen host arches (actually, a dozen build arches,
> TCL runs on build machine). But we're not debugging a target program
> with shared libraries, we're just using one as a host.
Hey, has anything ever evolved out of this?
Here is my road map for developing an MI parser for CGDB.
1. Create a grammar that is easily translated into LR(1)
2. Generate the parser with flex and bison
3. Have the parser test the output of the GDB MI testsuite
(Don't know how to do this)
4. Have the parser verify the semantics of GDB's output.
I basically believe I'm done with step 1 and 2, besides bugs and other
stuff. After I'm done with step 3, I plan on adding the parser into CGDB. I may
even wait until after step 4.
My questions are,
1. will the grammar and bison syntax be good to document so that others can see it?
2. Can anyone help me put the parser into the testsuite ( It could
take me forever since I know nothing about TCL, Excpect, ... )
3. Would a patch like this be acceptable even if it was accomplished?