| Message ID | cover.1767024363.git.aburgess@redhat.com |
|---|---|
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 83E794BA2E1D for <patchwork@sourceware.org>; Mon, 29 Dec 2025 16:16:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83E794BA2E1D Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aW30EcZr X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id B3A4C4BA2E2F for <gdb-patches@sourceware.org>; Mon, 29 Dec 2025 16:15:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3A4C4BA2E2F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3A4C4BA2E2F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1767024931; cv=none; b=dXgoUd9lY+whYxar2aN4piFifaTBmRfEiZyrL0JWvuV0cAcsxrOQQtbNawBz1y3HLXZsnCYPDNxPMLysqgw9JhvAx9vrOuPq6eEkGe0p4erp4/F307zrxSBDpJRN35A50/Sc7BRdPREMjBPq5lw+I6bakCH2Hf1P8gz+Occbo34= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1767024931; c=relaxed/simple; bh=iQkskmSXOA9yrN9wYzXgzlA4/uS7CkTsRLfmfnvOwn4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=EKFnrL0E3lWEP1+YE9zT8TLuxnjeXhZJSOLWHdpN8gndIUYqfYKtH8FYQ5WsLaiqyAEvpjV39SZyEdXv+VnYeO7fyGEInvgtYdlfYEhpwjiX7YUWnQfkzLs5UH05J2kf+PbC26QWgp4mWaY2sOYZKdYoNx+u3s1nvGnkfUFG11U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3A4C4BA2E2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1767024931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dB9MZYEHnZUGPfvW89we7sIzXURffSsTnk8mmecUCc8=; b=aW30EcZrJ9mSe3j+1p7ESagnTT4ve6eTNAWUxdahc8zDSTp+xkam3T/93/P4RY4t/ymoJI MxAZKATU++fKoIeLYHw0MnF/XBi9+7PtpqZTqqNgZtFT0M9UsTyhyyGOX81gAnWb/blSvo gX5pLhfA98ihV5bR8A3oUA7ggJbRCzg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-262-8mzI-3L7N7WPaRue2aYy0A-1; Mon, 29 Dec 2025 11:15:28 -0500 X-MC-Unique: 8mzI-3L7N7WPaRue2aYy0A-1 X-Mimecast-MFC-AGG-ID: 8mzI-3L7N7WPaRue2aYy0A_1767024927 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4775d8428e8so77292545e9.0 for <gdb-patches@sourceware.org>; Mon, 29 Dec 2025 08:15:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767024927; x=1767629727; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dB9MZYEHnZUGPfvW89we7sIzXURffSsTnk8mmecUCc8=; b=YQFdpPB3uOuIL+i9t+sSlObfql+HG7NB08uxeYdJ0609MSDj/4s0jYVNdfa9IBJQOV /hYH5g5iD9Uhw7L6ZnEXFanYo0ePth6tBKHi6wA4zc894+7iFQUspY3HBtHxcB+giyzk Pw1/60iUQdQTMZkj7f8xYfFqWYjWB8+1begsmtwv4KhuCKlPdQQKNKWx8BrdsaU8D2zP U1V4tfFswr7WiYF6m+ioB37kT9YgDiG+By39pn6znfXoQK/7PeEVOWXp0HipTIWxMwEv aJ9dfR6XEg8yCmaOig2Xi1qsm143kAbNJXLUs6xXeLXXJfLzDeJZKrLfg3rb3yoiiTfe J7Xg== X-Gm-Message-State: AOJu0Yw50bNe9eDjVW21zwlq4qbXRaMiZioE5RM06TT0NF2JRfqJmaYW drxBtb5VAEsr2Z0Q4AmMBjv22wFEVVbrDxlyfig6ON5IKFHMEZDlVepRBjBy/Wg8gDtugMexqtw ddnEfwPabZE+GkhTV84qrPDN5ee/pzzfw38TVxaLH9bv7vCURYoqrje//q2KHilY/Gf1GD0C/wp SdEt1DYchU+T/iq5nSBqN69buO8j+urgbIlZu2ALGKQt2Lw2U= X-Gm-Gg: AY/fxX58OzVTFtgw+5yAD2+8HAz2jMHVee8kbYUMfghskF3Jk1vf9j+xGtgAF8yBeHg lmZ2VZrTM0qF0311U6gPKHXXpBk9WPT9ULySK0OCuhztbVnhX7ed8ErEam5exmRLkmEiIK9ZcwE ndb11WTZSNFUgRge6wmQgGpGx1yAL9HHmwadbfvl12B9aKsVtlaB1mtpFRz0lndYXfNxXeWWVPV z8dn9Nh8nwwT8RmKhy88dcqF7te7XA43gcGfc1sueuelOkfNnJg68LTZ3Bb1zUQAHoX2bqRAuEK R6Aqi9hza02qaxKi4ADz3H1JjvHkiaO0BXC1GEjwN8uPtX46KMe/vhpJBG4XeqjTxqPx8JJX903 XgcJphbrVMBGnGIpNpyridF8u6SyZLPDy9w== X-Received: by 2002:a05:600c:3111:b0:477:b642:9dc6 with SMTP id 5b1f17b1804b1-47d195aa79cmr340385775e9.34.1767024927007; Mon, 29 Dec 2025 08:15:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJ4OD8UK3wQv3bXe+Rg2q8k1EIWRyTeKG2xuPOVWtkgqy5gCjAnraeqVzK60M1UCQGy+KC3A== X-Received: by 2002:a05:600c:3111:b0:477:b642:9dc6 with SMTP id 5b1f17b1804b1-47d195aa79cmr340385345e9.34.1767024926512; Mon, 29 Dec 2025 08:15:26 -0800 (PST) Received: from localhost (92.40.168.223.threembb.co.uk. [92.40.168.223]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47be27c2260sm584148315e9.15.2025.12.29.08.15.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Dec 2025 08:15:26 -0800 (PST) From: Andrew Burgess <aburgess@redhat.com> To: gdb-patches@sourceware.org Cc: Andrew Burgess <aburgess@redhat.com> Subject: [PATCHv4 0/7] Fixes related to misplaced symtabs originating from dwz files Date: Mon, 29 Dec 2025 16:15:13 +0000 Message-Id: <cover.1767024363.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <cover.1766414210.git.aburgess@redhat.com> References: <cover.1766414210.git.aburgess@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: x9mlRcIlWvM0hQEWt0CYybbLn9wfSpurDqJW0cv1DxI_1767024927 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Fixes related to misplaced symtabs originating from dwz files
|
|
Message
Andrew Burgess
Dec. 29, 2025, 4:15 p.m. UTC
The test that appears in v1 and v2 of this series can still be found
as patch #6 in this new series. However, this new series proposes a
fix for the underlying issue in patch #7.
The patches #1,#2, #3, #5, and #5, are some light refactoring that
makes the fix, found in patch #7 easier.
I'm aware that the patch description on #6 is rather long. The
underlying issue has a lot of parts that all came together to reveal
the bug, and it's not helped that the bug I originally ran into has
been mitigated, but not fixed, by a recent patch. In some ways you
might be better off jumping ahead to patch #7 which focuses on the
underlying issue then going back to #6, where debuginfod is also added
into the mix, to understand the original issue that I ran into.
In V4:
- Added patches #2, #3, and #5 based on Simon's review feedback.
These don't really change anything related to the test or fix (in
patches #6 and #7), but are similar in spirit to the refactoring
that I was already proposing. I can understand why Simon
suggested making these changes.
That said, patches #1 to #5 are all just refactoring and can be
reviewed almost independently to the last two patches in the
series.
Thanks,
Andrew
---
Andrew Burgess (7):
gdb/dwarf: remove line_header parameter from dwarf2_decode_lines
gdb/dwarf: remove m_line_header from lnp_state_machine class
gdb/dwarf: remove the line_header argument from dwarf2_start_subfile
gdb/dwarf: move subfile and symtab creation into dwarf2_cu method
gdb/dwarf: rename dwarf2_start_subfile to dwarf2_cu::start_subfile
gdb: test for misplaced symtab causing file not found error
gdb: avoid creating misplaced symtabs for dwz files
gdb/dwarf2/cu.c | 40 ++
gdb/dwarf2/cu.h | 7 +
gdb/dwarf2/line-header.c | 23 ++
gdb/dwarf2/line-header.h | 13 +-
gdb/dwarf2/line-program.c | 90 ++---
gdb/dwarf2/line-program.h | 10 +-
gdb/dwarf2/read.c | 57 +--
gdb/dwarf2/read.h | 25 --
gdb/testsuite/gdb.base/dwz-symtabs-bar.c | 36 ++
gdb/testsuite/gdb.base/dwz-symtabs-bar.h | 25 ++
gdb/testsuite/gdb.base/dwz-symtabs-common.h | 32 ++
gdb/testsuite/gdb.base/dwz-symtabs-foo.c | 79 ++++
gdb/testsuite/gdb.base/dwz-symtabs-foo.h | 27 ++
gdb/testsuite/gdb.base/dwz-symtabs-main.c | 34 ++
gdb/testsuite/gdb.base/dwz-symtabs.exp | 188 +++++++++
.../gdb.debuginfod/solib-with-dwz-bar.c | 36 ++
.../gdb.debuginfod/solib-with-dwz-bar.h | 25 ++
.../gdb.debuginfod/solib-with-dwz-common.h | 32 ++
.../gdb.debuginfod/solib-with-dwz-foo.c | 79 ++++
.../gdb.debuginfod/solib-with-dwz-foo.h | 27 ++
.../gdb.debuginfod/solib-with-dwz-main.c | 34 ++
.../gdb.debuginfod/solib-with-dwz.exp | 378 ++++++++++++++++++
gdb/testsuite/lib/gdb.exp | 34 ++
23 files changed, 1200 insertions(+), 131 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs-bar.c
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs-bar.h
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs-common.h
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs-foo.c
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs-foo.h
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs-main.c
create mode 100644 gdb/testsuite/gdb.base/dwz-symtabs.exp
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz-bar.c
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz-bar.h
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz-common.h
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz-foo.c
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz-foo.h
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz-main.c
create mode 100644 gdb/testsuite/gdb.debuginfod/solib-with-dwz.exp
base-commit: 5d8562e89a612f2d0e5c9e0813a0d37620eff78c