[gdb/testsuite] Fix DW_AT_decl_file in gdb.trace tests
authorTom de Vries <tdevries@suse.de>
Mon, 24 Jun 2019 11:29:23 +0000 (13:29 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 24 Jun 2019 11:29:23 +0000 (13:29 +0200)
commit824eacee59ea8c5625b9fad5b6eb0861b4d0f691
tree0a40aca2753da40da4239540797d1a1612408ae9
parent385b97d3ac9c5c57a610d2e5b358ed888008ae31
[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.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/entry-values.exp
gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp