strace $tracelevel
}
+global usestubs
+
#
# test running programs
#
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $objdir/$subdir/$binfile
+if $usestubs {
+ send "step\n"
+ # if use stubs step out of the breakpoint() function.
+ expect {
+ -re "main.* at .*$prompt $" {}
+ timeout { fail "single step at breakpoint() (timeout)" ; return 0 }
+ }
+}
#
# test simple breakpoint setting commands
#
#
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
-\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:60.*
+\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:57.*
\[0-9\]+\[\t \]+breakpoint keep y.* in factorial at .*$srcfile:76.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:64.*
send "info break\n"
expect {
-re "Num Type.*Disp Enb Address.*What.*
-\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:60.*
+\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:57.*
\[0-9\]+\[\t \]+breakpoint del.*y.*in factorial at .*$srcfile:76.*
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:64.*
\[0-9\]+\[\t \]+breakpoint del.*y.*in main at .*$srcfile:70.*$prompt $" {
if [istarget "*-*-vxworks*"] then {
send "run vxmain \"6\"\n"
} else {
- send "run\n"
+ gdb_run_cmd
}
expect {
- -re "Starting .*Break.* factorial .value=6. .*$prompt $" {}
+ -re "Break.* factorial .value=6. .*$prompt $" {}
timeout { fail "run to factorial(6)" ; return }
}