* config/gdbserver.exp (gdbserver_gdb_load): Update argument list.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / sepdebug.exp
index 8911f51289227fad6399d563d126799c4954fc39..e0a36ac7cb8034d15d836b2a2815c923759019d9 100644 (file)
@@ -199,27 +199,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)"
     }
 }
 
@@ -759,26 +748,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 $" {
@@ -883,29 +860,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)"
     }
 }
 
This page took 0.047728 seconds and 4 git commands to generate.