aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-11-23 16:05:58 +0800
committerYao Qi <yao@codesourcery.com>2014-06-12 15:27:42 +0800
commit31f628ae8f5aada207d489fbcf5436bdc3b4b3f7 (patch)
tree2b90c063e7a9ff14cfab43fe1d6d846aba16c4d7 /gdb
parentcde5ef40f807cf37ac4fc5adcf621c615049eda9 (diff)
downloadgdb-31f628ae8f5aada207d489fbcf5436bdc3b4b3f7.zip
gdb-31f628ae8f5aada207d489fbcf5436bdc3b4b3f7.tar.gz
gdb-31f628ae8f5aada207d489fbcf5436bdc3b4b3f7.tar.bz2
Use varobj_is_dynamic_p more widely
Use varobj_is_dynamic_p more widely so that the callers of varobj_is_dynamic_p are unchanged when we add available-children-only stuff in varobj_is_dynamic_p. gdb: 2014-06-12 Yao Qi <yao@codesourcery.com> * varobj.c (varobj_get_num_children): Call varobj_is_dynamic_p. (varobj_list_children): Likewise. (varobj_update): Likewise. Update comments.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/varobj.c11
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 55146f4..d3bd642 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2014-06-12 Yao Qi <yao@codesourcery.com>
+ * varobj.c (varobj_get_num_children): Call
+ varobj_is_dynamic_p.
+ (varobj_list_children): Likewise.
+ (varobj_update): Likewise. Update comments.
+
+2014-06-12 Yao Qi <yao@codesourcery.com>
+
* varobj.c (varobj_pretty_printed_p): Rename to ...
(varobj_is_dynamic_p): ... this. New function.
* varobj.h (varobj_pretty_printed_p): Remove declaration.
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 94050c6..8f95cc2 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -895,7 +895,7 @@ varobj_get_num_children (struct varobj *var)
{
if (var->num_children == -1)
{
- if (var->dynamic->pretty_printer != NULL)
+ if (varobj_is_dynamic_p (var))
{
int dummy;
@@ -922,7 +922,7 @@ varobj_list_children (struct varobj *var, int *from, int *to)
var->dynamic->children_requested = 1;
- if (var->dynamic->pretty_printer != NULL)
+ if (varobj_is_dynamic_p (var))
{
/* This, in theory, can result in the number of children changing without
frontend noticing. But well, calling -var-list-children on the same
@@ -1724,10 +1724,9 @@ varobj_update (struct varobj **varp, int explicit)
}
}
- /* We probably should not get children of a varobj that has a
- pretty-printer, but for which -var-list-children was never
- invoked. */
- if (v->dynamic->pretty_printer != NULL)
+ /* We probably should not get children of a dynamic varobj, but
+ for which -var-list-children was never invoked. */
+ if (varobj_is_dynamic_p (v))
{
VEC (varobj_p) *changed = 0, *type_changed = 0, *unchanged = 0;
VEC (varobj_p) *new = 0;