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] GDB testsuite: Escape paths used in regular expressions


On 02/10/2016 04:39 PM, Zachary T Welch wrote:
> This patch fixes problems with a few GDB testsuites when executing in a
> path that contains special characters (e.g. "++").  When such paths are
> used as a regular expression, the regular expression parser will choke
> and cause the tests to fail.  This patch introduces a new function to
> escape strings that will be used as regular expressions, using it to
> sanitize path names used in expect scripts.
> 
> If it looks good, please commit.  Thanks!
> 
> 	gdb/testsuite/:
> 	* gdb.base/maint.exp: Escape paths used in regular expressions.
> 	* gdb.stabs/weird.exp: Likewise.
> 	* gdb.exp (escape_regex_chars): New.

Seems like you reinvented string_to_regexp.

Thanks,
Pedro Alves


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