Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix gdb.base/fixsection.exp for remote host testing
@ 2011-10-06 19:11 Joseph S. Myers
  2011-10-06 20:04 ` Joel Brobecker
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2011-10-06 19:11 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-06 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-06 19:11 Fix gdb.base/fixsection.exp for remote host testing Joseph S. Myers
2011-10-06 20:04 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox