# Start the program, we should land in the program main procedure
if { [gdb_start_cmd] < 0 } {
- untested start
+ fail start
return -1
}
# Verify that "start" lands inside the right procedure.
if { [gdb_start_cmd] < 0 } {
- untested "start failed to land inside the right procedure"
+ fail "start failed to land inside the right procedure"
return -1
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+if { [use_gdb_stub] } {
+ unsupported "test requires running"
+ return
+}
+
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
# For C++ programs, "start" should stop in main().
if { [gdb_start_cmd] < 0 } {
- untested start
+ fail start
return -1
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+if { [use_gdb_stub] } {
+ unsupported "test requires running"
+ return
+}
standard_testfile
# For C programs, "start" should stop in main().
if { [gdb_start_cmd] < 0 } {
- untested start
+ fail start
return -1
}
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+if { [use_gdb_stub] } {
+ unsupported "test requires running"
+ return
+}
if {[skip_hw_watchpoint_tests]} {
return 0
# `runto_main' or `runto main' would delete the watchpoint created above.
if { [gdb_start_cmd] < 0 } {
- untested start
+ fail start
return -1
}
gdb_test "" "main .* at .*" "start"
return 0
}
+if { [use_gdb_stub] } {
+ unsupported "test requires running"
+ return
+}
+
standard_testfile .c -dw.S
# Make some DWARF for the test.
# that this was the real "main".
if {[gdb_start_cmd] < 0} {
- untested "could not start ${testfile}"
+ fail "could not start ${testfile}"
return -1
}
clean_restart ${testfile}
+if { ![runto_main] } {
+ return
+}
+
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
pass "setting breakpoint 2"
}
-# Verify that "start" lands inside the right procedure.
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-gdb_test "" ".* at .*${srcfile}.*" "start"
-
gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
gdb_test "print r" ".* = 0" "print r before assigned to 1.25"
}
clean_restart ${testfile}
+
+if { ![runto_main] } {
+ return
+}
+
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
if { [gdb_breakpoint ${srcfile}:${bp_location1}] } {
pass "setting breakpoint 1"
}
-# Verify that "start" lands inside the right procedure.
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-gdb_test "" ".* at .*${srcfile}.*" "start"
gdb_test "continue" ""
gdb_test "print integer_array" { = \{50, 51, 52, 53, 54, 55, 56, 57\}}
}
clean_restart ${testfile}
+
+if { ![runto_main] } {
+ return
+}
+
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
pass "setting breakpoint 2"
}
-# Verify that "start" lands inside the right procedure.
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-# This test fails for gpc
-# because debug information for 'main'
-# is in some <implicit code>
-gdb_test "" \
- ".* at .*hello.pas.*" \
- "start"
-
gdb_test "cont" \
"Breakpoint .*:${bp_location1}.*" \
"Going to first breakpoint"
}
clean_restart ${testfile}
+
+if { ![runto_main] } {
+ return
+}
+
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
pass "setting breakpoint 2"
}
-# Verify that "start" lands inside the right procedure.
-if { [gdb_start_cmd] < 0 } {
- untested start
- return -1
-}
-
-gdb_test "" ".* at .*${srcfile}.*" "start"
-
gdb_test "cont" "Breakpoint .*:${bp_location1}.*" "going to first breakpoint"
gdb_test "print i" ".* = 0" "print i before assigned to 1"