[gdb/testsuite] Allow some tests in gdb.base/restore.exp to be unsupported
authorTom de Vries <tdevries@suse.de>
Sun, 22 Sep 2019 04:14:29 +0000 (06:14 +0200)
committerTom de Vries <tdevries@suse.de>
Sun, 22 Sep 2019 04:14:29 +0000 (06:14 +0200)
commit77d036789aab73c90dc7f4c798f34748b03de726
tree25d96888ca7949d5cc983878d4bf31a7cb167784
parent7ab78ccbbb0d0918c293ade07bea59d789ea7d63
[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.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/restore.exp
This page took 0.035026 seconds and 4 git commands to generate.