This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] fix gdb.cp/ovsrch.exp pathname regexp fails
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Tue, 2 Apr 2013 11:34:22 -0600
- Subject: [patch] fix gdb.cp/ovsrch.exp pathname regexp fails
We run remote i686-mingw32 host testing of our Canadian cross
toolchains, and have observed that most of the gdb.cp/ovsrch.exp tests
are failing across multiple targets in this test configuration.
The problem is that the test harness is copying each source file into
its working directory on the remote host and compiling it there, so that
the source filename passed to g++ is just e.g.
"ovsrch1.cc" instead of "/path/to/ovsrch1.cc". So, the debug
information encoded in the file doesn't include a pathname prefix, and
the file reported in the breakpoint hits doesn't include a pathname
prefix, either. But, the regexp in ovrsrch.exp is expecting one.
This one-character fix allows these tests to pass in this configuration.
OK to commit?
-Sandra
2013-04-02 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.cp/ovsrch.exp (test_class): Correct regexp to allow
empty directory in file reported for breakpoint hit.
Index: gdb/testsuite/gdb.cp/ovsrch.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/ovsrch.exp,v
retrieving revision 1.6
diff -u -p -r1.6 ovsrch.exp
--- gdb/testsuite/gdb.cp/ovsrch.exp 1 Jan 2013 06:33:27 -0000 1.6
+++ gdb/testsuite/gdb.cp/ovsrch.exp 2 Apr 2013 17:15:39 -0000
@@ -34,7 +34,7 @@ proc test_class {class} {
set conditional2 "if (A::outer::func ())"
foreach ovld [array names tests] {
set method "${class}::foo ($ovld) const"
- set result "Breakpoint (\[0-9\]).*file .*/ovsrch$tests($ovld).*"
+ set result "Breakpoint (\[0-9\]).*file .*ovsrch$tests($ovld).*"
gdb_test "break $method" $result
gdb_test "break '$method'" $result