[PATCH v2 0/4] elfutils: DWARF package (.dwp) file support

2023-12-06 Thread Omar Sandoval
From: Omar Sandoval Hi, This is version 2 of my patch series adding support for DWARF package files to libdw and the elfutils tools. Version 1 is here [1]. Patches 1-3 add the main implementation and tests for dwp files. Most of this support is internal to libdw, but patch 1 adds a new public

[PATCH v2 1/4] libdw: Parse DWARF package file index sections

2023-12-06 Thread Omar Sandoval
From: Omar Sandoval The .debug_cu_index and .debug_tu_index sections in DWARF package files are basically hash tables mapping a unit's 8 byte signature to an offset and size in each section used by that unit [1]. Add support for parsing and doing lookups in the index sections. We look up a unit

[PATCH v2 3/4] libdw: Apply DWARF package file section offsets where appropriate

2023-12-06 Thread Omar Sandoval
From: Omar Sandoval The final piece of DWARF package file support is that offsets have to be interpreted relative to the section offset from the package index. .debug_abbrev.dwo is already covered, so sprinkle around calls to dwarf_cu_dwp_section_info for the remaining sections: .debug_line.dwo,

[PATCH v2 4/4] libdw: Handle overflowed DW_SECT_INFO offsets in DWARF package file indexes

2023-12-06 Thread Omar Sandoval
From: Omar Sandoval Meta uses DWARF package files for our large, statically-linked C++ applications. Some of our largest applications have more than 4GB in .debug_info.dwo, but the section offsets in .debug_cu_index and .debug_tu_index are 32 bits; see the discussion here [1]. We implemented a

[PATCH v2 2/4] libdw: Try .dwp file in __libdw_find_split_unit()

2023-12-06 Thread Omar Sandoval
From: Omar Sandoval Try opening the file in the location suggested by the standard (the skeleton file name + ".dwp") and looking up the unit in the package index. The rest is similar to .dwo files, with slightly different cleanup since a single Dwarf handle is shared. * libdw/libdw_find

[Bug tools/31114] eu-readelf --debug-dump=info cannot show mega-enum

2023-12-06 Thread mark at klomp dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=31114 Mark Wielaard changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #1 from Mark Wie

[PATCH 1/2] libdw: Use INTUSE with dwarf_get_units

2023-12-06 Thread Aaron Merey
Add INTDECL for dwarf_get_units and call dwarf_get_units with INTUSE. Signed-off-by: Aaron Merey --- libdw/dwarf_get_units.c | 1 + libdw/dwarf_next_lines.c | 8 +-- libdw/libdwP.h| 91 +-- libdw/libdw_find_split_unit.c | 4 +- 4 file

[PATCH 0/2] dwarf_getaranges: Build aranges list from CUs

2023-12-06 Thread Aaron Merey
Patch 1/2 is a prepatory patch that modifies dwarf_get_units calls with INTUSE. Aaron Merey (2): libdw: Use INTUSE with dwarf_get_units dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges libdw/dwarf_get_units.c | 1 + libdw/dwarf_getaranges.c | 215 +

[PATCH 2/2] dwarf_getaranges: Build aranges list from CUs instead of .debug_aranges

2023-12-06 Thread Aaron Merey
No longer use .debug_aranges to build the aranges list since it could be absent or incomplete. Instead build the aranges list by iterating over each CU and recording each address range. https://sourceware.org/bugzilla/show_bug.cgi?id=22288 https://sourceware.org/bugzilla/show_bug.cgi?id=30948 Si