diff options
author | Tom de Vries <tdevries@suse.de> | 2019-06-24 13:29:23 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-06-24 13:29:23 +0200 |
commit | 824eacee59ea8c5625b9fad5b6eb0861b4d0f691 (patch) | |
tree | 0a40aca2753da40da4239540797d1a1612408ae9 /gdb/testsuite | |
parent | 385b97d3ac9c5c57a610d2e5b358ed888008ae31 (diff) | |
download | gdb-824eacee59ea8c5625b9fad5b6eb0861b4d0f691.zip gdb-824eacee59ea8c5625b9fad5b6eb0861b4d0f691.tar.gz gdb-824eacee59ea8c5625b9fad5b6eb0861b4d0f691.tar.bz2 |
[gdb/testsuite] Fix DW_AT_decl_file in gdb.trace tests
When running gdb.trace/{entry-values.exp,unavailable-dwarf-piece.exp} with
board cc-with-dwz, we run into two failures related to the DW_AT_decl_file
attribute:
- The encoding DW_FOR_sdata is used for DW_AT_decl_file, while the attribute
is required to have a an "unsigned integer constant" value.
- The DW_AT_decl_file attributes refer to a file with index one, while there's
no such file.
Fix this by using DW_FOR_udata and the value 0, meaning "no file specified".
Tested on x86_64-linux with board native-gdbserver.
gdb/testsuite/ChangeLog:
2019-06-24 Tom de Vries <tdevries@suse.de>
* gdb.trace/entry-values.exp: Use DW_FORM_udata instead of
DW_FOR_sdata for DW_AT_decl_file. Use 0 for DW_AT_decl_file.
* gdb.trace/unavailable-dwarf-piece.exp: Same.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/entry-values.exp | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp | 8 |
3 files changed, 12 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4d48d2f..a8e4755 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2019-06-24 Tom de Vries <tdevries@suse.de> + * gdb.trace/entry-values.exp: Use DW_FORM_udata instead of + DW_FOR_sdata for DW_AT_decl_file. Use 0 for DW_AT_decl_file. + * gdb.trace/unavailable-dwarf-piece.exp: Same. + +2019-06-24 Tom de Vries <tdevries@suse.de> + * gdb.dwarf2/inlined_subroutine-inheritance.exp: 2019-06-21 Tom de Vries <tdevries@suse.de> diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp index 13619ba..6637e5e 100644 --- a/gdb/testsuite/gdb.trace/entry-values.exp +++ b/gdb/testsuite/gdb.trace/entry-values.exp @@ -109,7 +109,7 @@ Dwarf::assemble $asm_file { } foo_label: subprogram { - {decl_file 1 sdata} + {decl_file 0 udata} {MACRO_AT_func { foo ${srcdir}/${subdir}/${srcfile} }} } { formal_parameter { @@ -126,7 +126,7 @@ Dwarf::assemble $asm_file { subprogram { {name bar} - {decl_file 1 sdata} + {decl_file 0 udata} {low_pc $bar_start addr} {high_pc "$bar_start + $bar_length" addr} {GNU_all_call_sites 1 sdata} diff --git a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp index c62e344..8717785 100644 --- a/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp +++ b/gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp @@ -44,7 +44,7 @@ Dwarf::assemble $asm_file { struct_s_label: DW_TAG_structure_type { {name s} {byte_size 3 DW_FORM_sdata} - {decl_file 1 DW_FORM_sdata} + {decl_file 0 DW_FORM_udata} {decl_line 1 DW_FORM_sdata} } { DW_TAG_member { @@ -73,7 +73,7 @@ Dwarf::assemble $asm_file { struct_t_label: DW_TAG_structure_type { {name t} {byte_size 3 DW_FORM_sdata} - {decl_file 1 DW_FORM_sdata} + {decl_file 0 DW_FORM_udata} {decl_line 1 DW_FORM_sdata} } { DW_TAG_member { @@ -174,7 +174,7 @@ Dwarf::assemble $asm_file { DW_TAG_subprogram { {name foo} - {decl_file 1 sdata} + {decl_file 0 udata} {low_pc foo_start_lbl addr} {high_pc foo_end_lbl addr} } { @@ -219,7 +219,7 @@ Dwarf::assemble $asm_file { DW_TAG_subprogram { {name bar} - {decl_file 1 sdata} + {decl_file 0 udata} {low_pc bar_start_lbl addr} {high_pc bar_end_lbl addr} } { |