Fix gdb.base/attach.exp fails when gdb is configured --with-sysroot=/
I see some test fails in gdb.base/attach.exp when gdb is configured
--with-sysroot=/.
FAIL: gdb.base/attach.exp: attach2, with no file
FAIL: gdb.base/attach.exp: load file manually, after attach2 (re-read) (got interactive prompt)
FAIL: gdb.base/attach.exp: attach when process' a.out not in cwd
If gdb is configured this way, sysroot is "/" in default, and if binfile
is a absolute path, the regexp pattern $sysroot$escapedbinfile is
incorrect.
There are different ways to fix it, but I don't want to complicate the
test, so I choose this naive way.
gdb/testsuite:
2018-02-01 Yao Qi <yao.qi@linaro.org>
* gdb.base/attach.exp (do_attach_tests): Set sysroot to
"\[^\r\n\]*".