* gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp.
authorDaniel Jacobowitz <drow@false.org>
Thu, 12 Oct 2006 19:03:22 +0000 (19:03 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 12 Oct 2006 19:03:22 +0000 (19:03 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/annota1.exp
gdb/testsuite/gdb.base/maint.exp

index bbbd750eb1106732a025c14c0fd6e497ad45fd49..34fb073dfe1e35b119069da46810263b1dd08d94 100644 (file)
@@ -1,3 +1,7 @@
+2006-10-12  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp.
+
 2006-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * gdb.threads/tls-nodebug.c, gdb.threads/tls-nodebug.exp: New test.
index c26aa6df1af35fe6a419b0583c5de0d44b1062af..7c8c0a781ecb68653c0ab37988fb25f0444917fd 100644 (file)
@@ -147,9 +147,10 @@ gdb_expect {
 # annotate-stopped
 #
 #exp_internal 1
+set binexp [string_to_regexp $binfile]
 send_gdb "run\n"
 gdb_expect {
-    -re "\r\n\032\032post-prompt\r\nStarting program: $binfile \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
+    -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\r\n\r\n\032\032frames-invalid\)+\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" {
        pass "run until main breakpoint" 
     }
     -re ".*$gdb_prompt$" { 
index cc165eca0a55128279f112df806ab01efcbb0150..bbbd2622e17b2b11c59fcecdeab07af9188c4f98 100644 (file)
@@ -328,7 +328,7 @@ gdb_expect  {
 
 # Check that maint print msymbols allows relative pathnames
 set mydir [pwd]
-gdb_test "cd ${objdir}" "Working directory ${objdir}\..*"
+gdb_test "cd ${objdir}" "Working directory [string_to_regexp ${objdir}]\..*"
 gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}" "maint print msymbols" {
     -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
        gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
@@ -361,7 +361,7 @@ gdb_test_multiple "maint print msymbols msymbols_output2 ${subdir}/${testfile}"
        fail "(timeout) maint print msymbols"
     }
 }
-gdb_test "cd ${mydir}" "Working directory ${mydir}\..*"
+gdb_test "cd ${mydir}" "Working directory [string_to_regexp ${mydir}]\..*"
 
 send_gdb "maint print symbols\n"
 gdb_expect  {