aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-10-23 14:55:04 +0200
committerTom de Vries <tdevries@suse.de>2020-10-23 14:55:04 +0200
commit9476b583cb3e72e57355f5a6bfcd5ba69e71ea31 (patch)
tree9874c8d4c6330dc9b78881baa90383704622d6a0 /gdb/testsuite/gdb.dwarf2/nonvar-access.exp
parent8747316ecf9ecf5aaf885b973b0c056fa4c3a2ee (diff)
downloadgdb-9476b583cb3e72e57355f5a6bfcd5ba69e71ea31.zip
gdb-9476b583cb3e72e57355f5a6bfcd5ba69e71ea31.tar.gz
gdb-9476b583cb3e72e57355f5a6bfcd5ba69e71ea31.tar.bz2
[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.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/nonvar-access.exp')
-rw-r--r--gdb/testsuite/gdb.dwarf2/nonvar-access.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
index 71b726f..20c2daf 100644
--- a/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
+++ b/gdb/testsuite/gdb.dwarf2/nonvar-access.exp
@@ -27,9 +27,11 @@ standard_testfile main.c -dw.S
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
compile_unit {
- {DW_AT_name main.c}
+ {DW_AT_name $srcfile}
} {
declare_labels int_type_label char_type_label \
struct_s_label struct_t_label array_a9_label \