This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB/MI Output Syntax

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 tests.

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 suite.

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 <>

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 document itself.

3. Would a patch like this be acceptable even if it was accomplished?

Why not?

It's just that nothing like that is being done now, and I didn't know if
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.

Bob Rossi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]