public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] elfutils: DWARF package (.dwp) file support
@ 2024-02-26 19:32 Omar Sandoval
  2024-02-26 19:32 ` [PATCH v3 1/4] libdw: Handle split DWARF in dwarf_decl_file Omar Sandoval
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Omar Sandoval @ 2024-02-26 19:32 UTC (permalink / raw)
  To: elfutils-devel

From: Omar Sandoval <osandov@fb.com>

Hi,

This is version 3 of my patch series adding support for DWARF package
files to libdw and the elfutils tools. Version 2 is here [1], and
version 1 is [here]. This version fixes handling of line number
information.

Patches 1 and 2 are new in this version. Patch 1 fixes dwarf_decl_file
for split DWARF (not just DWP). Patch 2 is primarly a refactor to
prepare for patch 3, but I also stumbled across a theoretical bug that
it fixes.

Patch 3 is the last piece of core DWP support. It was updated in this
version to handle DWP files in dwarf_getsrcfiles and dwarf_next_lines
and run the declfiles, get-lines, next-lines, get-files, and next-files
tests on DWP files.

Patch 4 is unchanged from version 2. It adds support and tests for an
LLVM extension to the dwp format. The "extension" is ugly because of an
oversight in the design of the format that LLVM had to make the best of,
but unfortunately it's necessary for a lot of our use cases.

Thanks!

Omar

1: https://sourceware.org/pipermail/elfutils-devel/2023q4/006718.html
2: https://sourceware.org/pipermail/elfutils-devel/2023q3/006410.html

Omar Sandoval (4):
  libdw: Handle split DWARF in dwarf_decl_file
  libdw: Refactor dwarf_next_lines and fix skipped CU
  libdw: Apply DWARF package file section offsets where appropriate
  libdw: Handle overflowed DW_SECT_INFO offsets in DWARF package file
    indexes

 libdw/dwarf_cu_dwp_section_info.c             |  147 +-
 libdw/dwarf_decl_file.c                       |   30 +-
 libdw/dwarf_end.c                             |   15 +-
 libdw/dwarf_getlocation.c                     |    6 +
 libdw/dwarf_getmacros.c                       |   26 +-
 libdw/dwarf_getsrcfiles.c                     |   17 +-
 libdw/dwarf_next_lines.c                      |   80 +-
 libdw/libdwP.h                                |   45 +-
 tests/.gitignore                              |    1 +
 tests/Makefile.am                             |   13 +-
 tests/declfiles.c                             |   90 ++
 tests/run-all-dwarf-ranges.sh                 |  114 ++
 tests/run-declfiles.sh                        |  323 ++++
 tests/run-dwarf-getmacros.sh                  | 1412 +++++++++++++++++
 tests/run-get-files.sh                        |  115 ++
 tests/run-get-lines.sh                        |  244 +++
 tests/run-get-units-split.sh                  |   18 +
 tests/run-large-elf-file.sh                   |  174 ++
 tests/run-next-files.sh                       |  100 ++
 tests/run-next-lines.sh                       |  242 +++
 tests/run-varlocs.sh                          |  112 ++
 tests/testfile-dwp-4-cu-index-overflow.bz2    |  Bin 0 -> 4490 bytes
 .../testfile-dwp-4-cu-index-overflow.dwp.bz2  |  Bin 0 -> 5584 bytes
 tests/testfile-dwp-5-cu-index-overflow.bz2    |  Bin 0 -> 4544 bytes
 .../testfile-dwp-5-cu-index-overflow.dwp.bz2  |  Bin 0 -> 5790 bytes
 tests/testfile-dwp-cu-index-overflow.source   |   86 +
 26 files changed, 3313 insertions(+), 97 deletions(-)
 create mode 100644 tests/declfiles.c
 create mode 100755 tests/run-declfiles.sh
 create mode 100755 tests/testfile-dwp-4-cu-index-overflow.bz2
 create mode 100644 tests/testfile-dwp-4-cu-index-overflow.dwp.bz2
 create mode 100755 tests/testfile-dwp-5-cu-index-overflow.bz2
 create mode 100644 tests/testfile-dwp-5-cu-index-overflow.dwp.bz2
 create mode 100644 tests/testfile-dwp-cu-index-overflow.source

-- 
2.43.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-01 22:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 19:32 [PATCH v3 0/4] elfutils: DWARF package (.dwp) file support Omar Sandoval
2024-02-26 19:32 ` [PATCH v3 1/4] libdw: Handle split DWARF in dwarf_decl_file Omar Sandoval
2024-02-29 22:08   ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 2/4] libdw: Refactor dwarf_next_lines and fix skipped CU Omar Sandoval
2024-02-29 22:59   ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 3/4] libdw: Apply DWARF package file section offsets where appropriate Omar Sandoval
2024-02-29 23:49   ` Mark Wielaard
2024-02-26 19:32 ` [PATCH v3 4/4] libdw: Handle overflowed DW_SECT_INFO offsets in DWARF package file indexes Omar Sandoval
2024-03-01 14:59   ` Mark Wielaard
2024-03-01 16:11     ` Mark Wielaard
2024-03-01 22:36     ` Omar Sandoval

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).