Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Fix gdb.base/fixsection.exp for remote host testing
Date: Thu, 06 Oct 2011 19:11:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1110061902400.24874@digraph.polyomino.org.uk> (raw)

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


             reply	other threads:[~2011-10-06 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 19:11 Joseph S. Myers [this message]
2011-10-06 20:04 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1110061902400.24874@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox