From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22647 invoked by alias); 24 Nov 2013 02:12:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22495 invoked by uid 89); 24 Nov 2013 02:12:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 24 Nov 2013 02:12:07 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VkPAw-0006qP-Uq from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Sat, 23 Nov 2013 18:11:54 -0800 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 23 Nov 2013 18:11:54 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Sat, 23 Nov 2013 18:11:53 -0800 From: Yao Qi To: Subject: [PATCH 06/11] Use varobj_is_dynamic_p more widely Date: Sun, 24 Nov 2013 02:12:00 -0000 Message-ID: <1385258996-26047-7-git-send-email-yao@codesourcery.com> In-Reply-To: <1385258996-26047-1-git-send-email-yao@codesourcery.com> References: <1385258996-26047-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00737.txt.bz2 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: 2013-11-24 Yao Qi * varobj.c (varobj_get_num_children): Call varobj_is_dynamic_p. (varobj_list_children): Likewise. (varobj_update): Likewise. Update comments. --- gdb/varobj.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gdb/varobj.c b/gdb/varobj.c index 948f80c..0e0be6c 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 @@ -1715,10 +1715,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; -- 1.7.7.6