From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72965 invoked by alias); 1 May 2015 14:33:02 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 72832 invoked by uid 89); 1 May 2015 14:33:00 -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; Fri, 01 May 2015 14:32:59 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1YoBzs-0001TQ-GI from Luis_Gustavo@mentor.com for gdb-patches@sourceware.org; Fri, 01 May 2015 07:32:56 -0700 Received: from opsys.world.mentorg.com (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Fri, 1 May 2015 07:32:55 -0700 From: Luis Machado To: Subject: [PATCH 2/3] Add varobj zhexadecimal format tests. Date: Fri, 01 May 2015 14:33:00 -0000 Message-ID: <1430490758-23247-3-git-send-email-lgustavo@codesourcery.com> In-Reply-To: <1430490758-23247-1-git-send-email-lgustavo@codesourcery.com> References: <1430490758-23247-1-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00005.txt.bz2 This patch adds a few tests to exercise the new zhexadecimal format for varobj's. I see 5 FAIL's without the zhexadecimal format support and full passes with a zhexadecimal format support. I renamed some of the tests to make them unique. gdb/testsuite/ChangeLog: 2015-05-01 Luis Machado * gdb.mi/mi-var-display.exp: Add new checks for the zhexadecimal 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 zhexadecimal" \ + "\\^done,format=\"zhexadecimal\",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 zhexadecimal" \ + "\\^done,format=\"zhexadecimal\",value=\"$hex\"" \ + "set format variable weird.func_ptr in zero-padded hex" + +mi_gdb_test "-var-show-format weird.func_ptr" \ + "\\^done,format=\"zhexadecimal\"" \ + "show format variable weird.func_ptr (zhex)" + +mi_gdb_test "-var-set-format weird.func_ptr_ptr zhexadecimal" \ + "\\^done,format=\"zhexadecimal\",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=\"zhexadecimal\"" \ + "show format variable weird.func_ptr_ptr (zhex)" # Test: c_variable-6.24 # Desc: format of weird and children -- 1.9.1