This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
MI: type prefixes for values
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Fri, 17 Feb 2006 12:08:32 +0300
- Subject: MI: type prefixes for values
Hi,
some time ago I've raised the question why MI output sometimes prefixes
variable values with it's type. For example:
-data-evaluate-expression *p3
^done,value="{int (int)} 0xb7ee6e9c <__DTOR_END__+4>"
(gdb)
(note the {int (int)} part). The part does not make sense for a GUI and must
be removed by a specially written code.
See:
http://article.gmane.org/gmane.comp.gdb.devel/13477
In the end, I've inquired why such prefixes cannot be dropped:
http://article.gmane.org/gmane.comp.gdb.devel/13539
I imagine it's a simple matter of wrapping some code in
"ui_output_is_mi_like_p". Can somebody comment on this proposal?
Also, I note that gdb is currently inconsitent even within itself:
(gdb)
-thread-select 2
^done,new-thread-id="2",frame={level="0",func="thread",
args=[{name="p",value="0x0"}],..........
(gdb)
-stack-list-arguments 1 0 0
^done,stack-args=[frame={level="0",
args=[{name="p",value="(void *) 0x0"}]}]
Note that first output has "0x0" as value of 'p', and the second has
"(void *)0x0".
So, can a clear decision be made if the type prefixes has a place in MI, or
should be removed?
Thanks,
Volodya