From: Tom Tromey <tromey@redhat.com>
To: "Elmenthaler\, Jens" <jens.elmenthaler@verigy.com>
Cc: <gdb@sourceware.org>
Subject: Re: MI Interface and Pretty Print to_string() result
Date: Mon, 08 Mar 2010 20:17:00 -0000 [thread overview]
Message-ID: <m3sk8ash42.fsf@fleche.redhat.com> (raw)
In-Reply-To: <58596C4646708B4BB990C4483997333001E4F2C5@usplmvpbe001.ent.rt.verigy.net> (Jens Elmenthaler's message of "Sun, 7 Mar 2010 04:16:19 -0600")
>>>>> "Jens" == Elmenthaler, Jens <jens.elmenthaler@verigy.com> writes:
Jens> - determine address and size of the value, most notably, to create
Jens> a watchpoint from it. Well, here a new MI command would indeed
Jens> help. In order to determine address and size, the CDT builds new
Jens> expressions from the value (i.e. "&(value-expression)" and
Jens> "sizeof(value-expression)"), and calls
Jens> -data-evaluate-expression. This is what is no longer possible with
Jens> children of dynamic variable objects.
Thanks, this is very helpful.
In many cases we could extract the address of a child value. This can
be done whenever the printer returns a Value object that was taken from
memory somewhere.
Another issue with -var-info-path-expression that I remembered is that
some of the expressions that we would want to return would actually be
unparseble by any gdb older than CVS HEAD. At least, the libstdc++
printers do casts to qualified pointer types, which were broken. We may
even need Keith's expr-cumulative merge to handle everything properly; I
am not sure.
Jens> For this, it would be sufficient, if gdb would map "v.[0]" to the
Jens> child named "[0]". The pretty printers children() method provides
Jens> all information that is need. The relative expression of a child
Jens> to it's parent simple is the name of the child. The expressions
Jens> resulting from it don't look like real C/C++ anymore, but this is
Jens> something a user could possibly deal with. In the worst case, a
Jens> gdb frontend could polish that up by using the disply hint
Jens> information.
Changing gdb to treat varobj names specially in an expression is
probably difficult. I'm not sure it is wise, either.
Having the printers emit "proper" expressions would also be nice... but
this also runs afoul of other gdb expression bugs. In C++ in particular
there are a number of unimplemented things. We're working on those, but
it will be a while before they are all finished.
Tom
next prev parent reply other threads:[~2010-03-08 20:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 7:08 How to set default value of yquery and nquery Hui Zhu
2010-02-23 7:53 ` MI Interface and Pretty Print to_string() result Elmenthaler, Jens
2010-03-03 22:14 ` Tom Tromey
2010-03-04 8:14 ` Elmenthaler, Jens
2010-03-05 23:49 ` Tom Tromey
2010-03-07 10:16 ` Elmenthaler, Jens
2010-03-08 20:17 ` Tom Tromey [this message]
2010-02-23 17:13 ` How to set default value of yquery and nquery Tom Tromey
2010-02-24 6:08 ` Marc Khouzam
2010-02-24 9:53 ` Hui Zhu
2010-02-24 16:41 ` Marc Khouzam
2010-02-25 16:26 ` Hui Zhu
2010-02-26 0:23 ` Marc Khouzam
2010-02-26 17:31 ` Hui Zhu
2010-02-24 6:19 ` Hui Zhu
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=m3sk8ash42.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=jens.elmenthaler@verigy.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