+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.
+
2020-10-22 Simon Marchi <simon.marchi@polymtl.ca>
PR gdb/26693
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_Ada95}
- {DW_AT_name ada-linkage-name.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C11}
- {DW_AT_name atomic-type-dw.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels i_l c_l c_c_l ac_c_l pac_c_l vpac_c_l avpac_c_l
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name bad-regnum-dw.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels integer_label
# Set up the DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C_plus_plus}
- {DW_AT_name ada-linkage-name.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C_plus_plus}
- {DW_AT_name dw2-align.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels itype ptype
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile3]
Dwarf::assemble $asm_file {
- global srcdir subdir srcfile
+ global srcdir subdir srcfile srcfile2
declare_labels ranges_label_1 ranges_label_2 L1 L2
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name dw2-bad-elf.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir ${srcdir}/${subdir}}
{stmt_list $L1 DW_FORM_sec_offset}
{ranges ${ranges_label_1} DW_FORM_sec_offset}
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name dw2-bad-elf-other.c}
+ {DW_AT_name $srcfile2}
{DW_AT_comp_dir ${srcdir}/${subdir}}
{stmt_list $L2 DW_FORM_sec_offset}
{ranges ${ranges_label_2} DW_FORM_sec_offset}
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C_plus_plus}
- {DW_AT_name dw2-bad-mips-linkage-name.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name dw2-bad-unresolved-2.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels b_l
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C_plus_plus}
- {DW_AT_name dw2-namespaceless-anonymous.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels myint
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
# Creating a CU with 4-byte addresses lets this test link on
# both 32- and 64-bit machines.
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C99}
- {DW_AT_name dw2-opt-structptr.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels int_label struct_label pointer_label \
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name dw2-unusual-field-names.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels itype ptype stype
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name enum-type-dw.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels integer_label uinteger_label
set dwarf_asm [standard_output_file dwarf-asm.S]
Dwarf::assemble $dwarf_asm {
+ global srcfile
+
declare_labels foo_subprogram bar_subprogram
declare_labels stmt_list
cu { addr_size 4 } {
DW_TAG_compile_unit {
- {DW_AT_name file1.txt}
+ {DW_AT_name $srcfile}
{DW_AT_stmt_list $stmt_list DW_FORM_sec_offset}
{DW_AT_language @DW_LANG_C99}
{DW_AT_low_pc __cu_low_pc DW_FORM_addr}
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
- global dwarf_regnum regname
+ global dwarf_regnum regname srcfile
set buf_var [gdb_target_symbol buf]
cu {} {
DW_TAG_compile_unit {
- {DW_AT_name info-locals-optimized-out.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels int_type_label
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_language @DW_LANG_C}
- {DW_AT_name main-subprogram.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels type
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_producer "GNU C 8.1"}
{DW_AT_language @DW_LANG_C}
- {DW_AT_name void-type.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels main_type int_type ptr_type
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 \
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_producer "GNU C 8.1"}
{DW_AT_language @DW_LANG_C}
- {DW_AT_name void-type.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels main_type void_typedef
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
- global dwarf_regnum regname
+ global dwarf_regnum regname srcfile
set buf_var [gdb_target_symbol buf]
cu {} {
DW_TAG_compile_unit {
- {DW_AT_name var-pieces-dw.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels char_type_label
# Make some DWARF for the test.
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
+ global srcfile
+
cu {} {
DW_TAG_compile_unit {
{DW_AT_producer "Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.5.212 Build 20150212"}
{DW_AT_language @DW_LANG_C}
- {DW_AT_name void-type.c}
+ {DW_AT_name $srcfile}
{DW_AT_comp_dir /tmp}
} {
declare_labels int_type void_type ptr_type