[committed,testsuite] generalize filename pattern in gdb.mi/mi-dprintf-pending.exp

Message ID 55FC3CE3.3010807@codesourcery.com
State New, archived
Headers

Commit Message

Sandra Loosemore Sept. 18, 2015, 4:33 p.m. UTC
  When compiling test cases for GDB, our remote-host test harness copies 
the source files to the working directory on the remote host and 
compiles them there using relative pathnames, so that when breakpoints 
are reported they don't include a pathname prefix either.  This patch 
fixes a bad breakpoint pattern in gdb.mi/mi-dprintf-pending.exp.

I've previously committed some other patches to fix testcases with 
breakpoint regexps that require a directory prefix... e.g.

https://sourceware.org/ml/gdb-patches/2013-04/msg00053.html

So I presume more of the same qualifies as "obvious", and have committed 
this patch.

-Sandra
  

Patch

diff --git a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
index 5bb4a1b..a4a1709 100644
--- a/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
+++ b/gdb/testsuite/gdb.mi/mi-dprintf-pending.exp
@@ -60,7 +60,7 @@  mi_gdb_test "-dprintf-insert -f pendfunc1 \"hello\"" \
     "mi set dprintf"
 
 mi_create_breakpoint $bp_location1 "mi insert breakpoint bp_location1" \
-    -type "breakpoint" -line $bp_location1 -file $srcdir/$subdir/$srcfile
+    -type "breakpoint" -line $bp_location1 -file ".*$srcfile"
 
 mi_run_cmd