mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
[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.
This commit is contained in:
@ -1,3 +1,26 @@
|
||||
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
|
||||
|
@ -34,7 +34,7 @@ Dwarf::assemble $asm_file {
|
||||
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}
|
||||
|
||||
} {
|
||||
|
@ -25,10 +25,12 @@ standard_testfile .c -dw.S
|
||||
|
||||
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
|
||||
|
@ -25,10 +25,12 @@ standard_testfile main.c -dw.S
|
||||
# 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
|
||||
|
@ -30,10 +30,12 @@ standard_testfile .c -debug.S
|
||||
# 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}
|
||||
|
||||
} {
|
||||
|
@ -30,7 +30,7 @@ Dwarf::assemble $asm_file {
|
||||
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
|
||||
|
@ -39,7 +39,7 @@ standard_testfile main.c -other.S -dwarf.S
|
||||
# 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
|
||||
|
||||
@ -52,7 +52,7 @@ Dwarf::assemble $asm_file {
|
||||
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}
|
||||
@ -80,7 +80,7 @@ Dwarf::assemble $asm_file {
|
||||
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}
|
||||
|
@ -26,10 +26,12 @@ standard_testfile .c .S
|
||||
|
||||
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}
|
||||
|
||||
} {
|
||||
|
@ -28,10 +28,12 @@ standard_testfile .c -2.S
|
||||
|
||||
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
|
||||
|
@ -30,7 +30,7 @@ Dwarf::assemble $asm_file {
|
||||
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
|
||||
|
@ -41,6 +41,7 @@ proc build_test_program {} {
|
||||
# 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.
|
||||
@ -48,7 +49,7 @@ proc build_test_program {} {
|
||||
|
||||
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 \
|
||||
|
@ -62,7 +62,7 @@ proc run_test { field_name } {
|
||||
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
|
||||
|
@ -24,10 +24,12 @@ standard_testfile main.c -dw.S
|
||||
# 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
|
||||
|
@ -35,6 +35,8 @@ standard_testfile .S
|
||||
|
||||
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
|
||||
|
||||
@ -43,7 +45,7 @@ Dwarf::assemble $dwarf_asm {
|
||||
|
||||
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}
|
||||
|
@ -28,13 +28,13 @@ standard_testfile main.c -dw.S
|
||||
|
||||
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
|
||||
|
@ -24,10 +24,12 @@ standard_testfile .c -dw.S
|
||||
# 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
|
||||
|
@ -42,11 +42,13 @@ standard_testfile void-type.c void-type.S
|
||||
# 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
|
||||
|
@ -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 \
|
||||
|
@ -29,11 +29,13 @@ standard_testfile void-type.c .S
|
||||
# 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
|
||||
|
@ -50,13 +50,13 @@ standard_testfile .c -dw.S
|
||||
|
||||
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
|
||||
|
@ -36,11 +36,13 @@ standard_testfile .c .S
|
||||
# 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
|
||||
|
Reference in New Issue
Block a user