This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] MI: Allow non-raw varobj evaluation
- From: "Leszek Swirski via gdb-patches" <gdb-patches at sourceware dot org>
- To: gdb-patches at sourceware dot org
- Cc: Leszek Swirski <leszeks at google dot com>
- Date: Wed, 24 Jan 2018 17:32:23 +0000
- Subject: [PATCH] MI: Allow non-raw varobj evaluation
- Authentication-results: sourceware.org; auth=none
- Reply-to: Leszek Swirski <leszeks at google dot com>
Make the MI variable object expression evaluation, with the
-var-evaluate-expression command, recursively call pretty printers, to
match the output of normal expression printing.
This is gated behind the -enable-pretty-printing command.
gdb/ChangeLog:
* varobj.c (varobj_formatted_print_options): Allow recursive
pretty printing if pretty printing is enabled.
---
gdb/ChangeLog | 5 +++++
gdb/varobj.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 17a5a84b0c..7c53cf07b6 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-24 Leszek Swirski <leszeks@google.com>
+
+ * varobj.c (varobj_formatted_print_options): Allow recursive
+ pretty printing if pretty printing is enabled.
+
2018-01-24 Leszek Swirski <leszeks@google.com>
* c-exp.y (lex_one_token, classify_name, yylex): Don't classify
diff --git a/gdb/varobj.c b/gdb/varobj.c
index b6a2d8f369..f23243f3b7 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -2274,7 +2274,7 @@ varobj_formatted_print_options (struct value_print_options *opts,
{
get_formatted_print_options (opts, format_code[(int) format]);
opts->deref_ref = 0;
- opts->raw = 1;
+ opts->raw = !pretty_printing;
}
std::string
--
2.16.0.rc1.238.g530d649a79-goog