[gdb/testsuite] Use $srcfile in DW_AT_name for CU
In dwarf assembly test-case ada-linkage-name.exp, we have:
...
standard_testfile .c -debug.S
...
cu {} {
DW_TAG_compile_unit {
{DW_AT_name ada-linkage-name.c}
...
Use $srcfile instead of ada-linkage-name.c.
In dwarf assembly test-case atomic-type.exp, we have:
...
standard_testfile .c -dw.S
...
cu {} {
DW_TAG_compile_unit {
{DW_AT_name atomic-type-dw.c}
...
The dwarf generated into atomic-type-dw.S is meant to represent the code in
atomic-type.c, not atomic-type-dw.c, so use $srcfile instead of
atomic-type-dw.c.
Fix these and similar.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-10-23 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/ada-linkage-name.exp: Use $srcfile for DW_AT_name of CU.
* gdb.dwarf2/atomic-type.exp: Same.
* gdb.dwarf2/bad-regnum.exp: Same.
* gdb.dwarf2/cpp-linkage-name.exp: Same.
* gdb.dwarf2/dw2-align.exp: Same.
* gdb.dwarf2/dw2-bad-elf.exp: Same.
* gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Same.
* gdb.dwarf2/dw2-bad-unresolved.exp: Same.
* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Same.
* gdb.dwarf2/dw2-opt-structptr.exp: Same.
* gdb.dwarf2/dw2-unusual-field-names.exp: Same.
* gdb.dwarf2/enum-type.exp: Same.
* gdb.dwarf2/frame-inlined-in-outer-frame.exp: Same.
* gdb.dwarf2/info-locals-optimized-out.exp: Same.
* gdb.dwarf2/main-subprogram.exp: Same.
* gdb.dwarf2/missing-type-name.exp: Same.
* gdb.dwarf2/nonvar-access.exp: Same.
* gdb.dwarf2/typedef-void-finish.exp: Same.
* gdb.dwarf2/var-access.exp: Same.
* gdb.dwarf2/void-type.exp: Same.
21 files changed: