This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] mi/10586
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Mon, 14 Nov 2011 08:45:25 -0700
- Subject: Re: [RFA] mi/10586
- References: <4EBD93D9.firstname.lastname@example.org>
>>>>> "Keith" == Keith Seitz <email@example.com> writes:
Keith> This bug deals with anonymous structs/unions in varobj. As in:
Keith> anonymous structs/unions are unaddressable by MI clients.
Keith> This bug has been sitting around for quite some time. Vladimir Prus
Keith> first mentioned this in 2006 (yikes!), and this bug was filed in
Keith> 2009. At this time, Nick Roberts responded to the bug with a patch
Keith> that fixed the problem.
Keith> I don't know why Nick never submitted the patch here, so I've tweaked
Keith> his original patch and written some tests for it, and I am now
Keith> submitting this.
Keith> 2011-11-11 Keith Seitz <firstname.lastname@example.org>
Keith> Based on work by Nick Roberts <email@example.com>:
Keith> * varobj.c (c_describe_child): Synthesize a variable name for
Keith> anonymous structs and unions.
Keith> (cplus_describe_child): Likewise.
ChangeLog should mention the PR.
Keith> + type_name = TYPE_FIELD_NAME (type, index);
Keith> + if (*type_name == '\0')
Keith> + name = xstrprintf ("anonymous%d", index);
Keith> + else
Keith> + name = type_name;
What happens if there is a clash between a named field's name and the
generated name for an anonymous field?