mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
[gdb/testsuite] Allow some tests in gdb.base/restore.exp to be unsupported
We currently run into: ... 248 n = callee1 (n + l5); (gdb) PASS: gdb.base/restore.exp: caller5 calls callee1; return callee now print l1 $51 = <optimized out> (gdb) FAIL: gdb.base/restore.exp: caller5 calls callee1; return restored l1 \ to 32492 ... The problem is that we try to access the value of l1 in function caller5, but variable l1 has no DW_AT_location attribute. Since l1 is declared using the register keyword, it's valid for gcc to emit no DW_AT_location at -O0. Change the FAIL into an UNSUPPORTED. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-09-22 Tom de Vries <tdevries@suse.de> * gdb.base/restore.exp: Allow register variables to be optimized out at -O0.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2019-09-22 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* gdb.base/restore.exp: Allow register variables to be optimized out at
|
||||||
|
-O0.
|
||||||
|
|
||||||
2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
|
2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
|
||||||
|
|
||||||
* gdb.arch/spu-info.exp: Remove file.
|
* gdb.arch/spu-info.exp: Remove file.
|
||||||
|
@ -73,8 +73,17 @@ proc restore_tests { } {
|
|||||||
# they should be.
|
# they should be.
|
||||||
for {set var 1} {$var <= $c} {incr var} {
|
for {set var 1} {$var <= $c} {incr var} {
|
||||||
set expected [expr 0x7eeb + $var]
|
set expected [expr 0x7eeb + $var]
|
||||||
gdb_test "print l$var" " = $expected" \
|
set test "caller$c calls callee$e; return restored l$var to $expected"
|
||||||
"caller$c calls callee$e; return restored l$var to $expected"
|
set pass_pattern " = $expected"
|
||||||
|
set unsupported_pattern " = <optimized out>"
|
||||||
|
gdb_test_multiple "print l$var" $test {
|
||||||
|
-re "\[\r\n\]*(?:$pass_pattern)\[\r\n\]+$gdb_prompt $" {
|
||||||
|
pass $test
|
||||||
|
}
|
||||||
|
-re "\[\r\n\]*(?:$unsupported_pattern)\[\r\n\]+$gdb_prompt $" {
|
||||||
|
unsupported $test
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user