This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI and anonymous unions

On Wed, Nov 15, 2006 at 12:38:16PM +0300, Vladimir Prus wrote:
> 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.

I'm not sure what to do for the empty expression.  There's nothing we
can put there which would act like a named union, since you need one
less period - hmm, we were just discussing an MI command to recreate
expressions the other day...

How do people use the exp="" result?  Should it be "<anonymous>"?

> How about using some unique identifier for variable objects corresponding for 
> anonymous unions? Say "@N"?

That sounds reasonable.

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]