[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.