public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
@ 2022-07-19 11:32 vries at gcc dot gnu.org
2022-07-19 11:34 ` [Bug symtab/29385] " vries at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-19 11:32 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
Bug ID: 29385
Summary: [gdb, debug-types, debug-names, dwarf-5] Support
.debug_names section with TUs in .debug_info
Product: gdb
Version: HEAD
Status: NEW
Severity: enhancement
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
[ spin-off of PR29381. ]
When running the test-case gdb.cp/cpexprs-debug-types.exp with target board
cc-with-debug-names on a system which defaults to dwarf5, gdb rejects the
.debug_names index because it cannot find a .debug_types section:
...
The .debug_names index is rejected in dwarf2_read_debug_names because:
...
if (map->tu_count != 0)
{
/* We can only handle a single .debug_types when we have an
index. */
if (per_bfd->types.size () != 1)
return false;
...
The .debug_types section was eliminated in dwarf 5.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/29385] [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
@ 2022-07-19 11:34 ` vries at gcc dot gnu.org
2022-08-12 14:22 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-07-19 11:34 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Part of enabling this will be to address the computation of CU size, which is
broken for this use case. Tentative patch at PR29381 comment 3.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/29385] [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
2022-07-19 11:34 ` [Bug symtab/29385] " vries at gcc dot gnu.org
@ 2022-08-12 14:22 ` vries at gcc dot gnu.org
2022-08-12 14:24 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-12 14:22 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> Part of enabling this will be to address the computation of CU size, which
> is broken for this use case. Tentative patch at PR29381 comment 3.
That's already taken care of in
https://sourceware.org/pipermail/gdb-patches/2022-August/191313.html .
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/29385] [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
2022-07-19 11:34 ` [Bug symtab/29385] " vries at gcc dot gnu.org
2022-08-12 14:22 ` vries at gcc dot gnu.org
@ 2022-08-12 14:24 ` vries at gcc dot gnu.org
2022-08-12 15:49 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-12 14:24 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch (in combination with patch mentioned in previous comment):
...
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 6c6ca96f8d9..8e82f464293 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -4736,13 +4736,16 @@ dwarf2_read_debug_names (dwarf2_per_objfile
*per_objfile)
{
/* We can only handle a single .debug_types when we have an
index. */
- if (per_bfd->types.size () != 1)
+ if (per_bfd->types.size () > 1)
{
per_bfd->all_comp_units.clear ();
return false;
}
- dwarf2_section_info *section = &per_bfd->types[0];
+ dwarf2_section_info *section
+ = (per_bfd->types.size () == 1
+ ? &per_bfd->types[0]
+ : &per_bfd->info);
create_signatured_type_table_from_debug_names
(per_objfile, *map, section, &per_bfd->abbrev);
...
Allows test-case gdb.cp/cpexprs-debug-types.exp to pass on target board
cc-with-debug-names/gdb:debug_flags=-gdwarf-5.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/29385] [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-08-12 14:24 ` vries at gcc dot gnu.org
@ 2022-08-12 15:49 ` vries at gcc dot gnu.org
2022-09-06 8:23 ` vries at gcc dot gnu.org
2022-09-06 8:23 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-08-12 15:49 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2022-August/191365.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/29385] [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-08-12 15:49 ` vries at gcc dot gnu.org
@ 2022-09-06 8:23 ` vries at gcc dot gnu.org
2022-09-06 8:23 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-06 8:23 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d878bb39e417fa23b8dc62fed916708e776a9b71
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug symtab/29385] [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
` (4 preceding siblings ...)
2022-09-06 8:23 ` vries at gcc dot gnu.org
@ 2022-09-06 8:23 ` vries at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2022-09-06 8:23 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29385
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.1
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-09-06 8:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 11:32 [Bug symtab/29385] New: [gdb, debug-types, debug-names, dwarf-5] Support .debug_names section with TUs in .debug_info vries at gcc dot gnu.org
2022-07-19 11:34 ` [Bug symtab/29385] " vries at gcc dot gnu.org
2022-08-12 14:22 ` vries at gcc dot gnu.org
2022-08-12 14:24 ` vries at gcc dot gnu.org
2022-08-12 15:49 ` vries at gcc dot gnu.org
2022-09-06 8:23 ` vries at gcc dot gnu.org
2022-09-06 8:23 ` vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).