* [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
@ 2015-04-20 14:40 ` david.docteur at intel dot com
2015-04-20 15:37 ` xdje42 at gmail dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: david.docteur at intel dot com @ 2015-04-20 14:40 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
David Docteur <david.docteur at intel dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Pretty Printers - prints |Pretty Printers - unable to
|string value as char[] from |create variable object
|children() |(string value from
| |children())
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
2015-04-20 14:40 ` [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children()) david.docteur at intel dot com
@ 2015-04-20 15:37 ` xdje42 at gmail dot com
2015-04-21 13:03 ` david.docteur at intel dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: xdje42 at gmail dot com @ 2015-04-20 15:37 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Doug Evans <xdje42 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xdje42 at gmail dot com
--- Comment #1 from Doug Evans <xdje42 at gmail dot com> ---
This is related to bug 17529.
There may even be an existing bug for this (Eclipse printing value as a char
array). Not sure about the MI errors though.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
2015-04-20 14:40 ` [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children()) david.docteur at intel dot com
2015-04-20 15:37 ` xdje42 at gmail dot com
@ 2015-04-21 13:03 ` david.docteur at intel dot com
2021-07-02 20:32 ` alex.zhigay at yandex dot ru
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: david.docteur at intel dot com @ 2015-04-21 13:03 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
--- Comment #3 from David Docteur <david.docteur at intel dot com> ---
Created attachment 8258
--> https://sourceware.org/bugzilla/attachment.cgi?id=8258&action=edit
using same name as in class attributes
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (2 preceding siblings ...)
2015-04-21 13:03 ` david.docteur at intel dot com
@ 2021-07-02 20:32 ` alex.zhigay at yandex dot ru
2023-08-31 16:13 ` tromey at sourceware dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: alex.zhigay at yandex dot ru @ 2021-07-02 20:32 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Alex <alex.zhigay at yandex dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alex.zhigay at yandex dot ru
--- Comment #4 from Alex <alex.zhigay at yandex dot ru> ---
Any workaround for this problem? How to return string from children()?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug mi/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (3 preceding siblings ...)
2021-07-02 20:32 ` alex.zhigay at yandex dot ru
@ 2023-08-31 16:13 ` tromey at sourceware dot org
2023-08-31 17:17 ` [Bug varobj/18282] " tromey at sourceware dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 16:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
This seems to be two different bugs.
First, if children returns strings, they don't seem to appear.
I get this from my test:
^done,numchild="5",children=[child={name="tval.1",exp="1",numchild="8",value="[8]",type="char
[8]"},child={name="tval.2",exp="2",numchild="7",value="[7]",type="char
[7]"},child={name="tval.3",exp="3",numchild="7",value="[7]",type="char
[7]"},child={name="tval.4",exp="4",numchild="7",value="[7]",type="char
[7]"},child={name="tval.5",exp="5",numchild="6",value="[6]",type="char
[6]"}],has_more="0"
The string values don't appear at all, instead for some reason
we're getting map "indices".
Second, the name returned by the printer doesn't necessarily
correspond to any kind of sub-object. This is the part that is
bug#17529.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug varobj/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (4 preceding siblings ...)
2023-08-31 16:13 ` tromey at sourceware dot org
@ 2023-08-31 17:17 ` tromey at sourceware dot org
2023-08-31 17:54 ` tromey at sourceware dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 17:17 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|mi |varobj
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug varobj/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (5 preceding siblings ...)
2023-08-31 17:17 ` [Bug varobj/18282] " tromey at sourceware dot org
@ 2023-08-31 17:54 ` tromey at sourceware dot org
2023-08-31 18:21 ` tromey at sourceware dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 17:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
This turns out to be this code in c_value_of_variable:
case TYPE_CODE_ARRAY:
return string_printf ("[%d]", var->num_children);
i.e., the weird short-circuiting thing strikes again.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug varobj/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (6 preceding siblings ...)
2023-08-31 17:54 ` tromey at sourceware dot org
@ 2023-08-31 18:21 ` tromey at sourceware dot org
2023-09-07 20:06 ` cvs-commit at gcc dot gnu.org
2023-09-07 20:07 ` tromey at sourceware dot org
9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-08-31 18:21 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
I have a mildly hacky (given varobj, what else) patch for this.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug varobj/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (7 preceding siblings ...)
2023-08-31 18:21 ` tromey at sourceware dot org
@ 2023-09-07 20:06 ` cvs-commit at gcc dot gnu.org
2023-09-07 20:07 ` tromey at sourceware dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-07 20:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aa15623fe68b3151ed54a7365b5a5226b538851a
commit aa15623fe68b3151ed54a7365b5a5226b538851a
Author: Tom Tromey <tromey@adacore.com>
Date: Thu Aug 31 13:01:00 2023 -0600
Allow pretty-printer 'children' method to return strings
A user noticed that, while a pretty-printer can return Python strings
from its "children" method, this does not really work for MI. I
tracked this down to my_value_of_variable calling into
c_value_of_variable, which specially handles arrays and structures --
not using the actual contents of the string.
Now, this part of MI seems bad to me, but rather than change that,
this applies the fix to only dynamic varobjs, which is the only
scenario where a string like this can really be returned.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Reviewed-by: Keith Seitz <keiths@redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug varobj/18282] Pretty Printers - unable to create variable object (string value from children())
2015-04-20 14:32 [Bug mi/18282] New: Pretty Printers - prints string value as char[] from children() david.docteur at intel dot com
` (8 preceding siblings ...)
2023-09-07 20:06 ` cvs-commit at gcc dot gnu.org
@ 2023-09-07 20:07 ` tromey at sourceware dot org
9 siblings, 0 replies; 11+ messages in thread
From: tromey at sourceware dot org @ 2023-09-07 20:07 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=18282
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.1
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #9 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread