public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/10616] Pretty-printed MI vars with children get "{...}" instead of the wanted string
  2009-09-08  7:52 [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string noamraph at gmail dot com
  2009-09-08  7:52 ` [Bug mi/10616] " noamraph at gmail dot com
@ 2009-09-08  7:52 ` noamraph at gmail dot com
  2009-09-08  7:53 ` noamraph at gmail dot com
  2009-09-08 19:34 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: noamraph at gmail dot com @ 2009-09-08  7:52 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From noamraph at gmail dot com  2009-09-08 07:52 -------
Created an attachment (id=4180)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4180&action=view)
File needed to recreate the bug


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10616

------- 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] 5+ messages in thread

* [Bug mi/10616] Pretty-printed MI vars with children get "{...}" instead of the wanted string
  2009-09-08  7:52 [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string noamraph at gmail dot com
@ 2009-09-08  7:52 ` noamraph at gmail dot com
  2009-09-08  7:52 ` noamraph at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: noamraph at gmail dot com @ 2009-09-08  7:52 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From noamraph at gmail dot com  2009-09-08 07:52 -------
Created an attachment (id=4181)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4181&action=view)
File needed to recreate the bug


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10616

------- 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] 5+ messages in thread

* [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string
@ 2009-09-08  7:52 noamraph at gmail dot com
  2009-09-08  7:52 ` [Bug mi/10616] " noamraph at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: noamraph at gmail dot com @ 2009-09-08  7:52 UTC (permalink / raw)
  To: gdb-prs

Hello,

If a pretty-printed variable has children, in MI the to_string method is
ignored, and istead "{...}" is used.

To recreate:
Download bug.c, bug.py (They are the same as in bug 10615).
> gdb --int mi2 --nx bug
> -enable-pretty-printing
> python execfile('bug.py')
> b main
> r
> n
> -var-create m * m
^done,name="m",numchild="0",value="{...}",type="MainStruct",thread-id="1",has_more="1"

The value should have been "x=0".

To fix this, remove those two lines from varobj.c:

    if (dynamic_varobj_has_child_method (var))
  	  return xstrdup ("{...}");

They suggest that this behaviour was intentional. However, I would prefer if it
weren't so. I wrote a pretty-printer for a struct. The struct has many fields,
but only two are important. So I wrote a pretty-printer which keeps the children
of the struct, but uses to_string to display a string like "x=3,y=5", which
helps me see the important state of the struct in the GUI debugger without
having to open the struct in the tree view, so I have more space for watching
other variables.

Thanks,
Noam

-- 
           Summary: Pretty-printed MI vars with children get "{...}" instead
                    of the wanted string
           Product: gdb
           Version: archer
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: noamraph at gmail dot com
                CC: gdb-prs at sourceware dot org,tromey at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10616

------- 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] 5+ messages in thread

* [Bug mi/10616] Pretty-printed MI vars with children get "{...}" instead of the wanted string
  2009-09-08  7:52 [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string noamraph at gmail dot com
  2009-09-08  7:52 ` [Bug mi/10616] " noamraph at gmail dot com
  2009-09-08  7:52 ` noamraph at gmail dot com
@ 2009-09-08  7:53 ` noamraph at gmail dot com
  2009-09-08 19:34 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: noamraph at gmail dot com @ 2009-09-08  7:53 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From noamraph at gmail dot com  2009-09-08 07:53 -------
I forgot: of course, you have to compile before anything:
> gcc -g -o bug bug.c

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10616

------- 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] 5+ messages in thread

* [Bug mi/10616] Pretty-printed MI vars with children get "{...}" instead of the wanted string
  2009-09-08  7:52 [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string noamraph at gmail dot com
                   ` (2 preceding siblings ...)
  2009-09-08  7:53 ` noamraph at gmail dot com
@ 2009-09-08 19:34 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2009-09-08 19:34 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-09-08 19:34 -------
Yeah, this behavior in intentional.
I think you should raise this issue on the mailing list, there
are a couple threads touching on this.
bugzilla isn't really the best place to discuss it, as not everybody
is listening here.  I'm closing the bug for this reason.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=10616

------- 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] 5+ messages in thread

end of thread, other threads:[~2009-09-08 19:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-08  7:52 [Bug mi/10616] New: Pretty-printed MI vars with children get "{...}" instead of the wanted string noamraph at gmail dot com
2009-09-08  7:52 ` [Bug mi/10616] " noamraph at gmail dot com
2009-09-08  7:52 ` noamraph at gmail dot com
2009-09-08  7:53 ` noamraph at gmail dot com
2009-09-08 19:34 ` tromey at redhat 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).