public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-tromey-python: gdb * mi/mi-cmd-var.c (print_varobj): Emit "dynamic" field. (varobj_update_one): Likewise. gdb/doc * gdb.texinfo (GDB/MI Variable Objects): Mention 'dynamic' attribute. gdb/testsuite * gdb.python/python-mi.exp: Update.
@ 2009-09-10 19:03 tromey
0 siblings, 0 replies; only message in thread
From: tromey @ 2009-09-10 19:03 UTC (permalink / raw)
To: archer-commits
The branch, archer-tromey-python has been updated
via b02b257244bed85db06668437ba4d07d607f51ed (commit)
from a8410538b974dde386e80897b7dc581e6ff3f6c9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit b02b257244bed85db06668437ba4d07d607f51ed
Author: Tom Tromey <tromey@redhat.com>
Date: Thu Sep 10 13:01:08 2009 -0600
gdb
* mi/mi-cmd-var.c (print_varobj): Emit "dynamic" field.
(varobj_update_one): Likewise.
gdb/doc
* gdb.texinfo (GDB/MI Variable Objects): Mention 'dynamic'
attribute.
gdb/testsuite
* gdb.python/python-mi.exp: Update.
-----------------------------------------------------------------------
Summary of changes:
gdb/doc/gdb.texinfo | 10 ++++++++++
gdb/mi/mi-cmd-var.c | 6 ++++++
gdb/testsuite/gdb.python/python-mi.exp | 18 +++++++++---------
3 files changed, 25 insertions(+), 9 deletions(-)
First 500 lines of diff:
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 374d113..2adf43a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -23860,6 +23860,11 @@ the thread's identifier.
@item has_more
For a dynamic varobj, this indicates whether there appear to be any
children available. For a non-dynamic varobj, this will be 0.
+
+@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
Typical output will look like this:
@@ -24270,6 +24275,11 @@ The display hint, if any.
This is an integer value, which will be 1 if there are more children
available outside the varobj's update range.
+@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.
+
@item new_children
If new children were added to a dynamic varobj within the selected
update range (as set by @code{-var-set-update-range}), then they will
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 81d7e02..ede928c 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -79,6 +79,9 @@ print_varobj (struct varobj *var, enum print_values print_values,
if (varobj_get_frozen (var))
ui_out_field_int (uiout, "frozen", 1);
+
+ if (varobj_pretty_printed_p (var))
+ ui_out_field_int (uiout, "dynamic", 1);
}
/* VAROBJ operations */
@@ -759,6 +762,9 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
xfree (display_hint);
}
+ if (varobj_pretty_printed_p (var))
+ ui_out_field_int (uiout, "dynamic", 1);
+
varobj_get_child_range (r->varobj, &from, &to);
ui_out_field_int (uiout, "has_more",
varobj_has_more (r->varobj, to));
diff --git a/gdb/testsuite/gdb.python/python-mi.exp b/gdb/testsuite/gdb.python/python-mi.exp
index 0178270..bfdb595 100644
--- a/gdb/testsuite/gdb.python/python-mi.exp
+++ b/gdb/testsuite/gdb.python/python-mi.exp
@@ -69,7 +69,7 @@ mi_gdb_test "-data-evaluate-expression \"string_1 = string_2\"" ".*" \
"assign string_1 from string_2"
mi_gdb_test "-var-update string" \
- "\\^done,changelist=\\\[{name=\"string\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"}\\\]" \
+ "\\^done,changelist=\\\[{name=\"string\",in_scope=\"true\",type_changed=\"false\",dynamic=\"1\",has_more=\"0\"}\\\]" \
"update string varobj after assignment"
mi_create_dynamic_varobj container c \
@@ -81,7 +81,7 @@ mi_list_varobj_children container {
mi_next "next over update 1"
mi_varobj_update_dynamic container "varobj update 1" {
- type_changed false new_num_children 1 has_more 0
+ type_changed false new_num_children 1 dynamic 1 has_more 0
} {
} {
{ name {container.\[0\]} exp {\[0\]} numchild 0 type int thread-id 1 }
@@ -90,7 +90,7 @@ mi_varobj_update_dynamic container "varobj update 1" {
mi_next "next over update 2"
mi_varobj_update_dynamic container "varobj update 2" {
- type_changed false new_num_children 2 has_more 0
+ type_changed false new_num_children 2 dynamic 1 has_more 0
} {
} {
{ name {container.\[1\]} exp {\[1\]} numchild 0 type int thread-id 1 }
@@ -109,7 +109,7 @@ mi_gdb_test "-var-set-visualizer container gdb.default_visualizer" \
"choose default visualizer"
mi_varobj_update_dynamic container "varobj update after choosing default" {
- type_changed false new_num_children 2 has_more 0
+ type_changed false new_num_children 2 dynamic 1 has_more 0
} {
} {
{ name {container.\[0\]} exp {\[0\]} numchild 0 type int thread-id 1 }
@@ -122,7 +122,7 @@ mi_gdb_test "-var-set-visualizer container ContainerPrinter" \
mi_varobj_update_dynamic container \
"varobj update after choosing via expression" {
- type_changed false new_num_children 2 has_more 0
+ type_changed false new_num_children 2 dynamic 1 has_more 0
} {
} {
{ name {container.\[0\]} exp {\[0\]} numchild 0 type int thread-id 1 }
@@ -178,16 +178,16 @@ mi_next "next over update 5"
# should not actually see them.
mi_varobj_update_dynamic container2 \
"update varobj 2, no children requested" {
- type_changed false has_more 1
+ type_changed false dynamic 1 has_more 1
} {} {}
# This should only show the first child, because the update range has
# been set.
mi_varobj_update_dynamic container \
"update after next with restricted range" {
- type_changed false new_num_children 1 has_more 1
+ type_changed false new_num_children 1 dynamic 1 has_more 1
} {
- { name {container.\[0\]} in_scope true type_changed false has_more 0 }
+ { name {container.\[0\]} in_scope true type_changed false dynamic 1 has_more 0 }
} {
}
@@ -211,7 +211,7 @@ mi_list_varobj_children outer.s {
mi_next "next over outer update"
mi_gdb_test "-var-update outer" \
- ".done,changelist=.{name=\"outer.s.a\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"}." \
+ ".done,changelist=.{name=\"outer.s.a\",in_scope=\"true\",type_changed=\"false\",dynamic=\"1\",has_more=\"0\"}." \
"update after updating element of outer"
mi_continue_to_line \
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-10 19:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10 19:03 [SCM] archer-tromey-python: gdb * mi/mi-cmd-var.c (print_varobj): Emit "dynamic" field. (varobj_update_one): Likewise. gdb/doc * gdb.texinfo (GDB/MI Variable Objects): Mention 'dynamic' attribute. gdb/testsuite * gdb.python/python-mi.exp: Update tromey
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).