This is the mail archive of the 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]

[ob/testsuite] Stop virtfunc.exp if the test can not be run

Last year sometime I was working on a bug in our startup code that was
sensitive to the alignment and size of the rest of the program.  So
there wasn't anything wrong with virtfunc.exp, but it happened to get
unlucky... that caused me to notice this wart.  If we can not run the
program, then like other test cases, we should bail out instead of
sending commands at the stuck GDB.

Tested on arm-none-eabi and x86_64-linux, checked in.

2009-11-13  Daniel Jacobowitz  <>

	* gdb.cp/virtfunc.exp (do_tests): If runto_main fails, give up.

Index: gdb/testsuite/gdb.cp/virtfunc.exp
--- gdb/testsuite/gdb.cp/virtfunc.exp	(revision 218690)
+++ gdb/testsuite/gdb.cp/virtfunc.exp	(revision 218691)
@@ -247,7 +247,10 @@ proc do_tests {} {
     gdb_test "set language c++" "" ""
     gdb_test "set width 0" "" ""
-    runto_main
+    if ![runto_main] then {
+	perror "couldn't run to breakpoint"
+	return
+    }
     gdb_breakpoint test_calls

Daniel Jacobowitz

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