aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.reverse/machinestate.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.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.exp')
-rw-r--r--gdb/testsuite/gdb.reverse/machinestate.exp48
1 files changed, 24 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.reverse/machinestate.exp b/gdb/testsuite/gdb.reverse/machinestate.exp
index d2d2137..714571b 100644
--- a/gdb/testsuite/gdb.reverse/machinestate.exp
+++ b/gdb/testsuite/gdb.reverse/machinestate.exp
@@ -63,8 +63,8 @@ if [supports_process_record] {
# Proceed to end of main
gdb_test "break $endmain" \
- "Breakpoint.* file .*/$srcfile, line $endmain.*" ""
-gdb_continue_to_breakpoint "end of main" ".*/$srcfile:$endmain.*"
+ "Breakpoint.* file .*$srcfile, line $endmain.*" ""
+gdb_continue_to_breakpoint "end of main" ".*$srcfile:$endmain.*"
###
###
@@ -78,8 +78,8 @@ gdb_continue_to_breakpoint "end of main" ".*/$srcfile:$endmain.*"
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 .*" ""
@@ -93,8 +93,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 .*" ""
@@ -107,8 +107,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 .*" ""
@@ -121,8 +121,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 .*" ""
@@ -135,8 +135,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 .*" ""
@@ -146,8 +146,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.
@@ -156,8 +156,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.*" ""
@@ -171,8 +171,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.*" ""
@@ -186,8 +186,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.*" ""
@@ -201,8 +201,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.*" ""
@@ -216,8 +216,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.*" ""