From: Daniel Jacobowitz Date: Thu, 12 Oct 2006 19:03:22 +0000 (+0000) Subject: * gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c008720ebce20b40126b31392808cfd5a2408bc;p=binutils-gdb.git * gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bbbd750eb11..34fb073dfe1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-10-12 Daniel Jacobowitz + + * gdb.base/annota1.exp, gdb.base/maint.exp: Use string_to_regexp. + 2006-10-09 Jan Kratochvil * gdb.threads/tls-nodebug.c, gdb.threads/tls-nodebug.exp: New test. diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index c26aa6df1af..7c8c0a781ec 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -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$" { diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index cc165eca0a5..bbbd2622e17 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -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 {