From patchwork Mon Jun 29 16:37:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 7422 Received: (qmail 98411 invoked by alias); 29 Jun 2015 16:37:14 -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 98402 invoked by uid 89); 29 Jun 2015 16:37:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 29 Jun 2015 16:37:13 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id DF7D48EA29 for ; Mon, 29 Jun 2015 16:37:11 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5TGb8I0022607 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 29 Jun 2015 12:37:11 -0400 Date: Mon, 29 Jun 2015 18:37:08 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [testsuite patch] Fix testsuite regression by: Do not skip prologue for asm (.S) files Message-ID: <20150629163708.GA28795@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi, I have somehow missed gdb.asm/asm-source.exp PASS->FAIL even on x86_64. It has no longer valid assumption that "break" breaks after the prologue even in assembler. So I have changed this assumption of the testfile. Tested it FAIL->PASSes on x86_64, ppc64 and s390x. OK for check-in? Jan gdb/testsuite/ 2015-06-29 Jan Kratochvil * gdb.asm/asm-source.exp (f at main): Stop at gdbasm_enter. (n at main): New. * gdb.asm/asmsrc1.s: Add comment "mark: main enter". diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index 8854af0..14a0f85 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -275,6 +275,7 @@ if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { } # Collect some line numbers. +set line_enter [expr [gdb_get_line_number "main enter" "asmsrc1.s"] + 1] set line_main [expr [gdb_get_line_number "main start" "asmsrc1.s"] + 1] set line_call_foo2 [expr [gdb_get_line_number "call foo2" "asmsrc1.s"] + 1] set line_search_comment [expr [gdb_get_line_number "search" "asmsrc1.s"] + 1] @@ -298,7 +299,10 @@ if ![runto_main] then { } # Execute the `f' command and see if the result includes source info. -gdb_test "f" "asmsrc1\[.\]s:$line_main.*several_nops" "f at main" +gdb_test "f" "asmsrc1\[.\]s:$line_enter.*gdbasm_enter" "f at main" + +# Execute the `n' command. +gdb_test "n" "$line_main\[ \]*.*several_nops" "n at main" # See if we properly `next' over a macro with several insns. gdb_test "n" "$line_call_foo2\[ \]*.*foo2" "next over macro" diff --git a/gdb/testsuite/gdb.asm/asmsrc1.s b/gdb/testsuite/gdb.asm/asmsrc1.s index 8235205..ddf8790 100644 --- a/gdb/testsuite/gdb.asm/asmsrc1.s +++ b/gdb/testsuite/gdb.asm/asmsrc1.s @@ -34,6 +34,7 @@ .global main gdbasm_declare main + comment "mark: main enter" gdbasm_enter comment "Call a macro that consists of several lines of assembler code."