From e0f353ceed204d98f0581a17e84d33dd18c65ec5 Mon Sep 17 00:00:00 2001 From: Elena Zannoni Date: Thu, 7 Aug 2003 17:55:41 +0000 Subject: 2003-08-07 Elena Zannoni * gdb.base/attach.exp, gdb.base/detach.exp, gdb.base/gcore.exp, gdb.mi/mi-basics.exp, gdb.threads/gcore-thread.exp, gdb.trace/save-trace.exp: Make sure that full pathnames are escaped correctly. --- gdb/testsuite/gdb.base/attach.exp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gdb/testsuite/gdb.base/attach.exp') diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp index 66e9f0ec311..ea11087f8af 100644 --- a/gdb/testsuite/gdb.base/attach.exp +++ b/gdb/testsuite/gdb.base/attach.exp @@ -45,6 +45,7 @@ set srcfile ${testfile}.c set srcfile2 ${testfile}2.c set binfile ${objdir}/${subdir}/${testfile} set binfile2 ${objdir}/${subdir}/${testfile}2 +set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}] set cleanupfile ${objdir}/${subdir}/${testfile}.awk #execute_anywhere "rm -f ${binfile} ${binfile2}" @@ -76,6 +77,7 @@ if [get_compiler_info ${binfile}] { proc do_attach_tests {} { global gdb_prompt global binfile + global escapedbinfile global srcfile global testfile global objdir @@ -157,13 +159,13 @@ proc do_attach_tests {} { -re "Load new symbol table from.*y or n.*$" { send_gdb "y\n" gdb_expect { - -re "Reading symbols from $binfile\.\.\.*done.*$gdb_prompt $"\ + -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\ {pass "(re)set file, before attach1"} -re "$gdb_prompt $" {fail "(re)set file, before attach1"} timeout {fail "(timeout) (re)set file, before attach1"} } } - -re "Reading symbols from $binfile\.\.\.*done.*$gdb_prompt $"\ + -re "Reading symbols from $escapedbinfile\.\.\.*done.*$gdb_prompt $"\ {pass "set file, before attach1"} -re "$gdb_prompt $" {fail "set file, before attach1"} timeout {fail "(timeout) set file, before attach1"} @@ -171,7 +173,7 @@ proc do_attach_tests {} { send_gdb "attach $testpid\n" gdb_expect { - -re "Attaching to program.*`?$binfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\ + -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $"\ {pass "attach1, after setting file"} -re "$gdb_prompt $" {fail "attach1, after setting file"} timeout {fail "(timeout) attach1, after setting file"} @@ -192,7 +194,7 @@ proc do_attach_tests {} { # send_gdb "detach\n" gdb_expect { - -re "Detaching from program: .*$binfile.*$gdb_prompt $"\ + -re "Detaching from program: .*$escapedbinfile.*$gdb_prompt $"\ {pass "attach1 detach"} -re "$gdb_prompt $" {fail "attach1 detach"} timeout {fail "(timeout) attach1 detach"} @@ -234,7 +236,7 @@ proc do_attach_tests {} { # send_gdb "attach $testpid\n" gdb_expect { - -re "Attaching to process $testpid.*Reading symbols from $binfile.*main.*at .*$gdb_prompt $"\ + -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\ {pass "attach2"} -re "$gdb_prompt $" {fail "attach2"} timeout {fail "(timeout) attach2"} @@ -335,7 +337,7 @@ proc do_attach_tests {} { send_gdb "attach $testpid\n" gdb_expect { - -re "Attaching to process $testpid.*Reading symbols from $binfile.*main.*at .*$gdb_prompt $"\ + -re "Attaching to process $testpid.*Reading symbols from $escapedbinfile.*main.*at .*$gdb_prompt $"\ {pass "attach when process' a.out not in cwd"} -re "$gdb_prompt $" {fail "attach when process' a.out not in cwd"} timeout {fail "(timeout) attach when process' a.out not in cwd"} -- cgit v1.2.1