public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug mi/28201] New: Unable to show children and to string pretty-printer values at the same time.
@ 2021-08-06 14:38 yerimyah1 at gmail dot com
  2021-08-06 16:07 ` [Bug mi/28201] " tromey at sourceware dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: yerimyah1 at gmail dot com @ 2021-08-06 14:38 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28201

            Bug ID: 28201
           Summary: Unable to show children and to string pretty-printer
                    values at the same time.
           Product: gdb
           Version: 10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: mi
          Assignee: unassigned at sourceware dot org
          Reporter: yerimyah1 at gmail dot com
  Target Milestone: ---

For example if i create a vector; 

```
std::vector<std::string> aVector { "this", "is", "a", "standard", "list"}

```

in the normal gdb command line i would get 


```
p aVector 
$1 = std::vector of length 5, capacity 5 = {"this", "is ", "a", "standard",
"list"}

```
however in GDB/MI


``` 
-var-create - * "aVector"

--
result-class: done
name: var21
numchild: 0
value: {...}
type: std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >
thread-id: 1
displayhint: array
dynamic: 1
has_more: 1

```

the to_string value of the std::vector pretty printer is gone and replaced by
"{...}"

the values is meant to show the size of the vector and very valuable when
debugging.

with the help of my mentor i was able to get the relevant part that it is
hardcoded to return `{...}` (there may be other parts) that may be relevant.

here

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/c-varobj.c;h=f6db3a5d1ba77ad86e7d36a2cd94ef5fdc26069b;hb=refs/heads/master#l478

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/varobj.c;h=d0c857a69060644b225f3072b96c90a44b6d1548;hb=refs/heads/master#l2162


thanks

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug mi/28201] Unable to show children and to string pretty-printer values at the same time.
  2021-08-06 14:38 [Bug mi/28201] New: Unable to show children and to string pretty-printer values at the same time yerimyah1 at gmail dot com
@ 2021-08-06 16:07 ` tromey at sourceware dot org
  2021-08-06 17:53 ` tromey at sourceware dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2021-08-06 16:07 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28201

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Yeah, back when we added Python pretty-printing, the MI maintainer
requested this behavior.  I don't know why, as it seems un-useful to me.
Perhaps we could lift this restriction and show the to_string output
correctly in MI.  (Maybe only under the newest MI version, to keep
compatibility.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug mi/28201] Unable to show children and to string pretty-printer values at the same time.
  2021-08-06 14:38 [Bug mi/28201] New: Unable to show children and to string pretty-printer values at the same time yerimyah1 at gmail dot com
  2021-08-06 16:07 ` [Bug mi/28201] " tromey at sourceware dot org
@ 2021-08-06 17:53 ` tromey at sourceware dot org
  2021-08-15 19:56 ` yerimyah1 at gmail dot com
  2022-05-25 18:24 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2021-08-06 17:53 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28201

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-08-06
             Status|UNCONFIRMED                 |NEW

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug mi/28201] Unable to show children and to string pretty-printer values at the same time.
  2021-08-06 14:38 [Bug mi/28201] New: Unable to show children and to string pretty-printer values at the same time yerimyah1 at gmail dot com
  2021-08-06 16:07 ` [Bug mi/28201] " tromey at sourceware dot org
  2021-08-06 17:53 ` tromey at sourceware dot org
@ 2021-08-15 19:56 ` yerimyah1 at gmail dot com
  2022-05-25 18:24 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: yerimyah1 at gmail dot com @ 2021-08-15 19:56 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28201

--- Comment #2 from Ezike Ebuka <yerimyah1 at gmail dot com> ---
(In reply to Tom Tromey from comment #1)
> Yeah, back when we added Python pretty-printing, the MI maintainer
> requested this behavior.  I don't know why, as it seems un-useful to me.
> Perhaps we could lift this restriction and show the to_string output
> correctly in MI.  (Maybe only under the newest MI version, to keep
> compatibility.)

yeah that would be nice to remove the restriction on either the last or the
last two mi versions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug mi/28201] Unable to show children and to string pretty-printer values at the same time.
  2021-08-06 14:38 [Bug mi/28201] New: Unable to show children and to string pretty-printer values at the same time yerimyah1 at gmail dot com
                   ` (2 preceding siblings ...)
  2021-08-15 19:56 ` yerimyah1 at gmail dot com
@ 2022-05-25 18:24 ` tromey at sourceware dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at sourceware dot org @ 2022-05-25 18:24 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28201

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Marking this one as a dup, as the other bug is older and has a patch.

*** This bug has been marked as a duplicate of bug 11335 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-25 18:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 14:38 [Bug mi/28201] New: Unable to show children and to string pretty-printer values at the same time yerimyah1 at gmail dot com
2021-08-06 16:07 ` [Bug mi/28201] " tromey at sourceware dot org
2021-08-06 17:53 ` tromey at sourceware dot org
2021-08-15 19:56 ` yerimyah1 at gmail dot com
2022-05-25 18:24 ` tromey at sourceware dot org

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).