This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
MI and anonymous unions
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 15 Nov 2006 12:38:16 +0300
- Subject: MI and anonymous unions
I've noticed that MI does not work nice with anonymous unions. Consider this
structure:
struct S
{
union {
int i;
int j;
};
};
Traversing it with MI eventually gives:
-var-list-children V.public
^done,numchild="1",children=[child={name="V.public.",exp="",numchild="1",
type="union {...}"}]
(gdb)
-var-list-children V.public.
^done,numchild="1",children=[
child={name="V.public..public",exp="public",numchild="2"}]
(gdb)
-var-list-children V.public..public
.....
Although this kinda works, I'm pretty sure UI won't be happy about empty
expression for a variable object, and if you have two anonymous unions, you
can't even address them.
How about using some unique identifier for variable objects corresponding for
anonymous unions? Say "@N"?
- Volodya