From patchwork Fri Jul 11 08:17:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2007 Received: (qmail 333 invoked by alias); 11 Jul 2014 08:21:27 -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 316 invoked by uid 89); 11 Jul 2014 08:21:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 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, 11 Jul 2014 08:21:24 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X5W53-0006xT-DY from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 11 Jul 2014 01:21:21 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 11 Jul 2014 01:21:21 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Fri, 11 Jul 2014 01:21:20 -0700 From: Yao Qi To: Subject: [PATCH][testsuite] Match symbol on address 0x0 Date: Fri, 11 Jul 2014 16:17:43 +0800 Message-ID: <1405066663-1395-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes We see the failing fails on arm-none-eabi target, print (void*)v_signed_char^M $190 = (void *) 0x0 <_ftext>^M (gdb) FAIL: gdb.base/exprs.exp: print (void*)v_signed_char (print (void*)v_signed_char) GDB behaves correctly but the test assumes there is no symbol on address 0x0. That is not correct on bare metal targets. (gdb) info symbol 0x0 _ftext in section .text This patch is to relax the pattern to match the possible symbol on address 0x0. OK? gdb/testsuite: 2014-07-11 Yao Qi * gdb.base/exprs.exp: Match the possible symbol on address 0x0. --- gdb/testsuite/gdb.base/exprs.exp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp index ebce24f..1006aa1 100644 --- a/gdb/testsuite/gdb.base/exprs.exp +++ b/gdb/testsuite/gdb.base/exprs.exp @@ -201,14 +201,14 @@ test_expr "set variable v_unsigned_long=~0" "print v_unsigned_long > 0" "\\$\[0- # NB: Some architectures convert a ``NULL'' pointer into # something else. Don't simply test for 0. # -test_expr "set variable v_signed_char = 0" "print (void*)v_signed_char" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_char" -test_expr "set variable v_signed_short = 0" "print (void*)v_signed_short" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_short" -test_expr "set variable v_signed_int = 0" "print (void*)v_signed_int" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_int" -test_expr "set variable v_signed_long = 0" "print (void*)v_signed_long" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_long" -test_expr "set variable v_unsigned_char = 0" "print (void*)v_unsigned_char" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_unsigned_char" -test_expr "set variable v_unsigned_short = 0" "print (void*)v_unsigned_short" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_unsigned_short" -test_expr "set variable v_unsigned_int = 0" "print (void*)v_unsigned_int" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_unsigned_int" -test_expr "set variable v_unsigned_long = 0" "print (void*)v_unsigned_long" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_unsigned_long" +test_expr "set variable v_signed_char = 0" "print (void*)v_signed_char" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_signed_char" +test_expr "set variable v_signed_short = 0" "print (void*)v_signed_short" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_signed_short" +test_expr "set variable v_signed_int = 0" "print (void*)v_signed_int" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_signed_int" +test_expr "set variable v_signed_long = 0" "print (void*)v_signed_long" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_signed_long" +test_expr "set variable v_unsigned_char = 0" "print (void*)v_unsigned_char" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_unsigned_char" +test_expr "set variable v_unsigned_short = 0" "print (void*)v_unsigned_short" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_unsigned_short" +test_expr "set variable v_unsigned_int = 0" "print (void*)v_unsigned_int" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_unsigned_int" +test_expr "set variable v_unsigned_long = 0" "print (void*)v_unsigned_long" "\\$\[0-9\]* = .void \\*. ${hex}(| <.*>)" "print (void*)v_unsigned_long" # # Test expressions with pointers out of range #