This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix testsuite regression by: Do not skip prologue for asm (.S) files


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=218a5a11a07268228484af88666739852ba36552

commit 218a5a11a07268228484af88666739852ba36552
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Jul 10 15:04:51 2015 +0200

    Fix testsuite regression by: Do not skip prologue for asm (.S) files
    
    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.
    
    gdb/testsuite/ChangeLog
    2015-07-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* 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:
---
 gdb/testsuite/ChangeLog              | 6 ++++++
 gdb/testsuite/gdb.asm/asm-source.exp | 6 +++++-
 gdb/testsuite/gdb.asm/asmsrc1.s      | 1 +
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index dba1815..4f94360 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* 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".
+
 2015-07-10  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
 	* gdb.base/gnu_vector.exp: On x86 and x86_64 targets, skip the
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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]