Re: MI: type prefixes for values

Bob Rossi
2006-02-17T19:36:02Z

On Fri, Feb 17, 2006 at 09:25:42PM +0200, Eli Zaretskii wrote:
> > Date: Fri, 17 Feb 2006 14:04:18 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: Vladimir Prus <ghost@cs.msu.su>, gdb@sources.redhat.com
> >
> > To correct the record, he's not parsing MI here. He's parsing the
> > value encapsulated within MI, the bit in quotes here:
> > value="4000"
> > or:
> > value="{int (int)} 0xffffffff <sym>"
>
> I understood that part.
>
> > There's no grammar describing what goes in the value string.
>
> How do you mean ``there's no grammar''? Do you mean it cannot be
> written? Or do you mean it was not written yet? If the latter, then
> if I needed to write a code to parse this, I'd write down a formal
> definition of what I'll expect, before writing code to parse that.

Eli, I'm suggesting that there is not, and can never be a reliable
formal description for parsing the data in the field 'value'.

GDB is free to change that string to whatever it wants in the future.
That string is not supposed to be parsed. So don't do it. If GDB wants
that data to be parsable, it would need to describe a language that
could parse it, and FE's could implement it. But what would be the
point?

Vladimir, stop trying to parse fields that are unparsable by nature. If
you want to parse the data, your on your own. If you submit a patch that
makes GDB output data in more atomic pieces, I think everyone would be
OK with that.

Bob Rossi