From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Add missing ranges base in dw2-objfile-overlap-*.S
Date: Mon, 26 Oct 2020 11:09:35 +0100 [thread overview]
Message-ID: <20201026100934.GA17834@delia> (raw)
Hi,
When doing a gdb testsuite run with this trigger patch:
...
@@ -14454,6 +14454,7 @@ dwarf2_ranges_process
if (!base.has_value ())
{
+ gdb_assert (false);
/* We have no valid base address for the ranges
data. */
complaint (_("Invalid .debug_ranges data (no base address)"));
...
we run into the assert with test-case gdb.dwarf2/dw2-objfile-overlap.exp.
Fix this by adding the missing .debug_ranges base in
gdb.dwarf2/dw2-objfile-overlap-*.S.
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Add missing ranges base in dw2-objfile-overlap-*.S
gdb/testsuite/ChangeLog:
2020-10-26 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/dw2-objfile-overlap-inner.S: Specify default base address
for CU.
* gdb.dwarf2/dw2-objfile-overlap-outer.S: Same.
---
gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S | 3 +++
gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S | 3 +++
2 files changed, 6 insertions(+)
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S
index e895929532..dd4d5b0eb9 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-inner.S
@@ -42,6 +42,7 @@ inner:
/* CU die */
.uleb128 1 /* Abbrev: DW_TAG_compile_unit */
.4byte .Lline1_begin /* DW_AT_stmt_list */
+ .4byte 0 /* DW_AT_low_pc */
.4byte .Ldebug_ranges /* DW_AT_ranges */
.ascii "inner.c\0" /* DW_AT_name */
.ascii "/tmp\0" /* DW_AT_comp_dir */
@@ -77,6 +78,8 @@ inner:
.byte 1 /* has_children */
.uleb128 0x10 /* DW_AT_stmt_list */
.uleb128 0x6 /* DW_FORM_data4 */
+ .uleb128 0x11 /* DW_AT_low_pc */
+ .uleb128 0x1 /* DW_FORM_addr */
.uleb128 0x55 /* DW_AT_ranges */
.uleb128 0x6 /* DW_FORM_data4 */
.uleb128 0x3 /* DW_AT_name */
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S
index 9fa578db8a..75efa01400 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S
@@ -55,6 +55,7 @@ outer_after:
/* CU die */
.uleb128 1 /* Abbrev: DW_TAG_compile_unit */
.4byte .Lline1_begin /* DW_AT_stmt_list */
+ .4byte 0 /* DW_AT_low_pc */
.4byte .Ldebug_ranges /* DW_AT_ranges */
.ascii "outer.c\0" /* DW_AT_name */
.ascii "/tmp\0" /* DW_AT_comp_dir */
@@ -101,6 +102,8 @@ outer_after:
.byte 1 /* has_children */
.uleb128 0x10 /* DW_AT_stmt_list */
.uleb128 0x6 /* DW_FORM_data4 */
+ .uleb128 0x11 /* DW_AT_low_pc */
+ .uleb128 0x1 /* DW_FORM_addr */
.uleb128 0x55 /* DW_AT_ranges */
.uleb128 0x6 /* DW_FORM_data4 */
.uleb128 0x3 /* DW_AT_name */
reply other threads:[~2020-10-26 10:09 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=20201026100934.GA17834@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@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