* [committed][gdb/testsuite] Add missing ranges base in dw2-objfile-overlap-*.S
@ 2020-10-26 10:09 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-10-26 10:09 UTC (permalink / raw)
To: gdb-patches
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 */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-26 10:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 10:09 [committed][gdb/testsuite] Add missing ranges base in dw2-objfile-overlap-*.S Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox