mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
gdb: use foreach_with_prefix in gdb.base/break-interp.exp
Use foreach_with_prefix, instead of foreach and with_test_prefix separately. Since allows removing some indentation levels, and formats the test names a bit nicer, in my opinion (or at least, it's more consistent with the rest of the testsuite): - PASS: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieNO: INNER: core: set verbose on + PASS: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: binprelink=NO: binsepdebug=NO: binpie=NO: INNER: set verbose on Note: this patch is better viewed with "git show -w" to ignore whitespace changes. gdb/testsuite/ChangeLog: * gdb.base/break-interp.exp: Use foreach_with_prefix.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2020-03-12 Simon Marchi <simon.marchi@efficios.com>
|
||||
|
||||
* gdb.base/break-interp.exp: Use foreach_with_prefix.
|
||||
|
||||
2020-03-12 Simon Marchi <simon.marchi@efficios.com>
|
||||
|
||||
* gdb.arch/amd64-disp-step-avx.S: Add nops after _start.
|
||||
|
@ -538,8 +538,8 @@ proc test_ld {file ifmain trynosym displacement} {
|
||||
# Create separate binaries for each testcase - to make the possible reported
|
||||
# problem reproducible after the whole test run finishes.
|
||||
|
||||
foreach ldprelink {NO YES} {
|
||||
foreach ldsepdebug {NO IN SEP} {
|
||||
foreach_with_prefix ldprelink {NO YES} {
|
||||
foreach_with_prefix ldsepdebug {NO IN SEP} {
|
||||
# Skip running the ldsepdebug test if we do not have system separate
|
||||
# debug info available.
|
||||
if {$interp_system_debug == "" && $ldsepdebug == "SEP"} {
|
||||
@ -562,7 +562,6 @@ foreach ldprelink {NO YES} {
|
||||
# possibly unprelinked ld.so to test all the combinations for GDB.
|
||||
set interp_saved ${interp}-saved
|
||||
|
||||
with_test_prefix "$ldname" {
|
||||
if {$ldsepdebug == "NO"} {
|
||||
file_copy $interp_system $interp
|
||||
# Never call strip-debug before unprelink:
|
||||
@ -629,12 +628,12 @@ foreach ldprelink {NO YES} {
|
||||
continue
|
||||
}
|
||||
|
||||
foreach binprelink {NO YES} {
|
||||
foreach binsepdebug {NO IN SEP} {
|
||||
foreach_with_prefix binprelink {NO YES} {
|
||||
foreach_with_prefix binsepdebug {NO IN SEP} {
|
||||
# "ATTACH" is like "YES" but it is modified during
|
||||
# run. It cannot be used for problem
|
||||
# reproducibility after the testcase ends.
|
||||
foreach binpie {NO YES ATTACH} {
|
||||
foreach_with_prefix binpie {NO YES ATTACH} {
|
||||
# This combination is not possible, non-PIE (fixed address)
|
||||
# binary cannot be prelinked to any (other) address.
|
||||
if {$binprelink == "YES" && $binpie == "NO"} {
|
||||
@ -644,7 +643,6 @@ foreach ldprelink {NO YES} {
|
||||
set binname "BINprelink${binprelink}debug${binsepdebug}pie${binpie}"
|
||||
set exec $binprefix-$binname
|
||||
|
||||
with_test_prefix "$binname" {
|
||||
set opts "ldflags=-Wl,$binfile_lib,-rpath,[file dirname $binfile_lib]"
|
||||
if {$binsepdebug != "NO"} {
|
||||
lappend opts {debug}
|
||||
@ -717,9 +715,7 @@ foreach ldprelink {NO YES} {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file delete $interp_saved
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user