From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: "gdb-patches@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] mi/10586
Date: Mon, 14 Nov 2011 19:28:00 -0000 [thread overview]
Message-ID: <4EC16BD8.90309@redhat.com> (raw)
In-Reply-To: <m3mxbyr2ju.fsf@fleche.redhat.com>
On 11/14/2011 10:17 AM, Tom Tromey wrote:
> It also seems like it will do the wrong thing for -var-info-expression and
> -var-info-path-expression.
Hmm. Yeah, those will need special handling.
Consider:
struct a
{
struct {
int b;
};
struct {
int c;
};
};
-var-create a * a
-var-list-children a = "public" (if c++)
-var-list-children a.public = "0_anonymous", "1_anonymous"
-var-list-children a.public.0_anonymous = "b" (via "public" if c++)
-var-list-children a.public.1_anonymous = "c" (via "public" if c++)
So far, so good, I think.
Now:
-var-info-expression a = "a"
-var-info-expression a.public = "public"
-var-info-expression a.public.0_anonymous = "0_anonymous"
-var-info-expression a.public.0_anonymous.b = "b"
According to the documentation, -var-info-expression is supposed to
return a name of the variable/child which is to be presented to the
user. I don't think we want to present "0_anonymous". GCC uses
"<anonymous struct>", and that seems like a reasonable convention to follow.
-var-info-path-expression a = "a"
-var-info-path-expression a.public = ""
-var-info-path-expression a.public.0_anonymous = "((a).2_anonymous)"
-var-info-path-expression a.public.0_anonymous.b = "((((a).0_anonymous)).b)"
The documentation on this command says that it should return a valid
expression that may be used, e.g., to create another varobj or to set a
watchpoint.
Clearly the two last elements dealing with 0_anonymous are incorrect. I
believe these should be:
-var-info-path-expression a.public.0_anonymous = ""
-var-info-path-expression a.public.0_anonymous.b = "((a).b)"
If we can agree what to do, I shall set about implementing the desired
change.
Keith
next prev parent reply other threads:[~2011-11-14 19:28 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
2011-11-14 18:04 ` Keith Seitz
2011-11-14 18:18 ` Tom Tromey
2011-11-14 19:28 ` Keith Seitz [this message]
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=4EC16BD8.90309@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).