Message ID | cover.1708974560.git.osandov@fb.com |
---|---|
Headers |
Return-Path: <elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C0EFB3858414 for <patchwork@sourceware.org>; Mon, 26 Feb 2024 19:33:16 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 3ED43385840D for <elfutils-devel@sourceware.org>; Mon, 26 Feb 2024 19:33:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3ED43385840D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=osandov.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=osandov.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3ED43385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708975982; cv=none; b=sXivKsqWEsvgi5O/qaNPR6YL9G+N5fXvlf33ZemuDW+D3+753xexHNPvuYayKAdKDhibCK/gf2nZ3yHiSzkQZStv6LvP3SVcwDl3xmdDZqcImizHzxws9E/Cqqto6mARW4sC+LIiiUMYi9W5n57A8e2JnlEWXX3yHTZRCrstVag= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708975982; c=relaxed/simple; bh=/BYZ4RUDR0OZ0Ttk9YDvR8lGHo/OeyIi3hz85DHcdCk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=w4KPo4b/7yZFraFU1298c1JZHDu7npNQvmyZimeSzaurM/Bg97SK+2gXWNpyyNDDZ8IDhD1CyKhJ2Z6zPX5p3kjhRKRIdtraiclMf8J4yCo6spUB90DP4TqPLRpWMt1pRagNXTcG3gUwNeq2SDg/+E9v5qqYRG2QmkwqveEt+Ns= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1dc98892850so14826985ad.0 for <elfutils-devel@sourceware.org>; Mon, 26 Feb 2024 11:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osandov-com.20230601.gappssmtp.com; s=20230601; t=1708975979; x=1709580779; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=nsy3bxxeTtuErMtuUaaV0V6DHFXyElfuHubNXCSqLHw=; b=tsCMP++4kfAxtnvqoctf/lpp+gUPJAuxB2tQrBgSwPtWc38K6HMt4hik2tKYgQxVgI Zr32UvbhkSfGUkfT0NHnlJlAqAxf71HjsJFGAs9WFTz8oVprZIAlDvZ4Sk3Qsz8UxgxD MZW5czAElrOfiIhFXu737EPCr/hn+yW5DZQJ5vPf/0lm+vlAR50PHxfu9HtefXoLVNOj bClhPGRfzVBhBxLJl5c/9Hf8fgMw5wNyPDd33XcGnYcbDAWo+qgB5c1iNVma0W3KJi51 1I/WTUK8ZrQ6du7DSZh5R2RAD1rNNBebpT//a+xrNDeUyj8P0UIbuVyR25oXRGjlhHea zXvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708975979; x=1709580779; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nsy3bxxeTtuErMtuUaaV0V6DHFXyElfuHubNXCSqLHw=; b=D6tY5Lv+nYfgHo7RtLLDI44NAxuEHOEWo6o4Cde5Q/A7utYxYmEAm6RyjdFaHR0GLd 6HwU3iSgmsU7dEsrfoYYAcMAYc4zaMlJON8iDEU7qiNP7DSSo6QGSMufB+myEz/TiGi8 jmg29KPlIBG6NmZ4ECC1mv/W1ixorSxQ2fVJL+OvosUCXM8rNr55dnAzJez3OVU3zjFx nJwgyOjX2UFmrcUHYIbxiKvG1jw8tu9hsROFtHYTJF9Q4PCUxC5y3mlbL7VWfUfQyvVd BwZik0OzCs3SRxGjwsVIpT0F5u/2hlvY+e2D8dUUD4Qr45mHuKUiGPdjjIUJV5HeTXd3 JJFA== X-Gm-Message-State: AOJu0YwWeYILZIX+n5bgogC5m3YZgmJbe9dgrsTYGUR9sLDuCiK/C630 ZYca8hEu0jI7ryjAVWC+2bIF5m62psB130LZ0BfSBoQqR8yWtRMDZchY7nGIML9MsNFs/lwy2Qb e X-Google-Smtp-Source: AGHT+IG5CsDWuLfIlRjavDVMIIFsNvWeCvazGA3DWCG65EIKbJZKil+I+Jc1fb/t+1okyGs1kOCeFw== X-Received: by 2002:a17:902:d4cb:b0:1dc:8b82:7f56 with SMTP id o11-20020a170902d4cb00b001dc8b827f56mr8496489plg.20.1708975978983; Mon, 26 Feb 2024 11:32:58 -0800 (PST) Received: from telecaster.thefacebook.com ([2620:10d:c090:500::4:e023]) by smtp.gmail.com with ESMTPSA id s21-20020a170902b19500b001dbc3f2e7f4sm56980plr.101.2024.02.26.11.32.58 for <elfutils-devel@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 11:32:58 -0800 (PST) From: Omar Sandoval <osandov@osandov.com> To: elfutils-devel@sourceware.org Subject: [PATCH v3 0/4] elfutils: DWARF package (.dwp) file support Date: Mon, 26 Feb 2024 11:32:47 -0800 Message-ID: <cover.1708974560.git.osandov@fb.com> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Elfutils-devel mailing list <elfutils-devel.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/elfutils-devel>, <mailto:elfutils-devel-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/elfutils-devel/> List-Post: <mailto:elfutils-devel@sourceware.org> List-Help: <mailto:elfutils-devel-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/elfutils-devel>, <mailto:elfutils-devel-request@sourceware.org?subject=subscribe> Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org |
Series |
elfutils: DWARF package (.dwp) file support
|
|
Message
Omar Sandoval
Feb. 26, 2024, 7:32 p.m. UTC
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