* [PATCH 2/2] Doc 'dynamic' for command -var-list-children
2013-11-19 11:39 [PATCH 1/2] Update doc on displayhint in command -var-list-children Yao Qi
@ 2013-11-19 11:31 ` Yao Qi
2013-11-19 16:17 ` Eli Zaretskii
2013-11-19 16:22 ` [PATCH 1/2] Update doc on displayhint in " Eli Zaretskii
2013-11-19 17:05 ` Tom Tromey
2 siblings, 1 reply; 8+ messages in thread
From: Yao Qi @ 2013-11-19 11:31 UTC (permalink / raw)
To: gdb-patches
Hi,
I find "dynamic=1" appear in the result of each child of the output of
-var-list-children,
-var-list-children ss1
^done,numchild="2",children=[child={name="ss1.a",exp="a",numchild="0",type="struct s",thread-id="1",dynamic="1"},child={name="ss1.b",exp="b",numchild="0",type="struct s",thread-id="1",dynamic="1"}],has_more="0"
but the doc doesn't mention this. This patch is to copy the description
of "dynamic=1" here.
gdb/doc:
2013-11-19 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Variable Objects): Add attribute 'dynamic'
for the output of command -var-list-children.
---
gdb/doc/gdb.texinfo | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0f6046d..04fcb7b 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -32522,6 +32522,11 @@ A dynamic varobj can supply a display hint to the front end. The
value comes directly from the Python pretty-printer object's
@code{display_hint} method. @xref{Pretty Printing API}.
+@item dynamic
+This attribute will be present and have the value @samp{1} if the
+varobj is a dynamic varobj. If the varobj is not a dynamic varobj,
+then this attribute will not be present.
+
@end table
The result has its own attribute:
--
1.7.7.6
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Update doc on displayhint in command -var-list-children
@ 2013-11-19 11:39 Yao Qi
2013-11-19 11:31 ` [PATCH 2/2] Doc 'dynamic' for " Yao Qi
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Yao Qi @ 2013-11-19 11:39 UTC (permalink / raw)
To: gdb-patches
Hi,
When using command -var-list-children, "displayhint" is the result of
each child, instead of the attribute of the result, shown as the
following output.
-var-list-children ss1
^done,numchild="2",displayhint="pp_ss",children=[child={name="ss1.a",exp="a",numchild="0",type="struct s",thread-id="1",displayhint="pp_s",dynamic="1"},child={name="ss1.b",exp="b",numchild="0",type="struct s",thread-id="1",displayhint="pp_s",dynamic="1"}],has_more="0"
Current doc on command -var-list-children doesn't reflect this. This
patch is to fix it.
This patch also changes one line
from "This result may have its own attributes"
to "This result has its own attribute".
gdb/doc:
2013-11-19 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Variable Objects): Move the description
of "displayhint" to the table about child results.
---
gdb/doc/gdb.texinfo | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 19e9aa5..0f6046d 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -32516,16 +32516,18 @@ Otherwise this result is not present.
@item frozen
If the variable object is frozen, this variable will be present with a value of 1.
-@end table
-
-The result may have its own attributes:
-@table @samp
@item displayhint
A dynamic varobj can supply a display hint to the front end. The
value comes directly from the Python pretty-printer object's
@code{display_hint} method. @xref{Pretty Printing API}.
+@end table
+
+The result has its own attribute:
+
+@table @samp
+
@item has_more
This is an integer attribute which is nonzero if there are children
remaining after the end of the selected range.
--
1.7.7.6
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Doc 'dynamic' for command -var-list-children
2013-11-19 11:31 ` [PATCH 2/2] Doc 'dynamic' for " Yao Qi
@ 2013-11-19 16:17 ` Eli Zaretskii
2013-11-21 3:52 ` Yao Qi
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2013-11-19 16:17 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
> From: Yao Qi <yao@codesourcery.com>
> Date: Tue, 19 Nov 2013 19:28:36 +0800
>
> I find "dynamic=1" appear in the result of each child of the output of
> -var-list-children,
>
> -var-list-children ss1
> ^done,numchild="2",children=[child={name="ss1.a",exp="a",numchild="0",type="struct s",thread-id="1",dynamic="1"},child={name="ss1.b",exp="b",numchild="0",type="struct s",thread-id="1",dynamic="1"}],has_more="0"
>
> but the doc doesn't mention this. This patch is to copy the description
> of "dynamic=1" here.
The patch is OK, but I wonder why we use "1" and not something like
"true" or "yes".
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Update doc on displayhint in command -var-list-children
2013-11-19 11:39 [PATCH 1/2] Update doc on displayhint in command -var-list-children Yao Qi
2013-11-19 11:31 ` [PATCH 2/2] Doc 'dynamic' for " Yao Qi
@ 2013-11-19 16:22 ` Eli Zaretskii
2013-11-19 17:05 ` Tom Tromey
2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2013-11-19 16:22 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
> From: Yao Qi <yao@codesourcery.com>
> Date: Tue, 19 Nov 2013 19:28:35 +0800
>
> When using command -var-list-children, "displayhint" is the result of
> each child, instead of the attribute of the result, shown as the
> following output.
>
> -var-list-children ss1
> ^done,numchild="2",displayhint="pp_ss",children=[child={name="ss1.a",exp="a",numchild="0",type="struct s",thread-id="1",displayhint="pp_s",dynamic="1"},child={name="ss1.b",exp="b",numchild="0",type="struct s",thread-id="1",displayhint="pp_s",dynamic="1"}],has_more="0"
>
> Current doc on command -var-list-children doesn't reflect this. This
> patch is to fix it.
OK, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Update doc on displayhint in command -var-list-children
2013-11-19 11:39 [PATCH 1/2] Update doc on displayhint in command -var-list-children Yao Qi
2013-11-19 11:31 ` [PATCH 2/2] Doc 'dynamic' for " Yao Qi
2013-11-19 16:22 ` [PATCH 1/2] Update doc on displayhint in " Eli Zaretskii
@ 2013-11-19 17:05 ` Tom Tromey
2013-11-20 2:16 ` Yao Qi
2 siblings, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2013-11-19 17:05 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> When using command -var-list-children, "displayhint" is the result of
Yao> each child, instead of the attribute of the result, shown as the
Yao> following output.
This seems wrong to me.
If a varobj has a pretty-printer, then the display hint is an attribute
of that printer. It ought to be printed as an attribute of the result.
Of course, child objects can have their own pretty-printers, and thus
their own display hints.
I couldn't find any tests that explicitly examined the display hint.
That seems wrong too... I know the python code in the test suite returns
values here, but nothing seems to check them.
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Update doc on displayhint in command -var-list-children
2013-11-19 17:05 ` Tom Tromey
@ 2013-11-20 2:16 ` Yao Qi
2013-11-22 20:02 ` Tom Tromey
0 siblings, 1 reply; 8+ messages in thread
From: Yao Qi @ 2013-11-20 2:16 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 11/20/2013 12:32 AM, Tom Tromey wrote:
> If a varobj has a pretty-printer, then the display hint is an attribute
> of that printer. It ought to be printed as an attribute of the result.
>
> Of course, child objects can have their own pretty-printers, and thus
> their own display hints.
How about adding the description of "displayhint" in child result?
--
Yao (é½å°§)
gdb/doc:
2013-11-20 Yao Qi <yao@codesourcery.com>
* gdb.texinfo (GDB/MI Variable Objects): Add the description
of "displayhint" to the table about child results.
---
gdb/doc/gdb.texinfo | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 19e9aa5..d26cd0e 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -32516,6 +32516,12 @@ Otherwise this result is not present.
@item frozen
If the variable object is frozen, this variable will be present with a value of 1.
+
+@item displayhint
+A dynamic varobj can supply a display hint to the front end. The
+value comes directly from the Python pretty-printer object's
+@code{display_hint} method. @xref{Pretty Printing API}.
+
@end table
The result may have its own attributes:
--
1.7.7.6
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] Doc 'dynamic' for command -var-list-children
2013-11-19 16:17 ` Eli Zaretskii
@ 2013-11-21 3:52 ` Yao Qi
0 siblings, 0 replies; 8+ messages in thread
From: Yao Qi @ 2013-11-21 3:52 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
On 11/20/2013 12:16 AM, Eli Zaretskii wrote:
> The patch is OK, but I wonder why we use "1" and not something like
> "true" or "yes".
I don't know, go through the archive, and find that part was added by
"dynamic varobj" patch. Don't see anything on why "1" is used, but I
guess it follows the way how "frozen" is displayed.
Patch is committed.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Update doc on displayhint in command -var-list-children
2013-11-20 2:16 ` Yao Qi
@ 2013-11-22 20:02 ` Tom Tromey
0 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2013-11-22 20:02 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:
Yao> On 11/20/2013 12:32 AM, Tom Tromey wrote:
>> If a varobj has a pretty-printer, then the display hint is an attribute
>> of that printer. It ought to be printed as an attribute of the result.
>>
>> Of course, child objects can have their own pretty-printers, and thus
>> their own display hints.
Yao> How about adding the description of "displayhint" in child result?
It seems reasonable to me.
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-11-22 20:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-19 11:39 [PATCH 1/2] Update doc on displayhint in command -var-list-children Yao Qi
2013-11-19 11:31 ` [PATCH 2/2] Doc 'dynamic' for " Yao Qi
2013-11-19 16:17 ` Eli Zaretskii
2013-11-21 3:52 ` Yao Qi
2013-11-19 16:22 ` [PATCH 1/2] Update doc on displayhint in " Eli Zaretskii
2013-11-19 17:05 ` Tom Tromey
2013-11-20 2:16 ` Yao Qi
2013-11-22 20:02 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox