* config/m68k-emc.exp, lib/emc-support.exp,
gdb.trace/gdb_c_test.c: Delete. * gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp, gdb.trace/collection.exp, gdb.trace/deltrace.exp, gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp, gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp, gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp, gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special casing for m68k-*-elf.
This commit is contained in:
parent
12af2ab656
commit
f8b7eaf30a
@ -1,3 +1,15 @@
|
||||
2009-11-05 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* config/m68k-emc.exp, lib/emc-support.exp,
|
||||
gdb.trace/gdb_c_test.c: Delete.
|
||||
* gdb.trace/actions.exp, gdb.trace/backtrace.exp, gdb.trace/circ.exp,
|
||||
gdb.trace/collection.exp, gdb.trace/deltrace.exp,
|
||||
gdb.trace/infotrace.exp, gdb.trace/limits.exp, gdb.trace/packetlen.exp,
|
||||
gdb.trace/passc-dyn.exp, gdb.trace/passcount.exp, gdb.trace/report.exp,
|
||||
gdb.trace/save-trace.exp, gdb.trace/tfind.exp, gdb.trace/tracecmd.exp,
|
||||
gdb.trace/while-dyn.exp, gdb.trace/while-stepping.exp: Remove special
|
||||
casing for m68k-*-elf.
|
||||
|
||||
2009-11-03 Pedro Alves <pedro@codesourcery.com>
|
||||
|
||||
* gdb.arch/i386-gnu-cfi.exp: Define SYMBOL_PREFIX on *-*-mingw*.
|
||||
|
@ -1,17 +0,0 @@
|
||||
load_lib gdb.exp
|
||||
load_lib "../config/monitor.exp"
|
||||
|
||||
proc gdb_emclaptop_command { command } {
|
||||
global board_info;
|
||||
set tname [board_info target name];
|
||||
|
||||
if ![info exists board_info($tname,m68k_connected)] {
|
||||
m68k_emc_board_connect target;
|
||||
}
|
||||
# This is about all we can do for now. *sigh*
|
||||
set dos_host [board_info target dos_host];
|
||||
|
||||
remote_send $dos_host "${command}\n";
|
||||
#remote_expect $dos_host {
|
||||
#}
|
||||
}
|
@ -27,18 +27,13 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set binfile [board_info target d490_binfile];
|
||||
set srcfile gdb_c_test.c
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/actions
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested actions.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/actions
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested actions.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
@ -27,39 +27,18 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
load_lib "emc-support.exp";
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
gdb_test "set remotetimeout 6" "" ""
|
||||
set timeout 500
|
||||
gdb_target_monitor "$binfile"
|
||||
# Give a TSTOP and ignore errors, to make sure any previous trace is off
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
send_gdb "compare-sections CS\n"
|
||||
gdb_expect {
|
||||
-re "MIS-MATCHED.*$gdb_prompt $" {
|
||||
untested backtrace.exp
|
||||
return -1
|
||||
all tests in this module will fail.";
|
||||
}
|
||||
-re ".*$gdb_prompt $" { }
|
||||
}
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/backtrace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested backtrace.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/backtrace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested backtrace.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
# We generously give ourselves one "pass" if we successfully
|
||||
@ -173,15 +152,10 @@ gdb_trace_setactions "8.6: setup TP to collect stack mem cast expr" \
|
||||
|
||||
gdb_test "tstart" "" ""
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
gdb_emclaptop_command "85,$arg1,$arg2,$arg3,$arg4,$arg5,$arg6"
|
||||
sleep 5
|
||||
} else {
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
}
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
|
||||
gdb_test "tstop" "" ""
|
||||
|
||||
|
@ -13,11 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
pass "Test not supported on this target"
|
||||
return;
|
||||
}
|
||||
|
||||
load_lib "trace-support.exp"
|
||||
|
||||
if $tracelevel then {
|
||||
|
@ -13,11 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
pass "Test not supported on this target"
|
||||
return;
|
||||
}
|
||||
|
||||
load_lib "trace-support.exp"
|
||||
|
||||
if $tracelevel then {
|
||||
|
@ -27,18 +27,13 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/deltrace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested deltrace.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/deltrace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested deltrace.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,18 +27,13 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/infotrace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested infotrace.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/infotrace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested infotrace.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
@ -13,11 +13,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
pass "Test not supported on this target"
|
||||
return;
|
||||
}
|
||||
|
||||
load_lib "trace-support.exp"
|
||||
|
||||
if $tracelevel then {
|
||||
|
@ -27,39 +27,18 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
load_lib "emc-support.exp"
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
gdb_test "set remotetimeout 6" "" ""
|
||||
set timeout 500
|
||||
gdb_target_monitor "$binfile"
|
||||
# Give a TSTOP and ignore errors, to make sure any previous trace is off
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
send_gdb "compare-sections CS\n"
|
||||
gdb_expect {
|
||||
-re "MIS-MATCHED.*$gdb_prompt $" {
|
||||
untested packetlen.exp
|
||||
return -1
|
||||
all tests in this module will fail.";
|
||||
}
|
||||
-re ".*$gdb_prompt $" { }
|
||||
}
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/packetlen
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested packetlen.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/packetlen
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested packetlen.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
# If testing on a remote host, download the source file.
|
||||
@ -84,15 +63,10 @@ gdb_trace_setactions "setup collect actions" \
|
||||
"end" ""
|
||||
|
||||
gdb_test "tstart" "" "survive the long packet send"
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
gdb_emclaptop_command "85,1,2,3,4,5,6"
|
||||
sleep 5
|
||||
} else {
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
}
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
|
||||
gdb_test "tstop" "" "confirm: survived the long packet send"
|
||||
|
||||
|
@ -26,39 +26,18 @@ set bug_id 0
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
load_lib "emc-support.exp";
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
gdb_test "set remotetimeout 6" "" ""
|
||||
set timeout 500
|
||||
gdb_target_monitor $binfile
|
||||
# Give a TSTOP and ignore errors, to make sure any previous trace is off
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
send_gdb "compare-sections CS\n"
|
||||
gdb_expect {
|
||||
-re "MIS-MATCHED.*$gdb_prompt $" {
|
||||
untested passc-dyn.exp
|
||||
return -1
|
||||
all tests in this module will fail.";
|
||||
}
|
||||
-re ".*$gdb_prompt $" { }
|
||||
}
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/passc-dyn
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested passc-dyn.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/passc-dyn
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested passc-dyn.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
# We generously give ourselves one "pass" if we successfully
|
||||
@ -117,26 +96,11 @@ gdb_test "passcount 3 $tdp4" "Setting tracepoint $tdp4's passcount to 3" \
|
||||
|
||||
gdb_test "tstart" "" ""
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
gdb_emclaptop_command "85,1,2,3,4,5,6"
|
||||
sleep 5
|
||||
gdb_emclaptop_command "85,7,8,9,A,B,C"
|
||||
sleep 5
|
||||
gdb_emclaptop_command "85,D,E,F,10,11,12"
|
||||
sleep 5
|
||||
# gdb_test "tstop"
|
||||
##
|
||||
## Note! Must NOT give the tstop command, because the passcount
|
||||
## has already stopped the experiment. You would not
|
||||
## think this would be an error, but in EMC's mind it is...
|
||||
##
|
||||
} else {
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
gdb_test "tstop" "" ""
|
||||
}
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
gdb_test "tstop" "" ""
|
||||
|
||||
gdb_test "tfind none" "" ""
|
||||
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x -1 x" ""] {
|
||||
|
@ -26,18 +26,13 @@ set bug_id 0
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/passcount
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested passcount.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/passcount
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested passcount.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
@ -27,39 +27,18 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
load_lib "emc-support.exp";
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
gdb_test "set remotetimeout 6" "" ""
|
||||
set timeout 500
|
||||
gdb_target_monitor $binfile
|
||||
# Give a TSTOP and ignore errors, to make sure any previous trace is off
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
send_gdb "compare-sections CS\n"
|
||||
gdb_expect {
|
||||
-re "MIS-MATCHED.*$gdb_prompt $" {
|
||||
untested report.exp
|
||||
return -1
|
||||
all tests in this module will fail.";
|
||||
}
|
||||
-re ".*$gdb_prompt $" { }
|
||||
}
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/report
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested report.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/report
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested report.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
# We generously give ourselves one "pass" if we successfully
|
||||
@ -186,16 +165,10 @@ gdb_trace_setactions "9.x: setup TP to collect expressions" \
|
||||
|
||||
gdb_test "tstart" "" ""
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
gdb_emclaptop_command "85,$arg1,$arg2,$arg3,$arg4,$arg5,$arg6"
|
||||
sleep 5
|
||||
|
||||
} else {
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
}
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
|
||||
gdb_test "tstop" "" ""
|
||||
|
||||
|
@ -27,18 +27,13 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/save-trace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested save-trace.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/save-trace
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested save-trace.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
@ -28,40 +28,19 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
load_lib "emc-support.exp";
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
gdb_test "set remotetimeout 6" "" ""
|
||||
set timeout 500
|
||||
gdb_target_monitor $binfile
|
||||
# Give a TSTOP and ignore errors, to make sure any previous trace is off
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
send_gdb "compare-sections CS\n"
|
||||
gdb_expect {
|
||||
-re "MIS-MATCHED.*$gdb_prompt $" {
|
||||
untested tfind.exp
|
||||
return -1
|
||||
all tests in this module will fail.";
|
||||
}
|
||||
-re ".*$gdb_prompt $" { }
|
||||
}
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/tfind
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/tfind
|
||||
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested tfind.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" "$binfile" \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested tfind.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
# We generously give ourselves one "pass" if we successfully
|
||||
@ -135,18 +114,10 @@ gdb_test "tstatus" "\[Tt\]race is running.*" "test tstatus on"
|
||||
# 6.2 test help tstart
|
||||
gdb_test "help tstart" "Start trace data collection." "6.2: help tstart"
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
gdb_emclaptop_command "85,1,2,3,4,5,6"
|
||||
sleep 5
|
||||
|
||||
gdb_emclaptop_command "85,7,8,9,A,B,C"
|
||||
sleep 5
|
||||
} else {
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
}
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
|
||||
# 7.1 test tstop command
|
||||
send_gdb "tstop\n"
|
||||
|
@ -26,18 +26,13 @@ set bug_id 0
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/tracecmd
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested tracecmd.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile $objdir/$subdir/tracecmd
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested tracecmd.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
@ -27,40 +27,18 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
load_lib "emc-support.exp"
|
||||
set testfile "gdb_c_test"
|
||||
set srcfile $testfile.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
gdb_test "set remotetimeout 6" "" ""
|
||||
set timeout 500
|
||||
gdb_target_monitor "$binfile"
|
||||
# Give a TSTOP and ignore errors, to make sure any previous trace is off
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
send_gdb "compare-section CS\n"
|
||||
gdb_expect {
|
||||
-re "MIS-MATCHED.*$gdb_prompt $" {
|
||||
untested while-dyn.exp
|
||||
return -1
|
||||
all tests in this module will fail.";
|
||||
}
|
||||
-re ".*$gdb_prompt $" { }
|
||||
}
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile $testfile.c
|
||||
set binfile $objdir/$subdir/while-dyn
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested while-dyn.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
set testfile "actions"
|
||||
set srcfile $testfile.c
|
||||
set binfile $objdir/$subdir/while-dyn
|
||||
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested while-dyn.exp
|
||||
return -1
|
||||
}
|
||||
gdb_load $binfile
|
||||
gdb_test "tstop" "" ""
|
||||
gdb_test "tfind none" "" ""
|
||||
runto_main
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
# We generously give ourselves one "pass" if we successfully
|
||||
@ -95,15 +73,10 @@ gdb_trace_setactions "5.12: define while-stepping <stepcount>" \
|
||||
|
||||
gdb_test "tstart" "" ""
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
gdb_emclaptop_command "85,1,2,3,4,5,6"
|
||||
sleep 5
|
||||
} else {
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
}
|
||||
gdb_test "break end" "" ""
|
||||
gdb_test "continue" \
|
||||
"Continuing.*Breakpoint $decimal, end.*" \
|
||||
"run trace experiment"
|
||||
|
||||
gdb_test "tstop" "" ""
|
||||
|
||||
|
@ -27,18 +27,13 @@ set bug_id 0
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
||||
if [istarget "m68k-*-elf"] then {
|
||||
set srcfile gdb_c_test.c
|
||||
set binfile [board_info target d490_binfile];
|
||||
} else {
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/while-stepping
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested while-stepping.exp
|
||||
return -1
|
||||
}
|
||||
set testfile "actions"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/while-stepping
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
|
||||
executable {debug nowarnings}] != "" } {
|
||||
untested while-stepping.exp
|
||||
return -1
|
||||
}
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
|
||||
|
@ -1,223 +0,0 @@
|
||||
proc gdb_emc_readvar { varname } {
|
||||
global gdb_prompt;
|
||||
|
||||
set result -1;
|
||||
send_gdb "print $varname\n"
|
||||
gdb_expect 5 {
|
||||
-re "\[$\].*= (\[0-9\]+).*$gdb_prompt $" {
|
||||
set result $expect_out(1,string);
|
||||
}
|
||||
-re "$gdb_prompt $" { }
|
||||
default { }
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
proc gdb_emc_gettpnum { testname } {
|
||||
global gdb_prompt;
|
||||
|
||||
if { $testname != "" } {
|
||||
gdb_test "trace $testname" "" ""
|
||||
}
|
||||
return [gdb_emc_readvar "\$tpnum"];
|
||||
}
|
||||
|
||||
proc gdb_emc_setactions { testname actionname args } {
|
||||
global gdb_prompt;
|
||||
|
||||
set state 0;
|
||||
set status "pass";
|
||||
send_gdb "actions $actionname\n";
|
||||
set expected_result "";
|
||||
gdb_expect 5 {
|
||||
-re "No tracepoint number .*$gdb_prompt $" {
|
||||
fail $testname
|
||||
return 1;
|
||||
}
|
||||
-re "Enter actions for tracepoint $actionname.*>" {
|
||||
if { [llength $args] > 0 } {
|
||||
set lastcommand "[lindex $args $state]";
|
||||
send_gdb "[lindex $args $state]\n";
|
||||
incr state;
|
||||
set expected_result [lindex $args $state];
|
||||
incr state;
|
||||
} else {
|
||||
send_gdb "end\n";
|
||||
}
|
||||
exp_continue;
|
||||
}
|
||||
-re "\(.*\[\r\n\]+)\[ \t]*> $" {
|
||||
if { $expected_result != "" } {
|
||||
# Remove echoed command and its associated newline.
|
||||
regsub "^\[^\r\n\]+\[\r\n\]+" "$expect_out(1,string)" "" out;
|
||||
# Strip off any newlines at the end of the string.
|
||||
regsub "\[\r\n\]+$" "$out" "" out;
|
||||
verbose "expected '$expected_result', got '$out', expect_out is '$expect_out(1,string)'";
|
||||
if ![regexp $expected_result $out] {
|
||||
set status "fail";
|
||||
}
|
||||
set expected_result "";
|
||||
}
|
||||
if { $state < [llength $args] } {
|
||||
send_gdb "[lindex $args $state]\n";
|
||||
incr state;
|
||||
set expected_result [lindex $args $state];
|
||||
incr state;
|
||||
} else {
|
||||
send_gdb "end\n";
|
||||
set expected_result "";
|
||||
}
|
||||
exp_continue;
|
||||
}
|
||||
-re "\(.*\)$gdb_prompt $" {
|
||||
if { $expected_result != "" } {
|
||||
if ![regexp $expected_result $expect_out(1,string)] {
|
||||
set status "fail";
|
||||
}
|
||||
set expected_result "";
|
||||
}
|
||||
if { [llength $args] < $state } {
|
||||
set status "fail";
|
||||
}
|
||||
}
|
||||
default {
|
||||
set status "fail";
|
||||
}
|
||||
}
|
||||
if { $testname != "" } {
|
||||
$status $testname;
|
||||
}
|
||||
if { $status == "pass" } then {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# test collect command
|
||||
#
|
||||
|
||||
proc gdb_emc_tracetest_collect { arg1 msgstring } {
|
||||
global decimal
|
||||
global gdb_prompt;
|
||||
|
||||
set teststate 0
|
||||
gdb_expect 30 {
|
||||
-re "Enter actions for tracepoint $decimal.*> $" {
|
||||
send_gdb "collect $arg1\n"
|
||||
incr teststate;
|
||||
exp_continue
|
||||
}
|
||||
-re "> $" {
|
||||
if { $teststate == 1 } {
|
||||
send_gdb "end\n"
|
||||
incr teststate;
|
||||
exp_continue
|
||||
} else {
|
||||
fail "$msgstring"
|
||||
}
|
||||
}
|
||||
-re ".*$gdb_prompt $" {
|
||||
if { $teststate == 2 } {
|
||||
pass "$msgstring";
|
||||
} else {
|
||||
fail "$msgstring";
|
||||
}
|
||||
}
|
||||
default {
|
||||
fail "$msgstring (default)";
|
||||
}
|
||||
}
|
||||
regsub -all "(\[($@*+)\])" "collect $arg1" "\[\\1\]" arg1_regexp;
|
||||
gdb_test "info tracepoints" ".*$arg1_regexp.*" "$msgstring info tracepoint"
|
||||
}
|
||||
|
||||
proc gdb_delete_tracepoints { } {
|
||||
global gdb_prompt;
|
||||
|
||||
send_gdb "delete tracepoints\n"
|
||||
gdb_expect 30 {
|
||||
-re "Delete all tracepoints.*y or n.*$" {
|
||||
send_gdb "y\n"
|
||||
exp_continue;
|
||||
}
|
||||
-re "$gdb_prompt $" { }
|
||||
timeout { fail "delete all tracepoints (timeout)" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Send each command in the list CMDLIST to gdb. If we see the string
|
||||
# "error" or "warning" from gdb, we assume an error has occured and
|
||||
# return a non-zero result. All of the commands in CMDLIST are always
|
||||
# sent, even if an error occurs.
|
||||
# If TESTNAME is non-null, we call pass or fail with the string in TESTNAME
|
||||
# depending on whether or not an error/warning has occurred.
|
||||
#
|
||||
proc gdb_do_cmdlist { cmdlist testname } {
|
||||
global gdb_prompt;
|
||||
|
||||
set status 0;
|
||||
|
||||
foreach x $cmdlist {
|
||||
send_gdb "$x\n";
|
||||
gdb_expect 60 {
|
||||
-re "\[Ee\]rror|\[Ww\]arning" {
|
||||
set status 1;
|
||||
exp_continue;
|
||||
}
|
||||
-re "$gdb_prompt $" { }
|
||||
-re "\[\r\n\]\[ \t\]*> *$" { }
|
||||
}
|
||||
}
|
||||
if { $testname != "" } {
|
||||
if { $status == 0 } {
|
||||
pass "$testname";
|
||||
} else {
|
||||
fail "$testname";
|
||||
}
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
|
||||
#
|
||||
# Given the file FILENAME, we read it as a list of commands and generate
|
||||
# a list suitable for use by gdb_do_cmdlist. Lines beginning with # are
|
||||
# ignored; blank lines are interpreted as empty lines to be sent to gdb.
|
||||
#
|
||||
proc gdb_process_cmdfile { filename } {
|
||||
set id [open $filename "r"];
|
||||
if { $id < 0 } {
|
||||
return "";
|
||||
}
|
||||
set result {};
|
||||
while { [gets $id line] >= 0 } {
|
||||
if [regexp "^#" $line] {
|
||||
continue;
|
||||
}
|
||||
set result [concat $result [list "$line"]];
|
||||
}
|
||||
close $id;
|
||||
return $result;
|
||||
}
|
||||
|
||||
# gdb_find_c_test_baseline
|
||||
# returns -1 on failure (CALLER MUST CHECK RETURN!)
|
||||
proc gdb_find_c_test_baseline { } {
|
||||
global gdb_prompt;
|
||||
|
||||
set gdb_c_test_baseline -1;
|
||||
|
||||
send_gdb "list gdb_c_test\n"
|
||||
gdb_expect {
|
||||
-re "void.*p5,.*void.*p6.*\[\r\n\](\[0-9\]+)\[\t \]+\{.*$gdb_prompt $" {
|
||||
set gdb_c_test_baseline $expect_out(1,string)
|
||||
}
|
||||
-re "$gdb_prompt $" { }
|
||||
default { }
|
||||
}
|
||||
return $gdb_c_test_baseline;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user