From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Re: Language of registers
Date: Tue, 28 Nov 2006 17:12:00 -0000 [thread overview]
Message-ID: <200611282004.11537.vladimir@codesourcery.com> (raw)
In-Reply-To: <20061127140344.GA32528@nevyn.them.org>
On Monday 27 November 2006 17:03, Daniel Jacobowitz wrote:
> On Sat, Nov 25, 2006 at 02:21:43PM +0300, Vladimir Prus wrote:
> > At the moment, MI varobj assume that register values have a language. As
> > result, if you try to look at values of $xmm1 in a C++ program, you'll
> > find that this registers has a 'public' field -- which is not reasonable.
>
> I'm unsure. Maybe it's actually right the way it is? All of GDB's
> other forms of output adjust with the current language. For instance,
> in the CLI:
>
> (gdb) set lang ada
> (gdb) p $xmm1
> $4 = (v4_float => (0 => 0.0, 0.0, 0.0, 0.0),
First of all, varobjs don't know anything about Ada. Further, unlike CLI,
varobj don't have any language-specific formatting -- it's just tree of
values.
Language-specific code in varobj.c basically does two things:
- Add those public child for C++
- Escapes "." for Java (to avoid conflict with "." used in between
varobj levels themself)
Neither seems reasonable to do for registers.
> I'd suggest that we don't need the fake "public" child for things of
> struct/union (as opposed to class) type that are 100% public. We can't
> reliably detect struct vs class because debug info is often lacking the
> distinction, but union is easy. I don't know if this might break some
> MI frontend though. But the "public" child isn't even documented.
You're right that such a change will make my patch unnecessary. I'm not sure
what frontend authors say, though. Personally, I don't see any reason why a
debugger should group members by accessibility, and KDevelop just hides those
pseudo-fields. Eclipse, on the other hand, shows them, but probably will work
just fine without.
The change does not seem very complex, but the changes to testcases will be
huge, so I'd like to check. Does everybody agree with removing "public"
pseudo-field from structures that have only public fields?
- Volodya
Does everybody agree with removing 'pu
next prev parent reply other threads:[~2006-11-28 17:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-25 11:22 Vladimir Prus
2006-11-27 14:03 ` Daniel Jacobowitz
2006-11-28 17:12 ` Vladimir Prus [this message]
2006-11-28 17:23 ` Daniel Jacobowitz
2006-11-28 18:09 ` Vladimir Prus
2006-12-01 14:32 ` Daniel Jacobowitz
2006-12-01 18:03 ` Jim Ingham
2006-11-29 10:12 ` Vladimir Prus
2006-11-27 0:43 Nick Roberts
2006-11-27 6:32 ` Vladimir Prus
2006-11-27 7:37 ` Eli Zaretskii
2006-12-06 21:54 Nick Roberts
2006-12-06 22:03 ` Daniel Jacobowitz
2006-12-06 22:55 ` Nick Roberts
2006-12-06 23:10 ` Daniel Jacobowitz
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=200611282004.11537.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@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