From patchwork Wed Oct 5 19:59:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 16284 Received: (qmail 67359 invoked by alias); 5 Oct 2016 19:59:41 -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 67206 invoked by uid 89); 5 Oct 2016 19:59:40 -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=chunk, (unknown) 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; Wed, 05 Oct 2016 19:59:30 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (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 D0653C05ACB2; Wed, 5 Oct 2016 19:59:28 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u95JxPN9007737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 5 Oct 2016 15:59:27 -0400 Date: Wed, 5 Oct 2016 21:59:24 +0200 From: Jan Kratochvil To: Yao Qi Cc: "gdb-patches@sourceware.org" Subject: [commit] [testsuite patch] Fix recent GCC FAIL: gdb.arch/i386-signal.exp Message-ID: <20161005195924.GA22631@host1.jankratochvil.net> References: <20161003203500.GA2251@host1.jankratochvil.net> <20161004161900.GA6231@host1.jankratochvil.net> <20161004163944.GA8002@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.0 (2016-08-17) X-IsSubscribed: yes On Wed, 05 Oct 2016 10:15:08 +0200, Yao Qi wrote: > We need the first chunk "($hex in )?main" because the unwind pc may point > to the first instruction of a source line or the non-first instruction > of a line. > Either is possible. It doesn't matter that "callq setup" and > "mov $0x0,%eax" are mapped to the same line or not. > > Change in gdb.arch/i386-signal.exp is good to me, but change > in gdb.arch/i386-signal.c is not necessary. Checked in. Jan gcc-6.2.1-2.fc24.x86_64 (gdb) backtrace 10^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 .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. 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. gdb/testsuite/ChangeLog 2016-10-05 Jan Kratochvil * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.arch/i386-signal.exp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 537ca8c..cbea3b2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-10-05 Jan Kratochvil + + * gdb.arch/i386-signal.exp (backtrace 10): Fix #2 typo. + 2016-10-05 Yao Qi * lib/gdb.exp (support_complex_tests): Return zero if 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.*"