[gdb/testsuite] Fix imported-unit.exp FAIL without psymtabs
authorTom de Vries <tdevries@suse.de>
Wed, 8 Apr 2020 10:05:34 +0000 (12:05 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 8 Apr 2020 10:05:34 +0000 (12:05 +0200)
commit14ca8ecfcb8628485f734af4b548933124990436
tree490d7456b993efa466cef010fc1aeadaeb621856
parente21d048f8ad95002e61aec25160fa6fabfab21a4
[gdb/testsuite] Fix imported-unit.exp FAIL without psymtabs

The test-case gdb.dwarf2/imported-unit.exp contains a test testing partial
symbols, so when we run the test-case using either target board readnow,
cc-with-gdb-index or cc-with-debug-names, we run into:
...
FAIL: gdb.dwarf2/imported-unit.exp: no static partial symbols in importing unit
...

Fix this by marking the test unsupported if there are no partial symbols.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-04-08  Tom de Vries  <tdevries@suse.de>

* lib/gdb.exp (psymtabs_p): New proc.
* gdb.dwarf2/imported-unit.exp: Mark "no static partial symbols in
importing unit" unsupported if there are no partial symbols.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/imported-unit.exp
gdb/testsuite/lib/gdb.exp