Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* MI and anonymous unions
@ 2006-11-15  9:35 Vladimir Prus
  2006-11-15  9:39 ` Vladimir Prus
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Prus @ 2006-11-15  9:35 UTC (permalink / raw)
  To: gdb-patches


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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MI and anonymous unions
  2006-11-15  9:35 MI and anonymous unions Vladimir Prus
@ 2006-11-15  9:39 ` Vladimir Prus
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Prus @ 2006-11-15  9:39 UTC (permalink / raw)
  To: gdb-patches

Vladimir Prus wrote:

> 
> I've noticed that MI does not work nice with anonymous unions. Consider
> this structure:

Sorry, this email was not meant for the patches list, but for devel list.
I've resent it there.

Sorry,
Volodya



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-15  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-15  9:35 MI and anonymous unions Vladimir Prus
2006-11-15  9:39 ` Vladimir Prus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox