]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/gdb.dwarf2/clang-debug-names.c
[gdb/testsuite] Add gdb.dwarf2/clang-debug-names.c
authorTom de Vries <tdevries@suse.de>
Fri, 8 May 2020 14:24:09 +0000 (16:24 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 8 May 2020 14:24:09 +0000 (16:24 +0200)
commit283cb58c4ddb8a3dc7a014f5c6a41789fd7de939
tree009a4d7ea4eccdd7e825c006df2eecd8b2c6ba6d
parentcee2106c5b6a19e89843e4bb32dc23dac87c42bf
[gdb/testsuite] Add gdb.dwarf2/clang-debug-names.c

Add test-case with .debug_names section using DW_FORM_ref4.

There's currently no support for .debug_names in the dwarf assembler, so we
use plain _emit rather than something more structured.

Consequently, we cannot use regular declare_labels-generated labels to refer
from .debug_names to .debug_info.  Instead, we use labels with a
predefined name, which we generate using _compute_label, and then define using
define_label.

This is the test-case for PR25952, so kfail the corresponding test.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

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

* gdb.dwarf2/clang-debug-names.c: New test.
* gdb.dwarf2/clang-debug-names.exp: New file.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/clang-debug-names.c [new file with mode: 0644]
gdb/testsuite/gdb.dwarf2/clang-debug-names.exp [new file with mode: 0644]