This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/testsuite] Fix cpcompletion.exp with debug info for the runtime


This test works fine unless you are using a remote target and have
debug info for _start.  If so, it will try to set a breakpoint at
start.S:49 instead of cpcompletion.cc:49.

This is a common test pitfall, so I added a note to
GDBTestcaseCookbook on the wiki.

Tested on arm-none-eabi and x86_64-linux; committed to trunk.

-- 
Daniel Jacobowitz
CodeSourcery

2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>

	gdb/testsuite/
	* gdb.cp/cpcompletion.exp: Specify source file name explicitly.

diff -urp gdb-merged-orig/gdb/testsuite/gdb.cp/cpcompletion.exp gdb-merged/gdb/testsuite/gdb.cp/cpcompletion.exp
--- gdb-merged-orig/gdb/testsuite/gdb.cp/cpcompletion.exp	2010-02-10 14:51:09.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.cp/cpcompletion.exp	2010-02-15 16:42:15.000000000 -0800
@@ -76,8 +76,9 @@ gdb_load ${binfile}
 
 set bp_location [gdb_get_line_number "Set breakpoint here" ${testfile}.cc]
 
-if {![runto $bp_location]} {
+if {![runto "${testfile}.cc:$bp_location"]} {
     perror "test suppressed"
+    return
 }
 
 # This also tests inheritance -- completion should only see a single


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]