From patchwork Thu May 7 17:36:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Machado X-Patchwork-Id: 6611 Received: (qmail 76596 invoked by alias); 7 May 2015 17:37:05 -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 76445 invoked by uid 89); 7 May 2015 17:37:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 07 May 2015 17:37:03 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YqPjH-0006hH-BQ from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Thu, 07 May 2015 10:36:59 -0700 Received: from opsys.world.mentorg.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.224.2; Thu, 7 May 2015 10:36:58 -0700 From: Luis Machado To: Subject: [PATCH v2 2/3] Add varobj zero-hexadecimal format tests. Date: Thu, 7 May 2015 14:36:46 -0300 Message-ID: <1431020207-14371-3-git-send-email-lgustavo@codesourcery.com> In-Reply-To: <1431020207-14371-1-git-send-email-lgustavo@codesourcery.com> References: <1431020207-14371-1-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch adds a few tests to exercise the new zero-hexadecimal format for varobj's. I see 5 FAIL's without the zero-hexadecimal format support and full passes with a zero-hexadecimal format support. I renamed some of the tests to make them unique. gdb/testsuite/ChangeLog: 2015-05-07 Luis Machado * gdb.mi/mi-var-display.exp: Add new checks for the zero-hexadecimal format and change test names to make them unique. --- gdb/testsuite/gdb.mi/mi-var-display.exp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-var-display.exp b/gdb/testsuite/gdb.mi/mi-var-display.exp index 31bdce4..6aedb53 100644 --- a/gdb/testsuite/gdb.mi/mi-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi-var-display.exp @@ -81,6 +81,11 @@ mi_gdb_test "-var-evaluate-expression bar" \ "eval variable bar" # Test: c_variable-6.5 +# Desc: change format of bar to zero-padded hexadecimal +mi_gdb_test "-var-set-format bar zero-hexadecimal" \ + "\\^done,format=\"zero-hexadecimal\",value=\"0x0.*849\"" \ + "set format variable bar in zero-padded hexadecimal" + # Desc: change format of bar to hex mi_gdb_test "-var-set-format bar hexadecimal" \ "\\^done,format=\"hexadecimal\",value=\"0x849\"" \ @@ -241,7 +246,7 @@ mi_gdb_test "-var-set-format weird.func_ptr hexadecimal" \ mi_gdb_test "-var-show-format weird.func_ptr" \ "\\^done,format=\"hexadecimal\"" \ - "show format variable weird.func_ptr" + "show format variable weird.func_ptr (hex)" mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \ "\\^done,format=\"hexadecimal\",value=\"$hex\"" \ @@ -249,7 +254,23 @@ mi_gdb_test "-var-set-format weird.func_ptr_ptr hexadecimal" \ mi_gdb_test "-var-show-format weird.func_ptr_ptr" \ "\\^done,format=\"hexadecimal\"" \ - "show format variable weird.func_ptr_ptr" + "show format variable weird.func_ptr_ptr (hex)" + +mi_gdb_test "-var-set-format weird.func_ptr zero-hexadecimal" \ + "\\^done,format=\"zero-hexadecimal\",value=\"$hex\"" \ + "set format variable weird.func_ptr in zero-padded hex" + +mi_gdb_test "-var-show-format weird.func_ptr" \ + "\\^done,format=\"zero-hexadecimal\"" \ + "show format variable weird.func_ptr (zhex)" + +mi_gdb_test "-var-set-format weird.func_ptr_ptr zero-hexadecimal" \ + "\\^done,format=\"zero-hexadecimal\",value=\"$hex\"" \ + "set format variable weird.func_ptr_ptr in zero-padded hex" + +mi_gdb_test "-var-show-format weird.func_ptr_ptr" \ + "\\^done,format=\"zero-hexadecimal\"" \ + "show format variable weird.func_ptr_ptr (zhex)" # Test: c_variable-6.24 # Desc: format of weird and children