From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 05/11] Rename varobj_pretty_printed_p to varobj_is_dynamic_p
Date: Sun, 24 Nov 2013 02:12:00 -0000 [thread overview]
Message-ID: <1385258996-26047-6-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1385258996-26047-1-git-send-email-yao@codesourcery.com>
We think varobj with --available-children-only behaves like a dynamic
varobj, so dyanmic varobj is not pretty-printer specific. We rename
varobj_pretty_printed_p to varobj_is_dynamic_p, so that we can handle
available-children-only checking in varobj_is_dynamic_p in the next
patch.
gdb:
2013-11-24 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.
(varobj_is_dynamic_p): Declare.
* mi/mi-cmd-var.c (print_varobj): Caller update.
(mi_print_value_p, varobj_update_one): Likewise.
---
gdb/mi/mi-cmd-var.c | 6 +++---
gdb/varobj.c | 4 +++-
gdb/varobj.h | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 84cdc15..2201630 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -88,7 +88,7 @@ print_varobj (struct varobj *var, enum print_values print_values,
xfree (display_hint);
}
- if (varobj_pretty_printed_p (var))
+ if (varobj_is_dynamic_p (var))
ui_out_field_int (uiout, "dynamic", 1);
}
@@ -352,7 +352,7 @@ mi_print_value_p (struct varobj *var, enum print_values print_values)
if (print_values == PRINT_ALL_VALUES)
return 1;
- if (varobj_pretty_printed_p (var))
+ if (varobj_is_dynamic_p (var))
return 1;
type = varobj_get_gdb_type (var);
@@ -777,7 +777,7 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
xfree (display_hint);
}
- if (varobj_pretty_printed_p (r->varobj))
+ if (varobj_is_dynamic_p (r->varobj))
ui_out_field_int (uiout, "dynamic", 1);
varobj_get_child_range (r->varobj, &from, &to);
diff --git a/gdb/varobj.c b/gdb/varobj.c
index e362229..948f80c 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1066,8 +1066,10 @@ varobj_get_attributes (struct varobj *var)
return attributes;
}
+/* Return true if VAR is a dynamic varobj. */
+
int
-varobj_pretty_printed_p (struct varobj *var)
+varobj_is_dynamic_p (struct varobj *var)
{
return var->dynamic->pretty_printer != NULL;
}
diff --git a/gdb/varobj.h b/gdb/varobj.h
index 0f68311..60ace6f 100644
--- a/gdb/varobj.h
+++ b/gdb/varobj.h
@@ -306,7 +306,7 @@ extern void varobj_enable_pretty_printing (void);
extern int varobj_has_more (struct varobj *var, int to);
-extern int varobj_pretty_printed_p (struct varobj *var);
+extern int varobj_is_dynamic_p (struct varobj *var);
extern struct cleanup *varobj_ensure_python_env (struct varobj *var);
--
1.7.7.6
next prev parent reply other threads:[~2013-11-24 2:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 5:04 [RCF 00/11] Visit varobj available children only in MI Yao Qi
2013-11-24 2:12 ` [PATCH 11/11] Test case Yao Qi
2014-01-21 20:49 ` Keith Seitz
2013-11-24 2:12 ` Yao Qi [this message]
2014-01-21 20:44 ` [PATCH 05/11] Rename varobj_pretty_printed_p to varobj_is_dynamic_p Keith Seitz
2013-11-24 2:12 ` [PATCH 08/11] Iterator varobj_items by their availability Yao Qi
2014-01-21 20:46 ` Keith Seitz
2013-11-24 2:12 ` [PATCH 01/11] Use 'struct varobj_item' to represent name and value pair Yao Qi
2014-01-21 20:43 ` Keith Seitz
2014-01-22 1:00 ` Doug Evans
2014-01-23 4:08 ` Yao Qi
2014-01-23 16:08 ` Doug Evans
2013-11-24 2:12 ` [PATCH 02/11] Generalize varobj iterator Yao Qi
2014-01-21 20:44 ` Keith Seitz
2014-01-22 1:07 ` Doug Evans
2013-11-24 2:12 ` [PATCH 06/11] Use varobj_is_dynamic_p more widely Yao Qi
2014-01-21 20:44 ` Keith Seitz
2013-11-24 2:12 ` [PATCH 04/11] Remove #if HAVE_PYTHON Yao Qi
2014-01-21 20:44 ` Keith Seitz
2013-11-24 2:12 ` [PATCH 03/11] Iterate over 'struct varobj_item' instead of PyObject Yao Qi
2014-01-21 20:44 ` Keith Seitz
2013-11-24 2:12 ` [PATCH 07/11] MI option --available-children-only Yao Qi
2014-01-21 20:45 ` Keith Seitz
2013-11-24 2:12 ` [PATCH 10/11] Match dynamic="1" in the output of -var-list-children Yao Qi
2014-01-21 20:47 ` Keith Seitz
2013-11-24 2:12 ` [PATCH 09/11] Delete varobj's children on traceframe is changed Yao Qi
2014-01-21 20:47 ` Keith Seitz
2013-12-02 9:09 ` [RCF 00/11] Visit varobj available children only in MI Yao Qi
2013-12-17 12:54 ` Yao Qi
2014-01-07 18:22 ` Keith Seitz
2014-01-08 11:41 ` Joel Brobecker
2014-01-08 14:27 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385258996-26047-6-git-send-email-yao@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).