Re: MI: type prefixes for values

Daniel Jacobowitz
2006-02-17T20:15:41Z

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.

And how would you suggest to accomplish this daunting task?

The data is language-specific and program-specific. It's been up and
down GDB's value machinery and formatted in the most user-intelligible
way that we can manage. If the front end needs to know more about it,
then it should use the MI variable-object interface to see its internal
structure and bits; that's how you're supposed to peek inside of
values.

The real problem here is that Vladimir is trying to parse the result of
-data-evaluate-expression, which is defined as opaque. Maybe someone
should design a major interface change where values are returned as
varobjs instead of strings.

--
Daniel Jacobowitz
CodeSourcery