public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MI: Allow non-raw varobj evaluation
@ 2018-01-24 17:32 Leszek Swirski via gdb-patches
  2018-01-25  2:53 ` Simon Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Leszek Swirski via gdb-patches @ 2018-01-24 17:32 UTC (permalink / raw)
  To: gdb-patches; +Cc: Leszek Swirski

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-02 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 17:32 [PATCH] MI: Allow non-raw varobj evaluation Leszek Swirski via gdb-patches
2018-01-25  2:53 ` Simon Marchi
2018-01-25 11:11   ` Leszek Swirski via gdb-patches
2018-02-02  4:27     ` Simon Marchi
2018-02-02  9:01       ` Leszek Swirski via gdb-patches
2018-02-02 19:05         ` Simon Marchi

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).