From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb@sources.redhat.com
Subject: MI and anonymous unions
Date: Wed, 15 Nov 2006 09:38:00 -0000 [thread overview]
Message-ID: <200611151238.16778.vladimir@codesourcery.com> (raw)
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
next reply other threads:[~2006-11-15 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-15 9:38 Vladimir Prus [this message]
2006-11-15 14:54 ` Daniel Jacobowitz
2006-11-15 14:58 ` Vladimir Prus
2006-11-15 17:21 ` Jim Ingham
2006-11-15 17:28 ` Vladimir Prus
2006-11-15 17:52 ` Jim Ingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611151238.16778.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox