mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 09:58:19 +08:00
2012-02-21 Pedro Alves <palves@redhat.com>
* gdb.arch/altivec-abi.exp (altivec_abi_tests): Don't do with_test_prefix here. (top level): Do it here instead. Remove `:' from the with_test_prefix string. * gdb.base/attach-pie-misread.exp: Remove the leading space the the suffix `:' from the with_test_prefix prefix string. * gdb.base/break-interp.exp: Ditto. * gdb.base/catch-load.exp: Ditto. * gdb.base/disp-step-syscall.exp: Ditto. * gdb.base/jit-so.exp: Ditto. * gdb.base/jit.exp: Ditto. * gdb.base/sepdebug.exp: Ditto. * gdb.base/solib-display.exp: Ditto. * gdb.base/solib-overlap.exp: Ditto. * gdb.base/watch-cond-infcall.exp: Ditto. * gdb.base/watchpoint.exp: Ditto. * gdb.dwarf2/dw2-noloc.exp: Ditto. * gdb.mi/mi-watch.exp: Ditto. * gdb.mi/mi2-watch.exp: Ditto. * gdb.threads/non-ldr-exc-1.exp: Ditto. * gdb.threads/non-ldr-exc-2.exp: Ditto. * gdb.threads/non-ldr-exc-3.exp: Ditto. * gdb.threads/non-ldr-exc-4.exp: Ditto. * gdb.threads/watchpoint-fork.exp: Ditto. * gdb.threads/watchthreads-reorder.exp: Ditto. * gdb.trace/change-loc.exp: Ditto. * gdb.trace/pending.exp: Ditto. * gdb.trace/status-stop.exp: Ditto. * gdb.trace/strace.exp: Ditto. * gdb.trace/trace-break.exp: Ditto. * gdb.trace/unavailable.exp: Ditto. * lib/gdb.exp (with_test_prefix): Always prefix with space and suffix with colon. Adjust leading comments.
This commit is contained in:
@ -1,3 +1,39 @@
|
|||||||
|
2012-02-21 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* gdb.arch/altivec-abi.exp (altivec_abi_tests): Don't do
|
||||||
|
with_test_prefix here.
|
||||||
|
(top level): Do it here instead. Remove `:' from the
|
||||||
|
with_test_prefix string.
|
||||||
|
* gdb.base/attach-pie-misread.exp: Remove the leading space the
|
||||||
|
the suffix `:' from the with_test_prefix prefix string.
|
||||||
|
* gdb.base/break-interp.exp: Ditto.
|
||||||
|
* gdb.base/catch-load.exp: Ditto.
|
||||||
|
* gdb.base/disp-step-syscall.exp: Ditto.
|
||||||
|
* gdb.base/jit-so.exp: Ditto.
|
||||||
|
* gdb.base/jit.exp: Ditto.
|
||||||
|
* gdb.base/sepdebug.exp: Ditto.
|
||||||
|
* gdb.base/solib-display.exp: Ditto.
|
||||||
|
* gdb.base/solib-overlap.exp: Ditto.
|
||||||
|
* gdb.base/watch-cond-infcall.exp: Ditto.
|
||||||
|
* gdb.base/watchpoint.exp: Ditto.
|
||||||
|
* gdb.dwarf2/dw2-noloc.exp: Ditto.
|
||||||
|
* gdb.mi/mi-watch.exp: Ditto.
|
||||||
|
* gdb.mi/mi2-watch.exp: Ditto.
|
||||||
|
* gdb.threads/non-ldr-exc-1.exp: Ditto.
|
||||||
|
* gdb.threads/non-ldr-exc-2.exp: Ditto.
|
||||||
|
* gdb.threads/non-ldr-exc-3.exp: Ditto.
|
||||||
|
* gdb.threads/non-ldr-exc-4.exp: Ditto.
|
||||||
|
* gdb.threads/watchpoint-fork.exp: Ditto.
|
||||||
|
* gdb.threads/watchthreads-reorder.exp: Ditto.
|
||||||
|
* gdb.trace/change-loc.exp: Ditto.
|
||||||
|
* gdb.trace/pending.exp: Ditto.
|
||||||
|
* gdb.trace/status-stop.exp: Ditto.
|
||||||
|
* gdb.trace/strace.exp: Ditto.
|
||||||
|
* gdb.trace/trace-break.exp: Ditto.
|
||||||
|
* gdb.trace/unavailable.exp: Ditto.
|
||||||
|
* lib/gdb.exp (with_test_prefix): Always prefix with space and
|
||||||
|
suffix with colon. Adjust leading comments.
|
||||||
|
|
||||||
2012-02-21 Pedro Alves <palves@redhat.com>
|
2012-02-21 Pedro Alves <palves@redhat.com>
|
||||||
Tom Tromey <tromey@redhat.com>
|
Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ if [get_compiler_info $binfile] {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc altivec_abi_tests { prefix extra_flags force_abi } { with_test_prefix $prefix {
|
proc altivec_abi_tests { prefix extra_flags force_abi } {
|
||||||
global testfile binfile srcfile srcdir subdir
|
global testfile binfile srcfile srcdir subdir
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
@ -144,10 +144,12 @@ proc altivec_abi_tests { prefix extra_flags force_abi } { with_test_prefix $pref
|
|||||||
gdb_test "p matrix\[1\]" ".*= .11, 12, 13, 14, 15, 16, 17, 18." "print second vector"
|
gdb_test "p matrix\[1\]" ".*= .11, 12, 13, 14, 15, 16, 17, 18." "print second vector"
|
||||||
gdb_test "p matrix\[2\]" ".*= .21, 22, 23, 24, 25, 26, 27, 28." "print third vector"
|
gdb_test "p matrix\[2\]" ".*= .21, 22, 23, 24, 25, 26, 27, 28." "print third vector"
|
||||||
gdb_test "p matrix\[3\]" ".*= .31, 32, 33, 34, 35, 36, 37, 38." "print fourth vector"
|
gdb_test "p matrix\[3\]" ".*= .31, 32, 33, 34, 35, 36, 37, 38." "print fourth vector"
|
||||||
}}
|
}
|
||||||
|
|
||||||
if [test_compiler_info gcc*] {
|
if [test_compiler_info gcc*] {
|
||||||
altivec_abi_tests " default ABI, auto:" "additional_flags=-maltivec" "auto"
|
with_test_prefix "default ABI, auto" {
|
||||||
|
altivec_abi_tests "additional_flags=-maltivec" "auto"
|
||||||
|
}
|
||||||
|
|
||||||
# On GNU/Linux, we can mix -mabi=no-altivec and -mabi=altivec.
|
# On GNU/Linux, we can mix -mabi=no-altivec and -mabi=altivec.
|
||||||
# So test some combinations.
|
# So test some combinations.
|
||||||
@ -156,24 +158,28 @@ if [test_compiler_info gcc*] {
|
|||||||
# was broken, so skip those tests there.
|
# was broken, so skip those tests there.
|
||||||
if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } {
|
if { ![is_lp64_target] || ![test_compiler_info "gcc-4-\[12\]-*"] } {
|
||||||
set binfile ${objdir}/${subdir}/${testfile}-ge-ge
|
set binfile ${objdir}/${subdir}/${testfile}-ge-ge
|
||||||
altivec_abi_tests " generic ABI, forced:" \
|
with_test_prefix "generic ABI, forced" {
|
||||||
"additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic"
|
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "generic"
|
||||||
|
}
|
||||||
|
|
||||||
set binfile ${objdir}/${subdir}/${testfile}-ge-auto
|
set binfile ${objdir}/${subdir}/${testfile}-ge-auto
|
||||||
altivec_abi_tests " generic ABI, auto:" \
|
with_test_prefix "generic ABI, auto" {
|
||||||
"additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto"
|
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=no-altivec" "auto"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set binfile ${objdir}/${subdir}/${testfile}-av-av
|
set binfile ${objdir}/${subdir}/${testfile}-av-av
|
||||||
altivec_abi_tests " AltiVec ABI, forced:" \
|
with_test_prefix "AltiVec ABI, forced" {
|
||||||
"additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec"
|
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "altivec"
|
||||||
|
}
|
||||||
|
|
||||||
set binfile ${objdir}/${subdir}/${testfile}-av-auto
|
set binfile ${objdir}/${subdir}/${testfile}-av-auto
|
||||||
altivec_abi_tests " AltiVec ABI, auto:" \
|
with_test_prefix "AltiVec ABI, auto" {
|
||||||
"additional_flags=-maltivec additional_flags=-mabi=altivec" "auto"
|
altivec_abi_tests "additional_flags=-maltivec additional_flags=-mabi=altivec" "auto"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} elseif [test_compiler_info xlc*] {
|
} elseif [test_compiler_info xlc*] {
|
||||||
altivec_abi_tests "" "additional_flags=-qaltivec" "auto"
|
altivec_abi_tests "additional_flags=-qaltivec" "auto"
|
||||||
} else {
|
} else {
|
||||||
warning "unknown compiler"
|
warning "unknown compiler"
|
||||||
return -1
|
return -1
|
||||||
|
@ -152,7 +152,7 @@ gdb_expect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Due to alignments it was reproducible with 1 on x86_64 but 2 on i686.
|
# Due to alignments it was reproducible with 1 on x86_64 but 2 on i686.
|
||||||
foreach align_mult {1 2} { with_test_prefix " shift-by-$align_mult:" {
|
foreach align_mult {1 2} { with_test_prefix "shift-by-$align_mult" {
|
||||||
|
|
||||||
# FIXME: We believe there is enough room under FIRST_OFFSET.
|
# FIXME: We believe there is enough room under FIRST_OFFSET.
|
||||||
set shifted_offset [format 0x%x [expr "$first_offset - $align_mult * $align_max"]]
|
set shifted_offset [format 0x%x [expr "$first_offset - $align_mult * $align_max"]]
|
||||||
|
@ -185,12 +185,12 @@ proc reach_1 {func command displacement} {
|
|||||||
# displacement of 0 bytes to be present, "NONZERO" for displacement of non-0
|
# displacement of 0 bytes to be present, "NONZERO" for displacement of non-0
|
||||||
# bytes to be present and "PRESENT" if both "ZERO" and "NONZERO" are valid.
|
# bytes to be present and "PRESENT" if both "ZERO" and "NONZERO" are valid.
|
||||||
proc reach {func command displacement} {
|
proc reach {func command displacement} {
|
||||||
with_test_prefix " reach-$func:" {
|
with_test_prefix "reach-$func" {
|
||||||
reach_1 $func $command $displacement
|
reach_1 $func $command $displacement
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test_core {file displacement} { with_test_prefix " core:" {
|
proc test_core {file displacement} { with_test_prefix "core" {
|
||||||
global srcdir subdir gdb_prompt expect_out
|
global srcdir subdir gdb_prompt expect_out
|
||||||
|
|
||||||
set corefile [core_find $file {} "segv"]
|
set corefile [core_find $file {} "segv"]
|
||||||
@ -239,7 +239,7 @@ proc test_core {file displacement} { with_test_prefix " core:" {
|
|||||||
gdb_test "bt" "#\[0-9\]+ +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#\[0-9\]+ +\[^\r\n\]*\\mmain\\M.*" "core main bt"
|
gdb_test "bt" "#\[0-9\]+ +\[^\r\n\]*\\mlibfunc\\M\[^\r\n\]*\r\n#\[0-9\]+ +\[^\r\n\]*\\mmain\\M.*" "core main bt"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc test_attach_gdb {file pid displacement prefix} { with_test_prefix " $prefix:" {
|
proc test_attach_gdb {file pid displacement prefix} { with_test_prefix "$prefix" {
|
||||||
global gdb_prompt expect_out
|
global gdb_prompt expect_out
|
||||||
|
|
||||||
gdb_exit
|
gdb_exit
|
||||||
|
@ -46,7 +46,7 @@ if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] !
|
|||||||
# names.
|
# names.
|
||||||
# KIND is passed to the "catch" command.
|
# KIND is passed to the "catch" command.
|
||||||
# MATCH is a boolean saying whether we expect the catchpoint to be hit.
|
# MATCH is a boolean saying whether we expect the catchpoint to be hit.
|
||||||
proc one_catch_load_test {scenario kind match sostop} { with_test_prefix "${scenario}:" {
|
proc one_catch_load_test {scenario kind match sostop} { with_test_prefix "${scenario}" {
|
||||||
global verbose testfile testfile2 binfile2_dlopen
|
global verbose testfile testfile2 binfile2_dlopen
|
||||||
global srcfile
|
global srcfile
|
||||||
global decimal gdb_prompt
|
global decimal gdb_prompt
|
||||||
|
@ -30,7 +30,7 @@ if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc disp_step_cross_syscall { syscall } { with_test_prefix " $syscall:" {
|
proc disp_step_cross_syscall { syscall } { with_test_prefix "$syscall" {
|
||||||
global syscall_insn
|
global syscall_insn
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {}] != "" } {
|
|||||||
|
|
||||||
set solib_binfile_target [gdb_download ${solib_binfile}]
|
set solib_binfile_target [gdb_download ${solib_binfile}]
|
||||||
|
|
||||||
proc one_jit_test {count match_str} { with_test_prefix " one_jit_test-$count:" {
|
proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" {
|
||||||
global verbose testfile srcfile2 binfile2 binfile2_dlopen solib_binfile_target solib_binfile_test_msg
|
global verbose testfile srcfile2 binfile2 binfile2_dlopen solib_binfile_target solib_binfile_test_msg
|
||||||
|
|
||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
|
@ -51,7 +51,7 @@ if { [gdb_compile_shlib ${solib_srcfile} ${solib_binfile} {-fPIC}] != "" } {
|
|||||||
|
|
||||||
set solib_binfile_target [gdb_download ${solib_binfile}]
|
set solib_binfile_target [gdb_download ${solib_binfile}]
|
||||||
|
|
||||||
proc one_jit_test {count match_str} { with_test_prefix " one_jit_test-$count:" {
|
proc one_jit_test {count match_str} { with_test_prefix "one_jit_test-$count" {
|
||||||
global verbose testfile solib_binfile_target solib_binfile_test_msg
|
global verbose testfile solib_binfile_target solib_binfile_test_msg
|
||||||
|
|
||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
|
@ -650,7 +650,7 @@ test_next_with_recursion
|
|||||||
|
|
||||||
#********
|
#********
|
||||||
|
|
||||||
proc test_different_dir {type test_different_dir xfail} { with_test_prefix " $type:" {
|
proc test_different_dir {type test_different_dir xfail} { with_test_prefix "$type" {
|
||||||
global srcdir subdir objdir binfile srcfile timeout gdb_prompt
|
global srcdir subdir objdir binfile srcfile timeout gdb_prompt
|
||||||
global bp_location6 decimal hex
|
global bp_location6 decimal hex
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ if [get_compiler_info ${binfile}] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# SEP must be last for the possible `unsupported' error path.
|
# SEP must be last for the possible `unsupported' error path.
|
||||||
foreach libsepdebug {NO IN SEP} { with_test_prefix " $libsepdebug:" {
|
foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
|
||||||
|
|
||||||
set sep_lib_flags $lib_flags
|
set sep_lib_flags $lib_flags
|
||||||
if {$libsepdebug != "NO"} {
|
if {$libsepdebug != "NO"} {
|
||||||
|
@ -52,7 +52,7 @@ set srcfile ${srcdir}/${subdir}/${testfile}.c
|
|||||||
# false PASS.
|
# false PASS.
|
||||||
# Prelink first lib1 at 0x40000000 and lib2 at 0x41000000.
|
# Prelink first lib1 at 0x40000000 and lib2 at 0x41000000.
|
||||||
# During second pass try lib1 at 0x50000000 and lib2 at 0x51000000.
|
# During second pass try lib1 at 0x50000000 and lib2 at 0x51000000.
|
||||||
foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix " $prelink_lib1:" {
|
foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1" {
|
||||||
set prelink_lib2 [format "0x%x" [expr $prelink_lib1 + 0x01000000]]
|
set prelink_lib2 [format "0x%x" [expr $prelink_lib1 + 0x01000000]]
|
||||||
|
|
||||||
# Library file.
|
# Library file.
|
||||||
|
@ -49,7 +49,7 @@ proc test_watchpoint { hw } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if { ![target_info exists gdb,no_hardware_watchpoints] } {
|
if { ![target_info exists gdb,no_hardware_watchpoints] } {
|
||||||
with_test_prefix " hw:" { test_watchpoint 1 }
|
with_test_prefix "hw" { test_watchpoint 1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
with_test_prefix " sw:" { test_watchpoint 0 }
|
with_test_prefix "sw" { test_watchpoint 0 }
|
||||||
|
@ -894,7 +894,7 @@ proc do_tests {} {
|
|||||||
|
|
||||||
do_tests
|
do_tests
|
||||||
if ![target_info exists gdb,no_hardware_watchpoints] {
|
if ![target_info exists gdb,no_hardware_watchpoints] {
|
||||||
with_test_prefix " no-hw:" {
|
with_test_prefix "no-hw" {
|
||||||
set no_hw 1
|
set no_hw 1
|
||||||
do_tests
|
do_tests
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ if { [prepare_for_testing dw2-noloc.exp "dw2-noloc" {dw2-noloc-main.c dw2-noloc.
|
|||||||
# unresolvable: .symtab entry does not exist for this symbol name.
|
# unresolvable: .symtab entry does not exist for this symbol name.
|
||||||
# DW_AT_declaration is not present in any of these DIEs.
|
# DW_AT_declaration is not present in any of these DIEs.
|
||||||
|
|
||||||
proc file_symbols {type} { with_test_prefix " $type:" {
|
proc file_symbols {type} { with_test_prefix "$type" {
|
||||||
|
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ proc test_watchpoint_triggering {type} {
|
|||||||
clear_xfail *-*-*
|
clear_xfail *-*-*
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test_watchpoint_all {type} { with_test_prefix " $type:" {
|
proc test_watchpoint_all {type} { with_test_prefix "$type" {
|
||||||
upvar srcdir srcdir
|
upvar srcdir srcdir
|
||||||
upvar subdir subdir
|
upvar subdir subdir
|
||||||
upvar binfile binfile
|
upvar binfile binfile
|
||||||
|
@ -146,7 +146,7 @@ proc test_watchpoint_triggering {type} {
|
|||||||
clear_xfail *-*-*
|
clear_xfail *-*-*
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test_watchpoint_all {type} { with_test_prefix " $type:" {
|
proc test_watchpoint_all {type} { with_test_prefix "$type" {
|
||||||
upvar srcdir srcdir
|
upvar srcdir srcdir
|
||||||
upvar subdir subdir
|
upvar subdir subdir
|
||||||
upvar binfile binfile
|
upvar binfile binfile
|
||||||
|
@ -30,7 +30,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" {
|
proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" {
|
||||||
global executable
|
global executable
|
||||||
|
|
||||||
clean_restart ${executable}
|
clean_restart ${executable}
|
||||||
|
@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" {
|
proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" {
|
||||||
global executable
|
global executable
|
||||||
|
|
||||||
clean_restart ${executable}
|
clean_restart ${executable}
|
||||||
|
@ -33,7 +33,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" {
|
proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" {
|
||||||
global executable
|
global executable
|
||||||
|
|
||||||
clean_restart ${executable}
|
clean_restart ${executable}
|
||||||
|
@ -32,7 +32,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
proc do_test { lock_sched } { with_test_prefix " lock-sched$lock_sched:" {
|
proc do_test { lock_sched } { with_test_prefix "lock-sched$lock_sched" {
|
||||||
global executable
|
global executable
|
||||||
|
|
||||||
clean_restart ${executable}
|
clean_restart ${executable}
|
||||||
|
@ -22,7 +22,7 @@ if [is_remote target] {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
proc test {type symbol} { with_test_prefix " $type:" {
|
proc test {type symbol} { with_test_prefix "$type" {
|
||||||
global testfile objdir subdir srcdir gdb_prompt pf_prefix
|
global testfile objdir subdir srcdir gdb_prompt pf_prefix
|
||||||
|
|
||||||
set srcfile_type ${srcdir}/${subdir}/${testfile}-${type}.c
|
set srcfile_type ${srcdir}/${subdir}/${testfile}-${type}.c
|
||||||
|
@ -38,7 +38,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable
|
|||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach reorder {0 1} { with_test_prefix " reorder$reorder:" {
|
foreach reorder {0 1} { with_test_prefix "reorder$reorder" {
|
||||||
|
|
||||||
clean_restart $testfile
|
clean_restart $testfile
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ if [is_amd64_regs_target] {
|
|||||||
|
|
||||||
# Set tracepoint during tracing experiment.
|
# Set tracepoint during tracing experiment.
|
||||||
|
|
||||||
proc tracepoint_change_loc_1 { trace_type } { with_test_prefix " 1 $trace_type:" {
|
proc tracepoint_change_loc_1 { trace_type } { with_test_prefix "1 $trace_type" {
|
||||||
global testfile
|
global testfile
|
||||||
global srcfile
|
global srcfile
|
||||||
global pcreg
|
global pcreg
|
||||||
@ -141,7 +141,7 @@ proc tracepoint_change_loc_1 { trace_type } { with_test_prefix " 1 $trace_type:"
|
|||||||
|
|
||||||
# Set pending tracepoint.
|
# Set pending tracepoint.
|
||||||
|
|
||||||
proc tracepoint_change_loc_2 { trace_type } { with_test_prefix " 2 $trace_type:" {
|
proc tracepoint_change_loc_2 { trace_type } { with_test_prefix "2 $trace_type" {
|
||||||
global srcdir
|
global srcdir
|
||||||
global srcfile
|
global srcfile
|
||||||
global subdir
|
global subdir
|
||||||
|
@ -60,7 +60,7 @@ if ![gdb_target_supports_trace] {
|
|||||||
|
|
||||||
# Verify pending tracepoint is resolved to running to main.
|
# Verify pending tracepoint is resolved to running to main.
|
||||||
|
|
||||||
proc pending_tracepoint_resolved { trace_type } { with_test_prefix " $trace_type resolved:" {
|
proc pending_tracepoint_resolved { trace_type } { with_test_prefix "$trace_type resolved" {
|
||||||
global srcdir
|
global srcdir
|
||||||
global subdir
|
global subdir
|
||||||
global binfile
|
global binfile
|
||||||
@ -101,7 +101,7 @@ proc pending_tracepoint_resolved { trace_type } { with_test_prefix " $trace_type
|
|||||||
|
|
||||||
# Verify pending tracepoint is resolved and works as expected.
|
# Verify pending tracepoint is resolved and works as expected.
|
||||||
|
|
||||||
proc pending_tracepoint_works { trace_type } { with_test_prefix " $trace_type works:" {
|
proc pending_tracepoint_works { trace_type } { with_test_prefix "$trace_type works" {
|
||||||
global executable
|
global executable
|
||||||
global srcfile
|
global srcfile
|
||||||
global lib_sl1
|
global lib_sl1
|
||||||
@ -155,7 +155,7 @@ proc pending_tracepoint_works { trace_type } { with_test_prefix " $trace_type wo
|
|||||||
# Verify pending tracepoint is resolved during trace.
|
# Verify pending tracepoint is resolved during trace.
|
||||||
|
|
||||||
proc pending_tracepoint_resolved_during_trace { trace_type } \
|
proc pending_tracepoint_resolved_during_trace { trace_type } \
|
||||||
{ with_test_prefix " $trace_type resolved_in_trace:" \
|
{ with_test_prefix "$trace_type resolved_in_trace" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global srcfile
|
global srcfile
|
||||||
@ -214,7 +214,7 @@ proc pending_tracepoint_resolved_during_trace { trace_type } \
|
|||||||
# Verify pending tracepoint is resolved and installed during trace.
|
# Verify pending tracepoint is resolved and installed during trace.
|
||||||
|
|
||||||
proc pending_tracepoint_installed_during_trace { trace_type } \
|
proc pending_tracepoint_installed_during_trace { trace_type } \
|
||||||
{ with_test_prefix " $trace_type installed_in_trace:" \
|
{ with_test_prefix "$trace_type installed_in_trace" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global srcfile
|
global srcfile
|
||||||
@ -279,7 +279,7 @@ proc pending_tracepoint_installed_during_trace { trace_type } \
|
|||||||
# Verify pending tracepoint will no longer work if we disconnect during tracing.
|
# Verify pending tracepoint will no longer work if we disconnect during tracing.
|
||||||
|
|
||||||
proc pending_tracepoint_disconnect_during_trace { trace_type } \
|
proc pending_tracepoint_disconnect_during_trace { trace_type } \
|
||||||
{ with_test_prefix " $trace_type disconn:" \
|
{ with_test_prefix "$trace_type disconn" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global srcfile
|
global srcfile
|
||||||
@ -327,7 +327,7 @@ proc pending_tracepoint_disconnect_during_trace { trace_type } \
|
|||||||
# Verify disconnect after pending tracepoint has been resolved.
|
# Verify disconnect after pending tracepoint has been resolved.
|
||||||
|
|
||||||
proc pending_tracepoint_disconnect_after_resolved { trace_type } \
|
proc pending_tracepoint_disconnect_after_resolved { trace_type } \
|
||||||
{ with_test_prefix " $trace_type disconn_resolved:" \
|
{ with_test_prefix "$trace_type disconn_resolved" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global srcfile
|
global srcfile
|
||||||
@ -379,7 +379,7 @@ proc pending_tracepoint_disconnect_after_resolved { trace_type } \
|
|||||||
# Verify action works properly in resolved tracepoint.
|
# Verify action works properly in resolved tracepoint.
|
||||||
|
|
||||||
proc pending_tracepoint_with_action_resolved { trace_type } \
|
proc pending_tracepoint_with_action_resolved { trace_type } \
|
||||||
{ with_test_prefix " $trace_type action_resolved:" \
|
{ with_test_prefix "$trace_type action_resolved" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global srcfile
|
global srcfile
|
||||||
|
@ -39,7 +39,7 @@ if ![gdb_target_supports_trace] {
|
|||||||
|
|
||||||
# Verify that the sequence of commands "tstart tstop tstart" works well.
|
# Verify that the sequence of commands "tstart tstop tstart" works well.
|
||||||
|
|
||||||
proc test_tstart_tstop_tstart { } { with_test_prefix " tstart_tstop_tstart:" {
|
proc test_tstart_tstop_tstart { } { with_test_prefix "tstart_tstop_tstart" {
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ proc test_tstart_tstop_tstart { } { with_test_prefix " tstart_tstop_tstart:" {
|
|||||||
|
|
||||||
# Verify the sequence of commands "tstart tstart" works well.
|
# Verify the sequence of commands "tstart tstart" works well.
|
||||||
|
|
||||||
proc test_tstart_tstart { } { with_test_prefix " tstart_tstart:" {
|
proc test_tstart_tstart { } { with_test_prefix "tstart_tstart" {
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ proc test_tstart_tstart { } { with_test_prefix " tstart_tstart:" {
|
|||||||
|
|
||||||
# Verify that trace stops clearly when trace buffer is full.
|
# Verify that trace stops clearly when trace buffer is full.
|
||||||
|
|
||||||
proc test_buffer_full_tstart { } { with_test_prefix " buffer_full_tstart:" {
|
proc test_buffer_full_tstart { } { with_test_prefix "buffer_full_tstart" {
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ if { ![gdb_target_supports_trace] } then {
|
|||||||
|
|
||||||
gdb_load_shlibs $libipa
|
gdb_load_shlibs $libipa
|
||||||
|
|
||||||
proc strace_info_marker { } { with_test_prefix " info_marker" {
|
proc strace_info_marker { } { with_test_prefix "info_marker" {
|
||||||
global executable
|
global executable
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ proc strace_info_marker { } { with_test_prefix " info_marker" {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc strace_probe_marker { } { with_test_prefix " probe_marker" {
|
proc strace_probe_marker { } { with_test_prefix "probe_marker" {
|
||||||
global executable
|
global executable
|
||||||
global expect_out
|
global expect_out
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
@ -105,7 +105,7 @@ proc strace_probe_marker { } { with_test_prefix " probe_marker" {
|
|||||||
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
|
gdb_test "tfind" "Target failed to find requested trace frame\\..*"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc strace_trace_on_same_addr { type } { with_test_prefix " trace_same_addr $type" {
|
proc strace_trace_on_same_addr { type } { with_test_prefix "trace_same_addr $type" {
|
||||||
global executable
|
global executable
|
||||||
global expect_out
|
global expect_out
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
@ -195,7 +195,7 @@ proc strace_trace_on_same_addr { type } { with_test_prefix " trace_same_addr $ty
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc strace_trace_on_diff_addr { } { with_test_prefix " trace_diff_addr" {
|
proc strace_trace_on_diff_addr { } { with_test_prefix "trace_diff_addr" {
|
||||||
|
|
||||||
global executable
|
global executable
|
||||||
global expect_out
|
global expect_out
|
||||||
|
@ -56,7 +56,7 @@ if [is_amd64_regs_target] {
|
|||||||
# Set breakpoint and tracepoint at the same address.
|
# Set breakpoint and tracepoint at the same address.
|
||||||
|
|
||||||
proc break_trace_same_addr_1 { trace_type option } \
|
proc break_trace_same_addr_1 { trace_type option } \
|
||||||
{ with_test_prefix " 1 $trace_type $option:" \
|
{ with_test_prefix "1 $trace_type $option" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
@ -89,7 +89,7 @@ proc break_trace_same_addr_1 { trace_type option } \
|
|||||||
# Set multiple tracepoints at the same address.
|
# Set multiple tracepoints at the same address.
|
||||||
|
|
||||||
proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
|
proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
|
||||||
{ with_test_prefix " 2 $trace_type1 $trace_type2 $option:" \
|
{ with_test_prefix "2 $trace_type1 $trace_type2 $option" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
@ -127,7 +127,7 @@ proc break_trace_same_addr_2 { trace_type1 trace_type2 option } \
|
|||||||
# that tracepoint still works.
|
# that tracepoint still works.
|
||||||
|
|
||||||
proc break_trace_same_addr_3 { trace_type option } \
|
proc break_trace_same_addr_3 { trace_type option } \
|
||||||
{ with_test_prefix " 3 $trace_type $option:" \
|
{ with_test_prefix "3 $trace_type $option" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
@ -162,7 +162,7 @@ proc break_trace_same_addr_3 { trace_type option } \
|
|||||||
# that breakpoint still works.
|
# that breakpoint still works.
|
||||||
|
|
||||||
proc break_trace_same_addr_4 { trace_type option } \
|
proc break_trace_same_addr_4 { trace_type option } \
|
||||||
{ with_test_prefix " 4 $trace_type $option:" \
|
{ with_test_prefix "4 $trace_type $option" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
@ -201,7 +201,7 @@ proc break_trace_same_addr_4 { trace_type option } \
|
|||||||
# of two locations. Verify these tracepoints work as expected.
|
# of two locations. Verify these tracepoints work as expected.
|
||||||
|
|
||||||
proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
|
proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
|
||||||
{ with_test_prefix " 5 $trace1 $trace2 ${trace3}@${trace3_at_first_loc}:" \
|
{ with_test_prefix "5 $trace1 $trace2 ${trace3}@${trace3_at_first_loc}" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
@ -273,7 +273,7 @@ proc break_trace_same_addr_5 { trace1 trace2 trace3 trace3_at_first_loc } \
|
|||||||
# tracepoints work as expect.
|
# tracepoints work as expect.
|
||||||
|
|
||||||
proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
|
proc break_trace_same_addr_6 { trace1 enable1 trace2 enable2 } \
|
||||||
{ with_test_prefix " 6 $trace1 $enable1 $trace2 $enable2:" \
|
{ with_test_prefix "6 $trace1 $enable1 $trace2 $enable2" \
|
||||||
{
|
{
|
||||||
global executable
|
global executable
|
||||||
global hex
|
global hex
|
||||||
|
@ -136,7 +136,7 @@ proc test_maybe_regvar_display { var } {
|
|||||||
# Test procs
|
# Test procs
|
||||||
#
|
#
|
||||||
|
|
||||||
proc gdb_collect_args_test {} { with_test_prefix " unavailable arguments:" {
|
proc gdb_collect_args_test {} { with_test_prefix "unavailable arguments" {
|
||||||
global cr
|
global cr
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ proc gdb_collect_args_test {} { with_test_prefix " unavailable arguments:" {
|
|||||||
"cease trace debugging"
|
"cease trace debugging"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc gdb_collect_locals_test { func msg } { with_test_prefix " unavailable locals: $msg:" {
|
proc gdb_collect_locals_test { func msg } { with_test_prefix "unavailable locals: $msg" {
|
||||||
global cr
|
global cr
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ proc gdb_collect_locals_test { func msg } { with_test_prefix " unavailable local
|
|||||||
"cease trace debugging"
|
"cease trace debugging"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc gdb_unavailable_registers_test { } { with_test_prefix " unavailable registers:" {
|
proc gdb_unavailable_registers_test { } { with_test_prefix "unavailable registers" {
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
global spreg
|
global spreg
|
||||||
global pcreg
|
global pcreg
|
||||||
@ -305,7 +305,7 @@ proc gdb_unavailable_registers_test { } { with_test_prefix " unavailable registe
|
|||||||
gdb_test "tfind none" "#0 end .*" "cease trace debugging"
|
gdb_test "tfind none" "#0 end .*" "cease trace debugging"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
proc gdb_collect_globals_test { } { with_test_prefix " collect globals:" {
|
proc gdb_collect_globals_test { } { with_test_prefix "collect globals" {
|
||||||
global ws
|
global ws
|
||||||
global cr
|
global cr
|
||||||
global gdb_prompt
|
global gdb_prompt
|
||||||
|
@ -1507,21 +1507,21 @@ proc skip_shlib_tests {} {
|
|||||||
# gdb_test ... ... "test foo"
|
# gdb_test ... ... "test foo"
|
||||||
# gdb_test ... ... "test bar"
|
# gdb_test ... ... "test bar"
|
||||||
#
|
#
|
||||||
# with_test_prefix " subvariation a:" {
|
# with_test_prefix "subvariation a" {
|
||||||
# gdb_test ... ... "test x"
|
# gdb_test ... ... "test x"
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# with_test_prefix " subvariation b:" {
|
# with_test_prefix "subvariation b" {
|
||||||
# gdb_test ... ... "test x"
|
# gdb_test ... ... "test x"
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# with_test_prefix " variation1:" {
|
# with_test_prefix "variation1" {
|
||||||
# ...do setup for variation 1...
|
# ...do setup for variation 1...
|
||||||
# do_tests
|
# do_tests
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# with_test_prefix " variation2:" {
|
# with_test_prefix "variation2" {
|
||||||
# ...do setup for variation 2...
|
# ...do setup for variation 2...
|
||||||
# do_tests
|
# do_tests
|
||||||
# }
|
# }
|
||||||
@ -1543,19 +1543,20 @@ proc skip_shlib_tests {} {
|
|||||||
#
|
#
|
||||||
# global pf_prefix
|
# global pf_prefix
|
||||||
# set saved_pf_prefix
|
# set saved_pf_prefix
|
||||||
# append pf_prefix "${foo} bar"
|
# append pf_prefix "${foo}: bar"
|
||||||
# ... actual tests ...
|
# ... actual tests ...
|
||||||
# set pf_prefix $saved_pf_prefix
|
# set pf_prefix $saved_pf_prefix
|
||||||
#
|
#
|
||||||
|
|
||||||
# Run BODY in the context of the caller, with the current test prefix
|
# Run BODY in the context of the caller, with the current test prefix
|
||||||
# (pf_prefix) appended with PREFIX. Returns the result of BODY.
|
# (pf_prefix) appended with one space, then PREFIX, and then a colon.
|
||||||
|
# Returns the result of BODY.
|
||||||
#
|
#
|
||||||
proc with_test_prefix { prefix body } {
|
proc with_test_prefix { prefix body } {
|
||||||
global pf_prefix
|
global pf_prefix
|
||||||
|
|
||||||
set saved $pf_prefix
|
set saved $pf_prefix
|
||||||
append pf_prefix $prefix
|
append pf_prefix " " $prefix ":"
|
||||||
set code [catch {uplevel 1 $body} result]
|
set code [catch {uplevel 1 $body} result]
|
||||||
set pf_prefix $saved
|
set pf_prefix $saved
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user