summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/break.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-03-27 17:59:38 +0000
committerDaniel Jacobowitz <drow@false.org>2007-03-27 17:59:38 +0000
commitb741e217929039042129802a61e4510c580ecc79 (patch)
tree7f95fddc87c00954b65a276ae74af2533d50aa59 /gdb/testsuite/gdb.base/break.exp
parentd2449ee801d18f5af7317bc72c92bc9bbb7b669e (diff)
* config/gdbserver.exp (gdbserver_gdb_load): Update argument list.
(gdb_load): Delete, replace with... (gdb_reload): ...this. * gdb.server/server-run.exp: Use gdb_load and gdbserver_run. * gdb.server/server-mon.exp: Likewise. * lib/gdb.exp (gdb_run_cmd): Use gdb_reload. (gdb_start_cmd): New. (gdb_file_cmd): Save the last loaded file. (gdb_reload): New. (gdb_gnu_strip_debug): Use transform. * lib/gdbserver-support.exp (gdbserver_spawn): Move file download support here. Use new $last_loaded_file. Check mtime. (gdb_target_cmd): Handle ObjC failure case. (infer_host_exec): Delete. (gdbserver_load): Rename to... (gdbserver_run): ...this. Simplify. * lib/mi-support.exp (mi_gdb_file_cmd): Set last_loaded_file. (mi_gdb_load): Move most contents to a new function... (mi_gdb_target_load): ...here. Simplify call to gdbserver_gdb_load. (mi_run_cmd): Use mi_gdb_target_load. * gdb.base/break.exp, gdb.base/ending-run.exp, gdb.base/pending.exp, gdb.base/sepdebug.exp, gdb.base/unload.exp, gdb.objc/objcdecode.exp: Use gdb_run_cmd. * gdb.base/charsign.exp: Remove incorrect comment. * gdb.base/dbx.exp (gdb_file_cmd): Set last_loaded_file. * gdb.ada/exec_changed.exp, gdb.ada/null_record.exp, gdb.ada/start.exp, gdb.base/start.exp: Use gdb_start_cmd.
Diffstat (limited to 'gdb/testsuite/gdb.base/break.exp')
-rw-r--r--gdb/testsuite/gdb.base/break.exp81
1 files changed, 24 insertions, 57 deletions
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index aba80edf0c..16d05b758e 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -202,27 +202,16 @@ if [istarget "mips-idt-*"] then {
#
# run until the breakpoint at main is hit. For non-stubs-using targets.
#
-if ![target_info exists use_gdb_stub] {
- if [istarget "*-*-vxworks*"] then {
- send_gdb "run vxmain \"2\"\n"
- set timeout 120
- verbose "Timeout is now $timeout seconds" 2
- } else {
- send_gdb "run\n"
- }
- gdb_expect {
- -re "The program .* has been started already.*y or n. $" {
- send_gdb "y\n"
- exp_continue
+gdb_run_cmd
+gdb_expect {
+ -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $" {
+ pass "run until function breakpoint"
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
- { pass "run until function breakpoint" }
- -re ".*$gdb_prompt $" { fail "run until function breakpoint" }
- timeout { fail "run until function breakpoint (timeout)" }
- }
-} else {
- if ![target_info exists gdb_stub] {
- gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue"
+ -re "$gdb_prompt $" {
+ fail "run until function breakpoint"
+ }
+ timeout {
+ fail "run until function breakpoint (timeout)"
}
}
@@ -773,26 +762,14 @@ proc test_next_with_recursion {} {
global decimal
global binfile
- if [target_info exists use_gdb_stub] {
- # Reload the program.
- delete_breakpoints
- gdb_load ${binfile};
- } else {
- # FIXME: should be using runto
- gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y"
-
- delete_breakpoints
- }
+ gdb_test "kill" "" "kill program" "Kill the program being debugged.*y or n. $" "y"
+ delete_breakpoints
gdb_test "break factorial" "Breakpoint $decimal at .*" "break at factorial"
# Run until we call factorial with 6
- if [istarget "*-*-vxworks*"] then {
- send_gdb "run vxmain \"6\"\n"
- } else {
- gdb_run_cmd
- }
+ gdb_run_cmd
gdb_expect {
-re "Break.* factorial .value=6. .*$gdb_prompt $" {}
-re ".*$gdb_prompt $" {
@@ -916,29 +893,19 @@ gdb_test "break marker4" \
#
# run until the breakpoint at main is hit. For non-stubs-using targets.
#
-if ![target_info exists use_gdb_stub] {
- if [istarget "*-*-vxworks*"] then {
- send_gdb "run vxmain \"2\"\n"
- set timeout 120
- verbose "Timeout is now $timeout seconds" 2
- } else {
- send_gdb "run\n"
- }
- gdb_expect {
- -re "The program .* has been started already.*y or n. $" {
- send_gdb "y\n"
- exp_continue
+gdb_run_cmd
+gdb_expect {
+ -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $" {
+ pass "run until function breakpoint, optimized file"
}
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.* \{.*$gdb_prompt $"\
- { pass "run until function breakpoint, optimized file" }
- -re "Starting program.*Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $"\
- { pass "run until function breakpoint, optimized file (code motion)" }
- -re ".*$gdb_prompt $" { fail "run until function breakpoint, optimized file" }
- timeout { fail "run until function breakpoint, optimized file (timeout)" }
- }
-} else {
- if ![target_info exists gdb_stub] {
- gdb_test continue ".*Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.*, envp=.*\\) at .*$srcfile:$bp_location6.*$bp_location6\[\t \]+if .argc.*\{.*" "stub continue, optimized file"
+ -re "Breakpoint \[0-9\]+,.*main .*argc.*argv.* at .*$gdb_prompt $" {
+ pass "run until function breakpoint, optimized file (code motion)"
+ }
+ -re "$gdb_prompt $" {
+ fail "run until function breakpoint, optimized file"
+ }
+ timeout {
+ fail "run until function breakpoint, optimized file (timeout)"
}
}