This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix gdb.base/fixsection.exp for remote host testing
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 6 Oct 2011 19:06:07 +0000 (UTC)
- Subject: Fix gdb.base/fixsection.exp for remote host testing
gdb.base/fixsection.exp does
set testfile "fixsection"
set srcfile ${srcdir}/${subdir}/${testfile}.c
...
gdb_test "break static_fun" \
"Breakpoint.*at.* file .*${srcfile}, line.*" \
"breakpoint at static_fun"
That is, it tests for the path ${srcdir}/${subdir}/${testfile}.c in a
diagnostic - but in remote host testing, a copy of ${testfile}.c on
the remote host may have been used instead in the compilation so that
the full path is not embedded in the binary. This patch fixes this
remote host problem by not including the directories in the message
tested for (so they are instead matched by the existing ".*"). OK to
commit?
2011-10-06 Joseph Myers <joseph@codesourcery.com>
* gdb.base/fixsection.exp: Do not include directories in filename
in expected message.
Index: gdb.base/fixsection.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/fixsection.exp,v
retrieving revision 1.5
diff -u -r1.5 fixsection.exp
--- gdb.base/fixsection.exp 1 Jan 2011 15:33:41 -0000 1.5
+++ gdb.base/fixsection.exp 6 Oct 2011 18:34:56 -0000
@@ -60,7 +60,7 @@
# set breakpoint at static function static_fun
#
gdb_test "break static_fun" \
- "Breakpoint.*at.* file .*${srcfile}, line.*" \
+ "Breakpoint.*at.* file .*${testfile}\\.c, line.*" \
"breakpoint at static_fun"
#
--
Joseph S. Myers
joseph@codesourcery.com