This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix mi-file.exp fails on remote host
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Tue, 13 May 2014 19:30:23 +0100
- Subject: Re: [PATCH] Fix mi-file.exp fails on remote host
- Authentication-results: sourceware.org; auth=none
- References: <1399966474-6106-1-git-send-email-yao at codesourcery dot com>
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