Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches\@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] mi/10586
Date: Mon, 14 Nov 2011 15:45:00 -0000	[thread overview]
Message-ID: <m3mxbyso6i.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4EBD93D9.2020006@redhat.com> (Keith Seitz's message of "Fri, 11	Nov 2011 13:30:01 -0800")

>>>>> "Keith" == Keith Seitz <keiths@redhat.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.

Thanks.

Keith> 2011-11-11  Keith Seitz  <keiths@redhat.com>
Keith> 	Based on work by Nick Roberts  <nickrob@snap.net.nz>:
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?

Tom


  reply	other threads:[~2011-11-14 15:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 21:30 Keith Seitz
2011-11-14 15:45 ` Tom Tromey [this message]
2011-11-14 18:04   ` Keith Seitz
2011-11-14 18:18     ` Tom Tromey
2011-11-14 19:28       ` Keith Seitz
2011-11-14 20:28         ` Tom Tromey
2011-11-15 17:10           ` Keith Seitz
2011-11-15 17:30             ` Tom Tromey
2011-12-02 22:28             ` Keith Seitz
2011-12-13  1:28               ` Keith Seitz
2011-12-13 19:58               ` Tom Tromey
2011-12-17  1:55                 ` Keith Seitz
2011-12-20 16:03                   ` Tom Tromey
2012-01-12 23:05                     ` Keith Seitz
2011-12-13 20:34               ` Crash regression with Eclipse [Re: [RFA] mi/10586] Jan Kratochvil

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=m3mxbyso6i.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@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