aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2018-12-12 12:57:00 +1100
committerBen Elliston <bje@gnu.org>2018-12-12 12:57:00 +1100
commit874edd44fc41aff555b8cc39d91b6576095135df (patch)
tree9c4f48d766c74c88e275aa234eb24115ae6185d8 /config
parentb0b842d77c6fc8b9f6c9f19baa93fb20330f5301 (diff)
downloaddejagnu-874edd44fc41aff555b8cc39d91b6576095135df.zip
dejagnu-874edd44fc41aff555b8cc39d91b6576095135df.tar.gz
dejagnu-874edd44fc41aff555b8cc39d91b6576095135df.tar.bz2
* config/gdb-comm.exp, config/gdb_stub.exp, config/vxworks.exp,
lib/dg.exp, lib/ftp.exp, lib/kermit.exp, lib/rlogin.exp, lib/telnet.exp, runtest.exp, testsuite/lib/libsup.exp: Simplify some regular expressions in constant strings by placing them inside braces instead of quotes. This allows one level of backslash quoting to be removed.
Diffstat (limited to 'config')
-rw-r--r--config/gdb-comm.exp20
-rw-r--r--config/gdb_stub.exp4
-rw-r--r--config/vxworks.exp14
3 files changed, 19 insertions, 19 deletions
diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp
index c9ef574..fca0bbb 100644
--- a/config/gdb-comm.exp
+++ b/config/gdb-comm.exp
@@ -86,7 +86,7 @@ proc gdb_comm_file_cmd { arg } {
verbose "\t\tKilling previous program being debugged"
exp_continue
}
- -re "Load new symbol table from \".*\".*y or n.*$" {
+ -re {Load new symbol table from ".*".*y or n.*$} {
remote_send host "y\n"
remote_expect host 60 {
-re "Reading symbols from.*done.*$gdb_prompt $" {
@@ -157,7 +157,7 @@ proc gdb_comm_start { dest } {
# The variable gdb_prompt is a regexp which matches the gdb prompt. Set it
# if it is not already set.
if {![board_info $dest exists gdb_prompt]} then {
- set gdb_prompt "\\(gdb\\)"
+ set gdb_prompt {\(gdb\)}
} else {
set gdb_prompt [board_info $dest gdb_prompt]
}
@@ -199,7 +199,7 @@ proc gdb_comm_add_breakpoint { function } {
-re "Breakpoint.*$gdb_prompt $" { return "" }
-re "Function.*not defined.*$gdb_prompt $" { return "undef" }
-re "No symbol table.*$gdb_prompt $" { return "undef" }
- -re ".*Make breakpoint pending.*\\\? \\(y or \\\[n\\\]\\) $" {
+ -re {.*Make breakpoint pending.*\? \(y or \[n\]\) $} {
remote_send host "y\n"
return "maybe"
}
@@ -225,7 +225,7 @@ proc quit_gdb { } {
remote_send host "y\n"
exp_continue
}
- -re ".*\[*\]\[*\]\[*\].*EXIT code" { }
+ -re {.*[*][*][*].*EXIT code} { }
default { }
}
}
@@ -285,11 +285,11 @@ proc gdb_comm_load { dest prog args } {
set textoff [board_info $dest gdb_sect_offset]
remote_send host "sect .text $textoff\n"
remote_expect host 10 {
- -re "(0x\[0-9a-z]+) - 0x\[0-9a-z\]+ is \\.data" {
+ -re {(0x[0-9a-z]+) - 0x[0-9a-z]+ is \.data} {
set dataoff $expect_out(1,string)
exp_continue
}
- -re "(0x\[0-9a-z\]+) - 0x\[0-9a-z\]+ is \\.bss" {
+ -re {(0x[0-9a-z]+) - 0x[0-9a-z]+ is \.bss} {
set bssoff $expect_out(1,string)
exp_continue
}
@@ -425,7 +425,7 @@ proc gdb_comm_load { dest prog args } {
remote_send host "y\n"
exp_continue
}
- -re "Continuing( at |\\.| with no signal\\.)\[^\r\n\]*\[\r\n\]" {
+ -re {Continuing( at |\.| with no signal\.)[^\r\n]*[\r\n]} {
exp_continue
}
-re ".*Start it from the beginning?.*y or n.*" {
@@ -434,14 +434,14 @@ proc gdb_comm_load { dest prog args } {
-re ".*$gdb_prompt $" {
remote_send host "signal 0\n"
remote_expect host 10 {
- -re "signal 0\[\r\n\]+" { exp_continue }
- -re "Continuing(\\.| with no signal\\.)\[\r\n\]" {}
+ -re {signal 0[\r\n]+} { exp_continue }
+ -re {Continuing(\.| with no signal\.)[\r\n]} {}
}
}
}
exp_continue
}
- -re "(run\[\r\n\]*|)Starting program: \[^\r\n\]*\[\r\n\]" {
+ -re {(run[\r\n]*|)Starting program: [^\r\n]*[\r\n]} {
exp_continue
}
-re "$gdb_prompt (signal 0|continue)\[\r\n\]+Continuing(\\.| with no signal\\.)\[\r\n\]" {
diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp
index b0bf61c..6ad22a1 100644
--- a/config/gdb_stub.exp
+++ b/config/gdb_stub.exp
@@ -37,7 +37,7 @@ proc gdb_stub_init { dest args } {
if {[board_info $dest exists gdb_prompt]} {
set gdb_prompt [board_info $dest gdb_prompt]
} else {
- set gdb_prompt "\\(gdb\\)"
+ set gdb_prompt {\(gdb\)}
}
return 1
@@ -384,7 +384,7 @@ proc gdb_stub_start { dest } {
remote_send host "jump relocd\n"
exp_continue
}
- -re "Continuing at.*\[\r\n\]" { }
+ -re {Continuing at.*[\r\n]} { }
default {
return { "fail" "" }
}
diff --git a/config/vxworks.exp b/config/vxworks.exp
index abf999d..b49a3f6 100644
--- a/config/vxworks.exp
+++ b/config/vxworks.exp
@@ -50,7 +50,7 @@ proc ${board}_init { dest } {
set boot_mon 0
set boot_mon_prompt "VxWorks Boot"
}
- -re "\[0-9\]\[\r\n\]+ *\[0-9\]\[\r\n\]" {
+ -re {[0-9][\r\n]+ *[0-9][\r\n]} {
remote_send $dest "\n"
exp_continue
}
@@ -72,7 +72,7 @@ proc ${board}_init { dest } {
}
remote_send $dest "p\n"
remote_expect $dest 20 {
- -re "file name\[ \t\]+: (\[^ \r\n\]+)\[ \r\n\]+" {
+ -re {file name[ \t]+: ([^ \r\n]+)[ \r\n]+} {
set curr_file $expect_out(1,string)
exp_continue
}
@@ -88,11 +88,11 @@ proc ${board}_init { dest } {
# Oh boy.
remote_send $dest "c\n"
remote_expect $dest 20 {
- -re "file name\[ \t\]+:.*$" {
+ -re {file name[ \t]+:.*$} {
remote_send $dest "$desired_kernel\n"
exp_continue
}
- -re "\[a-z() \t\]+:.*$" {
+ -re {[a-z() \t]+:.*$} {
remote_send $dest "\n"
exp_continue
}
@@ -141,7 +141,7 @@ proc vxworks_exec { dest program pargs inp outp } {
remote_send $dest "$program $pargs$suffix\n"
# FIXME: The value 300 below should probably be a parameter passed in.
remote_expect $dest 300 {
- -re "\\\[VxWorks Boot\\\]:" {
+ -re {\[VxWorks Boot\]:} {
remote_send $dest "@\n"
sleep 20
exp_continue
@@ -286,7 +286,7 @@ proc vxworks_ld { dest prog } {
remote_send $dest "\n"
remote_expect $dest 30 {
-re ".*$shell_prompt $" { set x 20 }
- -re "\\\[VxWorks Boot\\\]:" {
+ -re {\[VxWorks Boot\]:} {
remote_send $dest "@\n"
sleep 20
exp_continue
@@ -382,7 +382,7 @@ proc vxworks_run { dest function pargs inp outp } {
verbose "$function aborted"
set result 1
}
- -re "\[\r\n\]syntax error\[\r\n\]" {
+ -re {[\r\n]syntax error[\r\n]} {
verbose "weirdness after task started"
set result -1
}