Re: MI: type prefixes for values

Bob Rossi
2006-02-17T20:18:43Z

On Fri, Feb 17, 2006 at 10:04:13PM +0200, Eli Zaretskii wrote:
> > Date: Fri, 17 Feb 2006 14:59:09 -0500
> > From: Bob Rossi <bob@brasko.net>
> > Cc: Vladimir Prus <ghost@cs.msu.su>, gdb@sources.redhat.com
> >
> > > MI should have a regular syntax which allows such a spec. If MI
> > > doesn't support that, then it misses its main design goal.
> >
> > I completly disagree. MI has a design spec that allows a FE to parse the
> > output of GDB. The data that it get's back from GDB is a whole different
> > story.
>
> Data is just one part of the output of GDB, so it should be parsable
> like the rest, IMO.

I respect your opinion here. I think it's slightly impractical, but also
it's already assummed correct. I really think it's OK to say, this field
is a number, or this field is a string. If it's a string, no one expects
to parse it. I mean, GDB probably doesn't even know how to parse it.
Especially when displaying type information, or some other complex
data.

For instance, if it's a filename, I think it should be a string.
However, I'm not going to document a grammar that parses a filename on
any given system. If it outputs a type, I'm not going to document how to
parse a type in a given language. For one, it's to complicated for me to
even do.

With that said, I think it would be necesary to allow the FE to know if
a particular field is supposed to be a number or string (etc). However,
parsing the contents of those strings is just not practical.

Bob Rossi