Re: Formatting of function pointer value

Vladimir Prus
2005-07-11T07:42:13Z

Vladimir Prus wrote:

> Ok, the the only advantage of MI is stable output format. Can you tell me
> how it's achieved? 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, "} ");
>
> As I right in assuming that exactly the same output will be produced for
> MI mode and for CLI mode? If so, then how MI can be more stable than CLI,
> if the output is the same?

To clarify more, here's what I get with MI:

-data-evaluate-expression *p3
^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>"
(gdb)
-var-create VP3 0 *p3
^done,name="VP3",numchild="0",type="int (int)"
(gdb)
-var-evaluate-expression VP3
^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>"

The type enclosed in {} is still there.

- Volodya