GDB/MI Output Syntax
Bob Rossi
bob@brasko.net
Wed Jan 5 23:27:00 GMT 2005
On Fri, Aug 27, 2004 at 03:12:36PM -0400, Michael Chastain wrote:
> Jim Ingham <jingham@apple.com> 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?
Thanks,
Bob Rossi
More information about the Gdb
mailing list