Change gdb.trace to use clean_restart more consistently.
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
# define relative source line numbers:
"save ctf trace file"
# Restart GDB and read the trace data in tfile target.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_file_cmd $binfile
gdb_test "target tfile ${tracefile}.tf" ".*" \
"change to tfile target"
}
if { $gdb_can_read_ctf_data } {
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ctf ${tracefile}.ctf" ".*" \
"change to ctf target"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
standard_testfile actions.c
require gdb_trace_common_supports_arch
return -1
}
-gdb_load $binfile
+clean_restart $binfile
runto_main
-gdb_reinitialize_dir $srcdir/$subdir
gdb_test "maint agent 12" ".*const8 12.*pop.*end.*"
global binfile
global gdb_prompt
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_test_multiple "${trace_type} set_tracepoint" "set pending tracepoint" {
-re ".*Make \(|fast \)tracepoint pending.*y or \\\[n\\\]. $" {
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
# define relative source line numbers:
return -1
}
-# Start GDB and load executable file, compute the offset of the
-# instruction in bar returned from foo. It is needed in the Dwarf
-# Assembler.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}1
+clean_restart ${binfile}1
set returned_from_foo ""
return -1
}
-gdb_exit
-
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
load_lib "trace-support.exp"
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
#
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_load $binfile
+
+clean_restart $binfile
gdb_test "tstop" ".*" ""
gdb_test "tfind none" ".*" ""
runto_main
-gdb_reinitialize_dir $srcdir/$subdir
if {![gdb_target_supports_trace]} {
unsupported "current target does not support trace"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_load $binfile
+
+clean_restart $binfile
runto_main
-gdb_reinitialize_dir $srcdir/$subdir
if {![gdb_target_supports_trace]} {
unsupported "current target does not support trace"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
# define relative source line numbers:
global lib_sl1
# Start with a fresh gdb.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_test_multiple "$trace_type set_point1" "set pending tracepoint" {
-re ".*Make \(fast |\)tracepoint pending.*y or \\\[n\\\]. $" {
global tracefile
# Restart GDB and read the trace data in ${target} target.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ${target} ${tracefile}.${target}" ".*" \
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_load $binfile
+clean_restart $binfile
runto_main
-gdb_reinitialize_dir $srcdir/$subdir
if {![gdb_target_supports_trace]} {
unsupported "current target does not support trace"
load_lib "trace-support.exp"
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
# define relative source line numbers:
# Now start afresh, using only a trace file.
-gdb_exit
-gdb_start
-
-gdb_load $binfile
+clean_restart $binfile
gdb_test "target tfile $tfile_error" "Created tracepoint.*" \
"target tfile [file tail $tfile_error]"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
untested "failed to compile"
return -1
}
-gdb_load $binfile
+
+clean_restart $binfile
# 6.2 test help tstart
gdb_test "help tstart" \
"8.38: help tfind tracepoint"
runto_main
-gdb_reinitialize_dir $srcdir/$subdir
if {![gdb_target_supports_trace]} {
unsupported "current target does not support trace"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
# define relative source line numbers:
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
untested "failed to compile"
return -1
}
-gdb_load $binfile
+
+clean_restart $binfile
# PR gdb/21352: Command tsave does not support -r argument
gdb_test "tsave -r" "Argument required \\\(file in which to save trace data\\\)\." \
foreach target_name ${trace_file_targets} {
# Restart GDB and read the trace data in ${TARGET_NAME} target.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ${target_name} ${tracefile}.args.${target_name}" ".*" \
"change to ${target_name} target"
foreach target_name ${trace_file_targets} {
# Restart GDB and read the trace data in ${TARGET_NAME} target.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ${target_name} ${tracefile}.locals.${target_name}" ".*" \
"change to ${target_name} target"
foreach target_name ${trace_file_targets} {
# Restart GDB and read the trace data in ${TARGET_NAME} target.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ${target_name} ${tracefile}.registers.${target_name}" ".*" \
"change to ${target_name} target"
foreach target_name ${trace_file_targets} {
# Restart GDB and read the trace data in ${TARGET_NAME} target.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ${target_name} ${tracefile}.floats.${target_name}" ".*" \
"change to ${target_name} target"
foreach target_name ${trace_file_targets} {
# Restart GDB and read the trace data in ${TARGET_NAME} target.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ${target_name} ${tracefile}.globals.${target_name}" ".*" \
"change to ${target_name} target"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile actions.c
set executable $testfile
require gdb_trace_common_supports_arch
untested "failed to compile"
return -1
}
-gdb_load $binfile
+
+clean_restart $binfile
runto_main
-gdb_reinitialize_dir $srcdir/$subdir
if {![gdb_target_supports_trace]} {
unsupported "current target does not support trace"
load_lib "trace-support.exp"
-
-gdb_exit
-gdb_start
-
standard_testfile actions.c
require gdb_trace_common_supports_arch
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
untested "failed to compile"
return -1
}
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
+clean_restart
gdb_file_cmd $binfile
#
"save ctf trace file"
# Restart GDB and read the trace data in tfile target.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_file_cmd $binfile
gdb_test "target tfile ${tracefile}.tf" ".*" \
"change to tfile target"
}
if { $gdb_can_read_ctf_data } {
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
+ clean_restart
gdb_file_cmd $binfile
gdb_test "target ctf ${tracefile}.ctf" ".*" \
"change to ctf target"