From patchwork Wed Jan 24 17:32:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Terekhov, Mikhail via Gdb-patches" X-Patchwork-Id: 25499 Received: (qmail 100457 invoked by alias); 24 Jan 2018 17:32:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 100440 invoked by uid 89); 24 Jan 2018 17:32:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-34.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, T_RP_MATCHES_RCVD, USER_IN_DEF_SPF_WL autolearn=ham version=3.3.2 spammy=H*MI:google X-HELO: mail-ua0-f201.google.com Received: from mail-ua0-f201.google.com (HELO mail-ua0-f201.google.com) (209.85.217.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jan 2018 17:32:30 +0000 Received: by mail-ua0-f201.google.com with SMTP id t31so2884699uad.4 for ; Wed, 24 Jan 2018 09:32:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=M2t8cEK2KVY8BrEsNfs7uMwN5StycD/dRJmSDE11aZo=; b=KqMl7SO871fgf5JnfF2BhYF16TBfBbC9zltve9SeBgxRaqIdSIKcnkBlFXo/DHK6wD ymew/qCZrUJfBYRe48nt7K/39YUV4KjmrcEbvCo93EbxBxm+hqVcef4YtedHOYx6xgAm GAkbFXFmtKuN9QyG2OzNxkCXiUsrBHwUqBQDYzcmR0VZPtWblzILBsnfuFmIpLdxX8pa Pdw908Jj8sWBF+HgCJXcG8+Tsn7aohpB2a47GwrOZvxNvgQwSaxL9/vx2FCOvt9f4KpI 8DtedHhiG5am0QXBuXUrKguIXYcKo/FHVwDcvEIWRyE97tcXiGV8O8jLgAx4KljS77q5 FFeg== X-Gm-Message-State: AKwxyte/VwkebCMhtO85HoBOk0pFlP+seuz+BavFk6GWdh74iuEjBNqk 2eGpsYrmp5HuBpRB3qGy7okPnjTZHFBI55Q5VtJSLjFxGRIqkkflZFjiMH8Ye2olJtPw5tHSwOY s5p+f7w2mzZ4+XOLH29jMq0lNqMP/nOqLbeb85yLGtkJE1r1l7WA9eel07N27/7kJ+M8jaw== X-Google-Smtp-Source: AH8x226dObXFJz3SA/jO+aJY769+kUGFnu2cOiYCo8E9ZgyGvTh0IxYfJGM6y21vXnxpmivcjuzSkLew33MQ MIME-Version: 1.0 X-Received: by 10.31.252.9 with SMTP id a9mr3446427vki.101.1516815148459; Wed, 24 Jan 2018 09:32:28 -0800 (PST) Date: Wed, 24 Jan 2018 17:32:23 +0000 Message-Id: <20180124173223.213808-1-leszeks@google.com> Subject: [PATCH] MI: Allow non-raw varobj evaluation X-Patchwork-Original-From: "Leszek Swirski via gdb-patches" From: "Terekhov, Mikhail via Gdb-patches" Reply-To: Leszek Swirski To: gdb-patches@sourceware.org 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 + + * varobj.c (varobj_formatted_print_options): Allow recursive + pretty printing if pretty printing is enabled. + 2018-01-24 Leszek Swirski * 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