aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/dprintf-detach.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/dprintf-detach.exp')
-rw-r--r--gdb/testsuite/gdb.base/dprintf-detach.exp12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp
index dc3384b..573aa0a 100644
--- a/gdb/testsuite/gdb.base/dprintf-detach.exp
+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp
@@ -26,8 +26,8 @@ require can_spawn_for_attach
standard_testfile
set escapedbinfile [string_to_regexp ${binfile}]
-if [build_executable "failed to prepare for dprintf-detach" \
- ${testfile} ${srcfile} {debug}] {
+if {[build_executable "failed to prepare for dprintf-detach" \
+ ${testfile} ${srcfile} {debug}]} {
return -1
}
@@ -37,13 +37,14 @@ proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected
with_test_prefix "$test_prefix" {
# Start with a clean gdb
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
gdb_test_no_output "set breakpoint always-inserted ${breakpoint_always_inserted}"
gdb_test_no_output "set dprintf-style ${dprintf_style}"
gdb_test_no_output "set disconnected-dprintf ${disconnected_dprintf}"
- if ![runto_main] {
+ if {![runto_main]} {
return -1
}
@@ -68,7 +69,8 @@ proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected
gdb_exit
# Check that the process still exists by attaching a new gdb to it.
- clean_restart ${binfile}
+ clean_restart
+ gdb_load $binfile
set test "re-attach to inferior"
set is_gdbserver [target_is_gdbserver]