forked from Imagelibrary/binutils-gdb
[gdb/testsuite] Fix dwo path in fission-*.S
[ Using $build for /home/vries/gdb_versions/devel/build to make things a bit more readable. ] When using make check// to run test-case gdb.dwarf2/fission-base.exp: ... ( cd $build/gdb; make check//unix RUNTESTFLAGS="fission-base.exp" ) ... we run into: ... (gdb) file \ $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base^M Reading symbols from \ $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base...^M warning: Could not find DWO CU \ $build/gdb/testsuite.1/outputs/gdb.dwarf2/fission-base/fission-base.dwo \ (0x807060504030201) referenced by CU at offset 0xc7 [in module \ $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base]^M ... The problem is that the executable refers to the dwo file using path name $build/gdb/testsuite.1/outputs/gdb.dwarf2/fission-base/fission-base.dwo, while the actual dwo file is at $build/gdb/testsuite.unix/outputs/gdb.dwarf2/fission-base/fission-base.dwo. This is caused by this trick in fission-base.S: ... #define XSTR(s) STR(s) #define STR(s) #s ... .asciz XSTR(DWO) # DW_AT_GNU_dwo_name ... and: ... $ echo | gcc -E -dD - | grep "define unix" ... I used this trick to avoid doing additional_flags=-DDWO=\"$dwo\", since I was concerned that there could be quoting issues. However, I've found other uses of this pattern, f.i. in gdb/testsuite/gdb.base/corefile-buildid.exp: ... additional_flags=-DSHLIB_NAME=\"$dlopen_lib\"] ... So, fix this by: - using additional_flags=-DDWO=\"$dwo\" and - using plain DWO instead of XSTR(DWO) Likewise in other gdb.dwarf2/fission*.exp test-cases. Tested on x86_64-linux, using make check//unix. gdb/testsuite/ChangeLog: 2021-09-01 Tom de Vries <tdevries@suse.de> PR testsuite/28298 * gdb.dwarf2/fission-base.S: Use DWO instead of XSTR(DWO). * gdb.dwarf2/fission-loclists-pie.S: Same. * gdb.dwarf2/fission-loclists.S: Same. * gdb.dwarf2/fission-reread.S: Same. * gdb.dwarf2/fission-base.exp: Use additional_flags=-DDWO=\"$dwo\". * gdb.dwarf2/fission-loclists-pie.exp: Same. * gdb.dwarf2/fission-loclists.exp: Same. * gdb.dwarf2/fission-reread.exp: Same.
This commit is contained in:
@@ -1,3 +1,15 @@
|
|||||||
|
2021-09-01 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
PR testsuite/28298
|
||||||
|
* gdb.dwarf2/fission-base.S: Use DWO instead of XSTR(DWO).
|
||||||
|
* gdb.dwarf2/fission-loclists-pie.S: Same.
|
||||||
|
* gdb.dwarf2/fission-loclists.S: Same.
|
||||||
|
* gdb.dwarf2/fission-reread.S: Same.
|
||||||
|
* gdb.dwarf2/fission-base.exp: Use additional_flags=-DDWO=\"$dwo\".
|
||||||
|
* gdb.dwarf2/fission-loclists-pie.exp: Same.
|
||||||
|
* gdb.dwarf2/fission-loclists.exp: Same.
|
||||||
|
* gdb.dwarf2/fission-reread.exp: Same.
|
||||||
|
|
||||||
2021-09-01 Tom de Vries <tdevries@suse.de>
|
2021-09-01 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
* gdb.fortran/call-no-debug.exp: Avoid shared lib symbols for
|
* gdb.fortran/call-no-debug.exp: Avoid shared lib symbols for
|
||||||
|
|||||||
@@ -20,9 +20,6 @@
|
|||||||
and then massaging the output.
|
and then massaging the output.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-base.c"
|
.file "fission-base.c"
|
||||||
|
|
||||||
.text
|
.text
|
||||||
@@ -146,7 +143,7 @@ main:
|
|||||||
.8byte .Letext0-.Ltext0 # DW_AT_high_pc
|
.8byte .Letext0-.Ltext0 # DW_AT_high_pc
|
||||||
.4byte .Ldebug_line0 # DW_AT_stmt_list
|
.4byte .Ldebug_line0 # DW_AT_stmt_list
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
||||||
.asciz XSTR(DWO) # DW_AT_GNU_dwo_name
|
.asciz DWO # DW_AT_GNU_dwo_name
|
||||||
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
||||||
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
||||||
.4byte .Ldebug_addr0_begin # DW_AT_GNU_addr_base
|
.4byte .Ldebug_addr0_begin # DW_AT_GNU_addr_base
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ set obj [standard_output_file "${testfile}.o"]
|
|||||||
set dwo [standard_output_file "${testfile}.dwo"]
|
set dwo [standard_output_file "${testfile}.dwo"]
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
||||||
[list $srcfile \
|
[list $srcfile \
|
||||||
[list nodebug split-dwo additional_flags=-DDWO=$dwo] \
|
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
|
||||||
$obj]] {
|
$obj]] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,8 +33,6 @@
|
|||||||
return init (&argc);
|
return init (&argc);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-loclists-pie.c"
|
.file "fission-loclists-pie.c"
|
||||||
.text
|
.text
|
||||||
@@ -463,7 +461,7 @@ main:
|
|||||||
.LASF1:
|
.LASF1:
|
||||||
.string "/tmp/19999/obj64/gdb/testsuite"
|
.string "/tmp/19999/obj64/gdb/testsuite"
|
||||||
.LASF0:
|
.LASF0:
|
||||||
.string XSTR(DWO)
|
.string DWO
|
||||||
.section .debug_str_offsets.dwo,"e",@progbits
|
.section .debug_str_offsets.dwo,"e",@progbits
|
||||||
.long 0 # indexed string 0x0: argv
|
.long 0 # indexed string 0x0: argv
|
||||||
.long 0x5 # indexed string 0x1: argc
|
.long 0x5 # indexed string 0x1: argc
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ set obj [standard_output_file "${testfile}.o"]
|
|||||||
set dwo [standard_output_file "${testfile}.dwo"]
|
set dwo [standard_output_file "${testfile}.dwo"]
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" \
|
||||||
{nodebug ldflags=-pie} \
|
{nodebug ldflags=-pie} \
|
||||||
[list $srcfile [list nodebug split-dwo additional_flags=-DDWO=$dwo] \
|
[list $srcfile [list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
|
||||||
$obj]] {
|
$obj]] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,6 @@
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-loclists.c"
|
.file "fission-loclists.c"
|
||||||
.text
|
.text
|
||||||
.Ltext0:
|
.Ltext0:
|
||||||
@@ -243,7 +240,7 @@ main:
|
|||||||
.byte 0x5
|
.byte 0x5
|
||||||
.4byte .Ldebug_ranges0 # DW_AT_GNU_ranges_base
|
.4byte .Ldebug_ranges0 # DW_AT_GNU_ranges_base
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
.ascii "/tmp/src/gdb/testsuite\0" # DW_AT_comp_dir
|
||||||
.asciz XSTR(DWO) # DW_AT_GNU_dwo_name
|
.asciz DWO # DW_AT_GNU_dwo_name
|
||||||
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
.4byte .Ldebug_pubnames0 # DW_AT_GNU_pubnames
|
||||||
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
.4byte .Ldebug_pubtypes0 # DW_AT_GNU_pubtypes
|
||||||
.4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
|
.4byte .Ldebug_addr0 # DW_AT_GNU_addr_base
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ set obj [standard_output_file "${testfile}.o"]
|
|||||||
set dwo [standard_output_file "${testfile}.dwo"]
|
set dwo [standard_output_file "${testfile}.dwo"]
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" {nodebug} \
|
||||||
[list $srcfile \
|
[list $srcfile \
|
||||||
[list nodebug split-dwo additional_flags=-DDWO=$dwo] \
|
[list nodebug split-dwo additional_flags=-DDWO=\"$dwo\"] \
|
||||||
$obj]] {
|
$obj]] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,9 +47,6 @@
|
|||||||
# define SYMBOL(str) str
|
# define SYMBOL(str) str
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XSTR(s) STR(s)
|
|
||||||
#define STR(s) #s
|
|
||||||
|
|
||||||
.file "fission-reread.cc"
|
.file "fission-reread.cc"
|
||||||
|
|
||||||
.globl SYMBOL(baz)
|
.globl SYMBOL(baz)
|
||||||
@@ -146,7 +143,7 @@ SYMBOL(main):
|
|||||||
.4byte 0 /* Offset to Type DIE */
|
.4byte 0 /* Offset to Type DIE */
|
||||||
.uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
|
.uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
||||||
.asciz XSTR(DWO) /* DW_AT_GNU_dwo_name */
|
.asciz DWO /* DW_AT_GNU_dwo_name */
|
||||||
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
||||||
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
||||||
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
||||||
@@ -217,7 +214,7 @@ SYMBOL(main):
|
|||||||
.4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
|
.4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
|
||||||
.4byte .Ldebug_line0 /* DW_AT_stmt_list */
|
.4byte .Ldebug_line0 /* DW_AT_stmt_list */
|
||||||
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
.ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
|
||||||
.asciz XSTR(DWO) /* DW_AT_GNU_dwo_name */
|
.asciz DWO /* DW_AT_GNU_dwo_name */
|
||||||
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
.4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
|
||||||
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
.4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
|
||||||
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
.4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ if { $additional_flags != "" } {
|
|||||||
|
|
||||||
set dwo_options $options
|
set dwo_options $options
|
||||||
lappend dwo_options split-dwo
|
lappend dwo_options split-dwo
|
||||||
lappend dwo_options additional_flags=-DDWO=$dwo
|
lappend dwo_options additional_flags=-DDWO=\"$dwo\"
|
||||||
|
|
||||||
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
|
if [build_executable_and_dwo_files "$testfile.exp" "${binfile}" $options \
|
||||||
[list $srcfile $dwo_options $obj]] {
|
[list $srcfile $dwo_options $obj]] {
|
||||||
|
|||||||
Reference in New Issue
Block a user