From patchwork Mon Oct 3 20:35:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 16221 Received: (qmail 3024 invoked by alias); 3 Oct 2016 20:35:07 -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 3009 invoked by uid 89); 3 Oct 2016 20:35:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=imitation X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Oct 2016 20:35:05 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A014285A6 for ; Mon, 3 Oct 2016 20:35:04 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u93KZ1lo004879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 3 Oct 2016 16:35:03 -0400 Date: Mon, 3 Oct 2016 22:35:00 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [testsuite patch] Fix recent GCC FAIL: gdb.arch/i386-signal.exp Message-ID: <20161003203500.GA2251@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.0 (2016-08-17) X-IsSubscribed: yes Hi, gcc-6.2.1-2.fc24.x86_64 (gdb) backtrace 10^M #0 func () at .../gdb/testsuite/gdb.arch/i386-signal.c:26^M #1 ^M #2 0x0000000000400588 in main () at .../gdb/testsuite/gdb.arch/i386-signal.c:31^M (gdb) FAIL: gdb.arch/i386-signal.exp: backtrace 10 (gdb) disas/s Dump of assembler code for function main: .../gdb/testsuite/gdb.arch/i386-signal.c: 30 { 0x000000000040057f <+0>: push %rbp 0x0000000000400580 <+1>: mov %rsp,%rbp 31 setup (); 0x0000000000400583 <+4>: callq 0x400590 => 0x0000000000400588 <+9>: mov $0x0,%eax 32 } 0x000000000040058d <+14>: pop %rbp 0x000000000040058e <+15>: retq End of assembler dump. The two attached patch chunks each fixes the FAIL on its own. The .exp patch is an obvious typo fix I think. The regex was written to accept "ADDR in main" and I find it OK as checking .debug_line validity is not the purpose of this testfile. The .c patch will properly create a new corresponding source line .debug_line entry for the 'mov $0x0,%eax' instruction and I also do not think it is relevant to the purpose of this testfile. gcc-4.8.5-11.el7.x86_64 did not put the 'mov $0x0,%eax' instruction there at all so there was no problem with .debug_line. Tested on {x86_64,x86_64-m32}-fedora24-linux-gnu. OK to check it in? Thanks, Jan gdb/testsuite/ChangeLog 2016-10-03 Jan Kratochvil * gdb.arch/i386-signal.c (main): Add return 0. * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo. diff --git a/gdb/testsuite/gdb.arch/i386-signal.c b/gdb/testsuite/gdb.arch/i386-signal.c index c5a311e..c168d56 100644 --- a/gdb/testsuite/gdb.arch/i386-signal.c +++ b/gdb/testsuite/gdb.arch/i386-signal.c @@ -29,6 +29,7 @@ int main (void) { setup (); + return 0; } /* Create an imitation signal frame. This will work on any x86 or diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp index 276b7c0..51a3a25 100644 --- a/gdb/testsuite/gdb.arch/i386-signal.exp +++ b/gdb/testsuite/gdb.arch/i386-signal.exp @@ -35,6 +35,6 @@ gdb_load ${binfile} runto func gdb_test "backtrace 10" \ - "#0 ($hex in )?func.*\r\n#1 \r\n#2 ($hex in)?main.*" + "#0 ($hex in )?func.*\r\n#1 \r\n#2 ($hex in )?main.*" gdb_test "finish" "Run till exit from \#0 func.*"