This is the mail archive of the
mailing list for the GDB project.
Re: GDB/MI Output Syntax
- From: Jim Ingham <jingham at apple dot com>
- To: Bob Rossi <bob at brasko dot net>
- Cc: Eli Zaretskii <eliz at gnu dot org>, mec dot gnu at mindspring dot com, gdb at sources dot redhat dot com
- Date: Thu, 6 Jan 2005 16:36:13 -0800
- Subject: Re: GDB/MI Output Syntax
- References: <firstname.lastname@example.org> <76E69B58-F852-11D8-8E70-000A958F4C44@apple.com> <412F87A4.nail3LU117EOV@mindspring.com> <20050105232657.GB27494@white> <01c4f3aa$Blat.email@example.com> <20050106233136.GA29435@white>
Sorry for not responding, we're really busy here right now.
I don't think there is any way to use your parser that won't involve
changing the testsuite files. After all, they are just passing regular
expressions, and unless you are ALSO willing to write a parser that
turns the mi testsuite regular expressions into some sensible form (not
something I would suggest) you are going to have to rewrite these
I was more thinking of this as a project that you would use to write
new tests, and then any time a change in the mi output broke a test
case, you could rewrite it using the new form - since you are going to
have to rewrite it anyway...
The way that I was thinking to use the parser, is to write a command
like: "gdb_mi_parse_output" that would take the mi output, run your
parser on it, and turn the result into some Tcl data structure. This
would be a C based command, so we would have to build a little Tcl
extension to do this, and include it with gdb when we ran the test
The mi output is all basically just nested lists, so you could probably
express it as a nested list pretty easily. I'd have to think a bit
about how to design this well. Anyway, then you could rewrite the test
suite cases to just pull fields out of the Tcl data structure, and see
if the values were what was expected.
Unfortunately, I am definitely not going to have any time to work on
this in the next little while, however.
On Jan 6, 2005, at 3:31 PM, Bob Rossi wrote:
On Thu, Jan 06, 2005 at 06:45:33AM +0200, Eli Zaretskii wrote:
Date: Wed, 5 Jan 2005 18:26:57 -0500
From: Bob Rossi <firstname.lastname@example.org>
Cc: email@example.com, firstname.lastname@example.org
1. will the grammar and bison syntax be good to document so that
others can see it?
I think it's enough to point to the grammar definition file in the MI
docs. There's no need to do more in the docs; the grammar should
3. Would a patch like this be acceptable even if it was
It's just that nothing like that is being done now, and I didn't know
it would be OK.
I can't seem to get a response from Jim or Michael, so I'm trying to
figure this out on my own.
At this point, I don't even know what would invoke this parser.
Would the TCL do it? for instance, would I have to do something like
catch a MI output command in the TCL by grabbing the regular expression
up to the "(gdb)" and then literally pass that string into my parser?
That would en tale modifying all of the .exp files, which would really
I don't even know were to start. :(
Any help would be appreciated.