public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result
@ 2010-03-01 11:44 jens dot elmenthaler at verigy dot com
2010-03-06 8:14 ` [Bug mi/11335] " vladimir at codesourcery dot com
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jens dot elmenthaler at verigy dot com @ 2010-03-01 11:44 UTC (permalink / raw)
To: gdb-prs
The only way to obtain the value of a dynamic variable objects (= the return
value of the pretty printer) is -data-evaluate-expresssion. However, -data-
evaluate-expresion cannot be used for children of dynamic variable objects,
since it is impossible to provide the required expression.
The same should possibly returned in the results of -var-update and -var-list-
children.
--
Summary: -var-evaluate-expression should return the pretty
printer's to_string result
Product: gdb
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: mi
AssignedTo: unassigned at sourceware dot org
ReportedBy: jens dot elmenthaler at verigy dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
2010-03-01 11:44 [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result jens dot elmenthaler at verigy dot com
@ 2010-03-06 8:14 ` vladimir at codesourcery dot com
2010-03-06 8:14 ` vladimir at codesourcery dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vladimir at codesourcery dot com @ 2010-03-06 8:14 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |vladimir at codesourcery dot
| |com
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
2010-03-01 11:44 [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result jens dot elmenthaler at verigy dot com
2010-03-06 8:14 ` [Bug mi/11335] " vladimir at codesourcery dot com
@ 2010-03-06 8:14 ` vladimir at codesourcery dot com
2010-03-07 13:34 ` jens dot elmenthaler at verigy dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vladimir at codesourcery dot com @ 2010-03-06 8:14 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From vladimir at codesourcery dot com 2010-03-06 08:14 -------
Could you clarify why you even want to use -data-evaluate-expression? Is that
because you're adding pretty-printing to CDT and CDT, for some unknown reason,
wants to display "variable details" for selected node in the variables tree?
I am opposed to bloating the output of -var-update and or -var-list-children
with full text (=CLI) rendering of that varobj, because such a design would
require that GDB, fetches entire value from memory, always. It might be
possible to introduce a separate command, or add --varobj option to -data-
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
2010-03-01 11:44 [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result jens dot elmenthaler at verigy dot com
2010-03-06 8:14 ` [Bug mi/11335] " vladimir at codesourcery dot com
2010-03-06 8:14 ` vladimir at codesourcery dot com
@ 2010-03-07 13:34 ` jens dot elmenthaler at verigy dot com
2010-03-29 20:42 ` vladimir at codesourcery dot com
2010-03-30 7:20 ` jens dot elmenthaler at verigy dot com
4 siblings, 0 replies; 6+ messages in thread
From: jens dot elmenthaler at verigy dot com @ 2010-03-07 13:34 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From jens dot elmenthaler at verigy dot com 2010-03-07 13:34 -------
Ok, I know it again. The problem was for pretty printers returning children.
For instance, I have a collection and the pretty printer has a to_string
method returning a summary (like "vector of lenght 2"). I would like to show
this summary in the value column. -var-evaluate-expression only
returns "{...}", probably since it has children. The only way of retrieving
the summary, then, is to ask -data-evaluate-expression. But this works only as
long as I'm able to provide the required expression, which I can only do as
long as the variable of interest is not a child of another dynamic variable.
So my request simply was that -var-evaluate-expression returns the result of
the to_string method if it is backed by a pretty printer, regardless of
whether it has children or not.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
2010-03-01 11:44 [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result jens dot elmenthaler at verigy dot com
` (2 preceding siblings ...)
2010-03-07 13:34 ` jens dot elmenthaler at verigy dot com
@ 2010-03-29 20:42 ` vladimir at codesourcery dot com
2010-03-30 7:20 ` jens dot elmenthaler at verigy dot com
4 siblings, 0 replies; 6+ messages in thread
From: vladimir at codesourcery dot com @ 2010-03-29 20:42 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From vladimir at codesourcery dot com 2010-03-29 20:42 -------
I actually though that this summary is both too huge and not particularly
useful in a frontend. Say, the type of container is already knows, so all
the summary say is report the size. Maybe, for containers, we want to show
[N] as opposed to {...}?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
2010-03-01 11:44 [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result jens dot elmenthaler at verigy dot com
` (3 preceding siblings ...)
2010-03-29 20:42 ` vladimir at codesourcery dot com
@ 2010-03-30 7:20 ` jens dot elmenthaler at verigy dot com
4 siblings, 0 replies; 6+ messages in thread
From: jens dot elmenthaler at verigy dot com @ 2010-03-30 7:20 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From jens dot elmenthaler at verigy dot com 2010-03-30 07:20 -------
(In reply to comment #3)
> I actually though that this summary is both too huge and not particularly
> useful in a frontend. Say, the type of container is already knows, so all
> the summary say is report the size. Maybe, for containers, we want to show
> [N] as opposed to {...}?
Yes, from the requirements point, this is what I miss most. Currently, I have
to expand the collection variable, if I just want to see how many elements it
contains. And this doesn't work well, because in a large collection I also
have to scroll to the end.
Lets assume your proposal, how would you decide it's a collection? You take
the display hint and if it's map or vector, it's collection. Next, how will
you determine the number of childen? You cannot use the children method and
use the iterate over all elements. If the collection is uninitialized, it may
never return. Alternatively, you could add a new method to the pretty printers.
It all boyls down to what our understanding of the to_string method is. Shall
it just provide a short summary to identify an object, or shall it be used to
dump all members in a string? I always interpreted as the first.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-30 7:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-01 11:44 [Bug mi/11335] New: -var-evaluate-expression should return the pretty printer's to_string result jens dot elmenthaler at verigy dot com
2010-03-06 8:14 ` [Bug mi/11335] " vladimir at codesourcery dot com
2010-03-06 8:14 ` vladimir at codesourcery dot com
2010-03-07 13:34 ` jens dot elmenthaler at verigy dot com
2010-03-29 20:42 ` vladimir at codesourcery dot com
2010-03-30 7:20 ` jens dot elmenthaler at verigy dot com
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).