From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19230 invoked by alias); 22 Sep 2019 04:16:00 -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 19215 invoked by uid 89); 22 Sep 2019 04:16:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=2019-09-22, HX-Languages-Length:1820 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 22 Sep 2019 04:15:59 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BB825AF27 for ; Sun, 22 Sep 2019 04:15:56 +0000 (UTC) Date: Sun, 22 Sep 2019 04:16:00 -0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Allow some tests in gdb.base/restore.exp to be unsupported Message-ID: <20190922041553.GA29435@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00441.txt.bz2 Hi, We currently run into: ... 248 n = callee1 (n + l5); (gdb) PASS: gdb.base/restore.exp: caller5 calls callee1; return callee now print l1 $51 = (gdb) FAIL: gdb.base/restore.exp: caller5 calls callee1; return restored l1 \ to 32492 ... The problem is that we try to access the value of l1 in function caller5, but variable l1 has no DW_AT_location attribute. Since l1 is declared using the register keyword, it's valid for gcc to emit no DW_AT_location at -O0. Change the FAIL into an UNSUPPORTED. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Allow some tests in gdb.base/restore.exp to be unsupported gdb/testsuite/ChangeLog: 2019-09-22 Tom de Vries * gdb.base/restore.exp: Allow register variables to be optimized out at -O0. --- gdb/testsuite/gdb.base/restore.exp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/restore.exp b/gdb/testsuite/gdb.base/restore.exp index 947fe58be4..56c2f5e3dc 100644 --- a/gdb/testsuite/gdb.base/restore.exp +++ b/gdb/testsuite/gdb.base/restore.exp @@ -73,8 +73,17 @@ proc restore_tests { } { # they should be. for {set var 1} {$var <= $c} {incr var} { set expected [expr 0x7eeb + $var] - gdb_test "print l$var" " = $expected" \ - "caller$c calls callee$e; return restored l$var to $expected" + set test "caller$c calls callee$e; return restored l$var to $expected" + set pass_pattern " = $expected" + set unsupported_pattern " = " + gdb_test_multiple "print l$var" $test { + -re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" { + pass $test + } + -re "\[\r\n\]*(?:$unsupported_pattern)\[\r\n\]+$gdb_prompt $" { + unsupported $test + } + } } } }