diff options
author | Tom de Vries <tdevries@suse.de> | 2020-05-02 09:50:50 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-05-02 09:50:50 +0200 |
commit | 8caf140db24116e8874099291a7a48644c368ab6 (patch) | |
tree | 6ee97cd6a496bc981cdc5ba587cef61ea96509f3 /gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.S | |
parent | a4be18526ba920f8709af54260f199519f9afaf2 (diff) | |
download | binutils-gdb-8caf140db24116e8874099291a7a48644c368ab6.tar.gz |
[gdb/testsuite] Update psym-external-decl.exp for gcc-10/clang
When running test-case gdb.base/psym-external-decl.exp with gcc-10, we have:
...
(gdb) print aaa^M
'aaa' has unknown type; cast it to its declared type^M
(gdb) FAIL: gdb.base/psym-external-decl.exp: print aaa
...
With an an earlier version, gcc still emits the debug info for the
declaration of aaa:
...
<0><d2>: Abbrev Number: 1 (DW_TAG_compile_unit)
<d8> DW_AT_name : psym-external-decl.c
<1><f4>: Abbrev Number: 2 (DW_TAG_variable)
<f5> DW_AT_name : aaa
<ff> DW_AT_external : 1
<ff> DW_AT_declaration : 1
...
but with gcc-10 that's no longer the case.
Fix the test-case by adding a use of aaa in psym-external-decl.c.
That still doesn't work for clang, so skip test in that case.
Tested with x86_64-linux, with gcc 7.5.0, gcc 10.0.0 and clang 5.0.2.
Also tested by reverting corresponding fix and ensuring test-case still
fails.
gdb/testsuite/ChangeLog:
2020-05-02 Tom de Vries <tdevries@suse.de>
* gdb.base/psym-external-decl.c (main): Add use of variable aaa.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-anon-mptr.S')
0 files changed, 0 insertions, 0 deletions