[gdb/testsuite] Make gdb.dwarf2/dw2-line-number-zero.exp more robust
authorTom de Vries <tdevries@suse.de>
Wed, 29 Jul 2020 06:41:09 +0000 (08:41 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 29 Jul 2020 06:41:09 +0000 (08:41 +0200)
On aarch64, there are FAILs for gdb.dwarf2/dw2-line-number-zero.exp due to
problems in the prologue analyzer (filed as PR26310).

Make the test-case more robust by avoiding to use the prologue analyzer:
...
-gdb_breakpoint "bar1"
+gdb_breakpoint "$srcfile:27"
...

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-07-29  Tom de Vries  <tdevries@suse.de>

* gdb.dwarf2/dw2-line-number-zero.exp: Set breakpoints on lines
rather than function name.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp

index 861438017e02395c4327ae18fecf0f3e410749d8..d4d0813fa3da92f9f4784eaf8879a4dc55544830 100644 (file)
@@ -1,3 +1,8 @@
+2020-07-29  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.dwarf2/dw2-line-number-zero.exp: Set breakpoints on lines
+       rather than function name.
+
 2020-07-28  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        PR symtab/26270:
index a39256c171a30b79ef9167bfcb4313d5b7e3b99a..12011b5f9c0a6f171464491b53359eba58413a88 100644 (file)
@@ -115,13 +115,13 @@ if ![runto_main] {
     return -1
 }
 
-gdb_breakpoint "bar1"
+gdb_breakpoint "$srcfile:27"
 gdb_continue_to_breakpoint "bar1" "\[^\r\n\]*:27\r\n.*"
 
 gdb_test "n" "foo \\(2\\);" "bar1, 1st next"
 gdb_test "n" "foo \\(4\\);" "bar1, 2nd next"
 
-gdb_breakpoint "bar2"
+gdb_breakpoint "$srcfile:41"
 gdb_continue_to_breakpoint "bar2" "\[^\r\n\]*:41\r\n.*"
 
 gdb_test "n" "foo \\(2\\);" "bar2, 1st next"