Fix py-parameter.exp and scm-parameter.exp path matching

gdb/testsuite/ChangeLog:

	* gdb.python/py-parameter.exp:
	* gdb.guile/scm-parameter.exp: Escape the path that we are
	matching against, as it might contain characters that are special
	to regular expressions.
This commit is contained in:
Andy Wingo
2015-04-28 11:15:47 +02:00
parent faa2211d4d
commit 2631b16a57
3 changed files with 11 additions and 2 deletions

View File

@ -32,7 +32,8 @@ if { [is_remote host] } {
# doesn't set search directories on remote host.
set directories ".*\\\$cdir.\\\$cwd"
} else {
set directories "$srcdir/$subdir.\\\$cdir.\\\$cwd"
set escaped_directory [string_to_regexp "$srcdir/$subdir"]
set directories "$escaped_directory.\\\$cdir.\\\$cwd"
}
gdb_test "python print (gdb.parameter ('directories'))" $directories