From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17374 invoked by alias); 22 Aug 2014 13:33:05 -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 17358 invoked by uid 89); 22 Aug 2014 13:33:04 -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, 22 Aug 2014 13:33:03 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XKoxf-0003Ds-O5 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 22 Aug 2014 06:32:59 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 22 Aug 2014 06:32:59 -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, 22 Aug 2014 06:32:58 -0700 From: Yao Qi To: Subject: [PATCH OBV] set print symbol off in py-value.exp and scm-value.exp Date: Fri, 22 Aug 2014 13:33:00 -0000 Message-ID: <1408714136-32131-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00499.txt.bz2 I see the following fails on arm-none-eabi target, print sn^M $14 = 0x0 <_ftext>^M (gdb) FAIL: gdb.python/py-value.exp: print sn print sn^M $14 = 0x0 <_ftext>^M (gdb) FAIL: gdb.guile/scm-value.exp: print sn as <_ftext> is unexpected. This patch is to set print symbol off to avoid printing this. It is obvious and I'll commit it in two days. gdb/testsuite: 2014-08-22 Yao Qi * gdb.guile/scm-value.exp (test_lazy_strings): Set print symbol off. * gdb.python/py-value.exp (test_lazy_strings): Likewise. --- gdb/testsuite/gdb.guile/scm-value.exp | 2 ++ gdb/testsuite/gdb.python/py-value.exp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp index 91e1a56..3641f75 100644 --- a/gdb/testsuite/gdb.guile/scm-value.exp +++ b/gdb/testsuite/gdb.guile/scm-value.exp @@ -219,6 +219,8 @@ proc test_lazy_strings {} { "= const char \*." "Test lazy-string type name equality" gdb_test "gu (print (value-type sptr))" \ "= const char \*." "Test string type name equality" + # Prevent symbol on address 0x0 being printed. + gdb_test_no_output "set print symbol off" gdb_test "print sn" "0x0" gdb_scm_test_silent_cmd "gu (define snptr (history-ref 0))" \ "lazy strings: get snptr value from history" diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index 0728266..0d18bef 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -302,7 +302,11 @@ proc test_lazy_strings {} { gdb_py_test_silent_cmd "python lstr = sptr.lazy_string()" "Aquire lazy string" 1 gdb_test "python print (lstr.type)" "const char \*." "Test lazy-string type name equality" gdb_test "python print (sptr.type)" "const char \*." "Test string type name equality" + + # Prevent symbol on address 0x0 being printed. + gdb_test_no_output "set print symbol off" gdb_test "print sn" "0x0" + gdb_py_test_silent_cmd "python snptr = gdb.history (0)" "Get value from history" 1 gdb_test "python snstr = snptr.lazy_string(length=5)" ".*Cannot create a lazy string with address.*" "Test lazy string" gdb_py_test_silent_cmd "python snstr = snptr.lazy_string(length=0)" "Succesfully create a lazy string" 1 -- 1.9.3