From 8c7ab5da737e13033b77ca35bf8fdf2d6da48c12 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Fri, 24 Mar 1995 20:05:28 +0000 Subject: [PATCH] * config/vx-gdb.exp, lib/gdb.exp: Regexp cleanups (\[(\] -> \\(, etc.). --- gdb/testsuite/ChangeLog | 2 ++ gdb/testsuite/config/vx-gdb.exp | 2 +- gdb/testsuite/lib/gdb.exp | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2641026509f..b9d907d0fcc 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,7 @@ Fri Mar 24 06:11:05 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + * config/vx-gdb.exp, lib/gdb.exp: Regexp cleanups (\[(\] -> \\(, etc.). + * gdb.base/a1-selftest.exp: Don't check for # followed by a digit somewhere between `read' and `main.c'. I'm pretty sure the pattern ".*#\[0-9\].*" was slowing down pattern matching a lot, diff --git a/gdb/testsuite/config/vx-gdb.exp b/gdb/testsuite/config/vx-gdb.exp index 5ebcefa18e1..c5225445937 100644 --- a/gdb/testsuite/config/vx-gdb.exp +++ b/gdb/testsuite/config/vx-gdb.exp @@ -27,7 +27,7 @@ load_lib gdb.exp load_lib vxworks.exp set shell_prompt "->" -set prompt "\[(\]vxgdb\[)\]" +set prompt "\\(vxgdb\\)" # # gdb_version -- extract and print the version number of gcc diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 2ea53e7ec4b..e91db0eeaa3 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -37,10 +37,11 @@ if ![info exists GDBFLAGS] then { set GDBFLAGS "-nx" } -# set the prompt if it doesn't exist +# The variable prompt is a regexp which matches the gdb prompt. Set it if it +# is not already set. global prompt if ![info exists prompt] then { - set prompt "\[(\]gdb\[)\]" + set prompt "\\(gdb\\)" } global usestubs @@ -62,7 +63,7 @@ proc default_gdb_version {} { global GDBFLAGS if {[which $GDB] != 0} then { set tmp [exec echo "q" | $GDB -nw $GDBFLAGS] - regexp " \[0-9\.\]+" $tmp version + regexp " \[0-9.\]+" $tmp version clone_output "[which $GDB] version$version -nw $GDBFLAGS \n" } else { warning "$GDB does not exist" @@ -308,7 +309,7 @@ proc gdb_test { args } { send "\n" perror "Window too small." } - -re "\[(\]+y or n\[)\]+ " { + -re "\\(y or n\\) " { send "n\n" perror "Got interactive prompt." } -- 2.30.2