This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]