This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/testsuite] Fix cpcompletion.exp with debug info for the runtime
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 16 Feb 2010 15:27:30 -0500
- Subject: [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