From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: Yao Qi <qiyao@sourceware.org>,
Andrew Burgess <andrew.burgess@embecosm.com>,
Doug Evans <dje@google.com>
Subject: [committed][gdb/testsuite] Fix DW_AT_decl_file in gdb.trace tests
Date: Mon, 24 Jun 2019 11:40:00 -0000 [thread overview]
Message-ID: <20190624114044.GA4564@delia> (raw)
Hi,
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.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Fix DW_AT_decl_file in gdb.trace tests
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/gdb.trace/entry-values.exp | 4 ++--
gdb/testsuite/gdb.trace/unavailable-dwarf-piece.exp | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.trace/entry-values.exp b/gdb/testsuite/gdb.trace/entry-values.exp
index 13619bad9a..6637e5ecff 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 c62e344ee0..87177857e3 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}
} {
reply other threads:[~2019-06-24 11:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190624114044.GA4564@delia \
--to=tdevries@suse.de \
--cc=andrew.burgess@embecosm.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyao@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox