[PATCH] Fix mi-file.exp fails on remote host

Pedro Alves palves@redhat.com
Tue May 13 18:51:00 GMT 2014


On 05/13/14 08:34, Yao Qi wrote:

> and the file name is "basics.c" in my test env, so use string_to_regexp
> instead.

I don't get this rationale.  I mean, I get that . is special in regexps, but
although not strictly correct, it's usually harmless.  I believe we have a
ton of cases of just passing a filename with a dot as a regexp, as evidenced
by ...

>      # get the path and absolute path to the current executable
>      mi_gdb_test "222-file-list-exec-source-files" \
> -	    "222\\\^done,files=\\\[\{file=\".*/${srcfile}\",fullname=\"$fullname_syntax${srcfile}\"\}.*]" \
> +	    "222\\\^done,files=\\\[\{file=\"[string_to_regexp ${srcfile}]\",fullname=\"$fullname_syntax${srcfile}\"\}.*]" \
>                "Getting a list of source files."

... the second ${srcfile} in the exact same line your changing.  So it
looks odd to have to change one, but not the other.

What am I missing?

-- 
Pedro Alves



More information about the Gdb-patches mailing list