Summary: | [gdb/symtab] read.h:309: internal-error: set_length: Assertion `m_length == length' failed | ||
---|---|---|---|
Product: | gdb | Reporter: | Tom de Vries <vries> |
Component: | symtab | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | 13.1 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Tom de Vries
2022-08-07 06:59:06 UTC
A simple fix is, don't calculate length based on the CU list: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index c65a8831bcb..7253c7c0d3e 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -4677,7 +4677,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd *per_bf d, " ignoring .debug_names.")); return false; } - const ULONGEST length = sect_off_next - sect_off_prev; + const ULONGEST length = 0; dwarf2_per_cu_data_up per_cu = create_cu_from_index_list (per_bfd, §ion, is_dwz, sect_off_prev, length); ... (In reply to Tom de Vries from comment #1) > A simple fix is, don't calculate length based on the CU list: > ... > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c > index c65a8831bcb..7253c7c0d3e 100644 > --- a/gdb/dwarf2/read.c > +++ b/gdb/dwarf2/read.c > @@ -4677,7 +4677,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd > *per_bf > d, > " ignoring .debug_names.")); > return false; > } > - const ULONGEST length = sect_off_next - sect_off_prev; > + const ULONGEST length = 0; > dwarf2_per_cu_data_up per_cu > = create_cu_from_index_list (per_bfd, §ion, is_dwz, > sect_off_prev, length); > ... Tested this, no regressions. (In reply to Tom de Vries from comment #2) > (In reply to Tom de Vries from comment #1) > > A simple fix is, don't calculate length based on the CU list: > > ... > > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c > > index c65a8831bcb..7253c7c0d3e 100644 > > --- a/gdb/dwarf2/read.c > > +++ b/gdb/dwarf2/read.c > > @@ -4677,7 +4677,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd > > *per_bf > > d, > > " ignoring .debug_names.")); > > return false; > > } > > - const ULONGEST length = sect_off_next - sect_off_prev; > > + const ULONGEST length = 0; > > dwarf2_per_cu_data_up per_cu > > = create_cu_from_index_list (per_bfd, §ion, is_dwz, > > sect_off_prev, length); > > ... > > Tested this, no regressions. Hmm, I may have forgot to test cc-with-debug-names board: https://sourceware.org/bugzilla/show_bug.cgi?id=29572 |