mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
testsuite, gdb.btrace: fix 32-bit PIE false positives
For 32-bit position independent executables, GCC generates an extra call to __x86.get_pc_thunk.<reg> which appears in the function call history. It is correct to appear there but this confuses the tests, which check for an expected sequence of functions. Build with nopie to avoid this complication. gdb/testsuite/ChangeLog: 2020-12-04 Markus Metzger <markus.t.metzger@intel.com> * gdb.btrace/exception.exp: Build with nopie. * gdb.btrace/function_call_history.exp: Likewise. * gdb.btrace/unknown_functions.exp: Likewise.
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2020-12-21 Markus Metzger <markus.t.metzger@intel.com>
|
||||
|
||||
* gdb.btrace/exception.exp: Build with nopie.
|
||||
* gdb.btrace/function_call_history.exp: Likewise.
|
||||
* gdb.btrace/unknown_functions.exp: Likewise.
|
||||
|
||||
2020-12-21 Markus Metzger <markus.t.metzger@intel.com>
|
||||
|
||||
* gdb.btrace/multi-inferior.exp: Skip if use_gdb_stub.
|
||||
|
@ -22,8 +22,11 @@ if { [skip_btrace_tests] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# We expect a specific function call history. This gets messed up with
|
||||
# PIE on 32-bit.
|
||||
standard_testfile exception.cc
|
||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}] {
|
||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
{nopie c++ debug}] {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,10 @@ if { [skip_btrace_tests] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
# We expect a specific function call history. This gets messed up with
|
||||
# PIE on 32-bit.
|
||||
standard_testfile
|
||||
if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
|
||||
if [prepare_for_testing "failed to prepare" $testfile {} {nopie debug}] {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -24,9 +24,12 @@ if { [skip_btrace_tests] } {
|
||||
|
||||
standard_testfile
|
||||
|
||||
# discard local symbols
|
||||
set ldflags "additional_flags=-Wl,-x"
|
||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile $ldflags] {
|
||||
# We expect a specific function call history. This gets messed up with
|
||||
# PIE on 32-bit.
|
||||
#
|
||||
# Also discard local symbols.
|
||||
if [prepare_for_testing "failed to prepare" $testfile $srcfile \
|
||||
{additional_flags=-Wl,-x nopie}] {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user