This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Formatting of function pointer value
> > CLI output is intended for the user. It can change with a new release,
> > and on the state of execution in ways which are not easy to anticipate
> > without reading the source code. Provided that it still makes sense,
> > that is not a problem to the user but it can be to a frontend, if it is
> > trying to parse the output in a very precise manner. MI has a more
> > formal syntax and so is not as variable. Once it is fully developed,
>
> So it's not stable yet?
The manual says:
Note that GDB/MI is still under construction, so some of the
features described below are incomplete and subject to change.
> > its output should be stable and if
> > it does change, some backward compatibility will probably be maintained.
>
> Ok, the the only advantage of MI is stable output format.
I've not said that. It also uses variable objects, it aims to be
asynchronous...
> Can you tell me how it's achieved?
As I've already said, it has a more formal syntax.
> For example, looking at the code that prints function values (what worries
> me in the first place):
>
> fprintf_filtered (stream, "{");
> type_print (type, "", stream, -1);
> fprintf_filtered (stream, "} ");
I don't understand the point of the example.
> As I right in assuming that exactly the same output will be produced for MI
> mode and for CLI mode?
No, you're wrong to assume that. That should be clear from the examples
in the manual.
Nick
> If so, then how MI can be more stable than CLI, if the output is the same?