aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
diff options
context:
space:
mode:
authorLuis Machado <lgustavo@codesourcery.com>2014-10-17 11:28:17 -0300
committerLuis Machado <lgustavo@codesourcery.com>2014-10-17 11:28:17 -0300
commita80db0157c31d3f0fbb37ea40384b11041429a2f (patch)
tree59f7ba93c9c0637d6649db8a4022a3d8fbb66465 /gdb/testsuite/gdb.reverse/machinestate-precsave.exp
parentb22089abcba7cc3be26a9ab7d60e01299ac13ea0 (diff)
downloadgdb-a80db0157c31d3f0fbb37ea40384b11041429a2f.zip
gdb-a80db0157c31d3f0fbb37ea40384b11041429a2f.tar.gz
gdb-a80db0157c31d3f0fbb37ea40384b11041429a2f.tar.bz2
Fix mingw32 failures due to incorrect directory separator in pattern
Some testcases, mostly gdb.reverse ones, assume the presence of a '/' directory separator before the source file name. This is incorrect for mingw32 hosts, generating false failures for those tests. I attempted to catch most of the occurrences of the pattern ".*/$srcfile" and replaced them with ".*$srcfile". The latter is used elsewhere in the testsuite. The resulting patch is attached. I also see other occurrences of the same assumption throughout the testsuite, but usually they are arguments for function calls and i seem to recall either the test harness or GDB deals with those paths properly. gdb/testsuite: 2014-10-17 Luis Machado <lgustavo@codesourcery.com> * gdb.guile/scm-breakpoint.exp: Do not assume any directory separators when matching source file paths. * gdb.python/py-breakpoint.exp: Likewise. * gdb.reverse/break-precsave.exp: Likewise. * gdb.reverse/break-reverse.exp: Likewise. * gdb.reverse/consecutive-precsave.exp: Likewise. * gdb.reverse/finish-precsave.exp: Likewise. * gdb.reverse/finish-reverse-bkpt.exp: Likewise. * gdb.reverse/finish-reverse.exp: Likewise. * gdb.reverse/i386-precsave.exp: Likewise. * gdb.reverse/i387-env-reverse.exp: Likewise. * gdb.reverse/i387-stack-reverse.exp: Likewise. * gdb.reverse/machinestate-precsave.exp: Likewise. * gdb.reverse/machinestate.exp: Likewise. * gdb.reverse/sigall-precsave.exp: Likewise. * gdb.reverse/solib-precsave.exp: Likewise. * gdb.reverse/step-precsave.exp: Likewise. * gdb.reverse/until-precsave.exp: Likewise. * gdb.reverse/watch-precsave.exp: Likewise. * gdb.reverse/watch-reverse.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.reverse/machinestate-precsave.exp')
-rw-r--r--gdb/testsuite/gdb.reverse/machinestate-precsave.exp50
1 files changed, 25 insertions, 25 deletions
diff --git a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
index e315cd9..3b62dc9 100644
--- a/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
+++ b/gdb/testsuite/gdb.reverse/machinestate-precsave.exp
@@ -63,7 +63,7 @@ if [supports_process_record] {
}
gdb_test "break $endmain" \
- "Breakpoint $decimal at .*/$srcfile, line $endmain\." \
+ "Breakpoint $decimal at .*$srcfile, line $endmain\." \
"BP at end of main"
gdb_test "continue" "Breakpoint .* end main .*" "run to end of main"
@@ -82,10 +82,10 @@ gdb_test "record restore $precsave" \
# Proceed to end of main
gdb_test "break $endmain" \
- "Breakpoint.* file .*/$srcfile, line $endmain.*" ""
+ "Breakpoint.* file .*$srcfile, line $endmain.*" ""
gdb_test_multiple "continue" "go to end of main forward" {
- -re ".*Breakpoint $decimal,.*/$srcfile:$endmain.*$gdb_prompt $" {
+ -re ".*Breakpoint $decimal,.*$srcfile:$endmain.*$gdb_prompt $" {
pass "go to end of main forward"
}
-re "No more reverse-execution history.* end main .*$gdb_prompt $" {
@@ -105,8 +105,8 @@ gdb_test_multiple "continue" "go to end of main forward" {
set breakloc [gdb_get_line_number \
"module_global_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "reverse-continue" ".*$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print aglobal" ".* = 0$newline" "module global reverse-breakpoint"
gdb_test "step" ".* module global post-change .*" ""
@@ -120,8 +120,8 @@ gdb_test "print aglobal" ".* = 0$newline" "module global reverse-step to bp"
set breakloc [gdb_get_line_number \
"module_static_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "reverse-continue" ".*$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print astatic" ".* = 0$newline" "module static reverse-breakpoint"
gdb_test "step" ".* module static post-change .*" ""
@@ -134,8 +134,8 @@ gdb_test "print astatic" ".* = 0$newline" "module static reverse-step"
set breakloc [gdb_get_line_number \
"function_static_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "reverse-continue" ".*$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print a" ".* = 0$newline" "function static reverse-breakpoint"
gdb_test "step" ".* function static post-change .*" ""
@@ -148,8 +148,8 @@ gdb_test "print a" ".* = 0$newline" "function static reverse-step"
set breakloc [gdb_get_line_number \
"auto_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "reverse-continue" ".*$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print a" ".* = 0$newline" "auto var reverse-breakpoint"
gdb_test "step" ".* auto post-change .*" ""
@@ -162,8 +162,8 @@ gdb_test "print a" ".* = 0$newline" "auto var reverse-step"
set breakloc [gdb_get_line_number \
"register_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "reverse-continue" ".*/$srcfile:$breakloc.*" "reverse to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "reverse-continue" ".*$srcfile:$breakloc.*" "reverse to $breakloc"
gdb_test "print a" ".* = 0$newline" "register var reverse-breakpoint"
gdb_test "step" ".* register post-change .*" ""
@@ -173,8 +173,8 @@ gdb_test "print a" ".* = 0$newline" "register var reverse step-to"
# Proceed to beginning of main
-gdb_test "tbreak $beginmain" ".*/$srcfile, line $beginmain.*" ""
-gdb_test "reverse-continue" ".*/$srcfile:$beginmain.*" "reverse to main"
+gdb_test "tbreak $beginmain" ".*$srcfile, line $beginmain.*" ""
+gdb_test "reverse-continue" ".*$srcfile:$beginmain.*" "reverse to main"
# Now repeat tests while replaying forward.
@@ -183,8 +183,8 @@ gdb_test "reverse-continue" ".*/$srcfile:$beginmain.*" "reverse to main"
set breakloc [gdb_get_line_number \
"register_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*$srcfile:$breakloc.*" "forward to $breakloc"
gdb_test "print a" ".* = 0$newline" "register var forward-breakpoint"
gdb_test "reverse-step" ".*hide.*" ""
@@ -198,8 +198,8 @@ gdb_test "print a" ".* = 1$newline" "register var step post-change"
set breakloc [gdb_get_line_number \
"auto_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*$srcfile:$breakloc.*" "forward to $breakloc"
gdb_test "print a" ".* = 0$newline" "auto var forward-breakpoint"
gdb_test "reverse-step" ".*hide.*" ""
@@ -213,8 +213,8 @@ gdb_test "print a" ".* = 1$newline" "auto var step post-change"
set breakloc [gdb_get_line_number \
"function_static_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*$srcfile:$breakloc.*" "forward to $breakloc"
gdb_test "print a" ".* = 0$newline" "function static forward-breakpoint"
gdb_test "reverse-step" ".*hide.*" ""
@@ -228,8 +228,8 @@ gdb_test "print a" ".* = 1$newline" "function static step post-change"
set breakloc [gdb_get_line_number \
"module_static_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*$srcfile:$breakloc.*" "forward to $breakloc"
gdb_test "print astatic" ".* = 0$newline" "module static forward-breakpoint"
gdb_test "reverse-step" ".*hide.*" ""
@@ -243,8 +243,8 @@ gdb_test "print astatic" ".* = 1$newline" "module static step post-change"
set breakloc [gdb_get_line_number \
"module_global_state: set breakpoint here" $srcfile]
-gdb_test "tbreak $breakloc" ".*/$srcfile, line $breakloc.*" ""
-gdb_test "continue" ".*/$srcfile:$breakloc.*" "forward to $breakloc"
+gdb_test "tbreak $breakloc" ".*$srcfile, line $breakloc.*" ""
+gdb_test "continue" ".*$srcfile:$breakloc.*" "forward to $breakloc"
gdb_test "print aglobal" ".* = 0$newline" "module global forward-breakpoint"
gdb_test "reverse-step" ".*hide.*" ""