MI and anonymous unions
Vladimir Prus
vladimir@codesourcery.com
Wed Nov 15 09:35:00 GMT 2006
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
More information about the Gdb-patches
mailing list