From patchwork Wed Mar 8 15:42:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 55563 Return-Path: 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 A37F8384D198 for ; Wed, 8 Mar 2023 15:43:33 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from qproxy3-pub.mail.unifiedlayer.com (qproxy3-pub.mail.unifiedlayer.com [67.222.38.20]) by sourceware.org (Postfix) with ESMTPS id 673D2384B128 for ; Wed, 8 Mar 2023 15:43:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 673D2384B128 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from outbound-ss-761.bluehost.com (outbound-ss-761.bluehost.com [74.220.211.250]) by qproxy3.mail.unifiedlayer.com (Postfix) with ESMTP id 34F1A80298F4 for ; Wed, 8 Mar 2023 15:43:18 +0000 (UTC) Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway8.mail.pro1.eigbox.com (Postfix) with ESMTP id 11772100425CC for ; Wed, 8 Mar 2023 15:42:48 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id ZvwGpLLzl9Qs9ZvwGpwlB6; Wed, 08 Mar 2023 15:42:48 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=PJbKRdmC c=1 sm=1 tr=0 ts=6408acf8 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=k__wU0fu6RkA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=zstS-IiYAAAA:8 a=vi5ximEfWaxUtKs5R9IA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KTTwxKuIMj06nGK2bzmr94wTHSPVzREnT8zNU0En7rM=; b=oAYKSbdSZg7+dhLvzzuJbgqvaX fqFELVc9hIC3AITTZQoRS6qkmrcv5pgOLR/3t3cgBi59J6QpdqFLmoRtQV8kv+/IAnYLRVPJWQV2d igKJ5nW42VzNi3eFyf6puumA3; Received: from 75-166-130-93.hlrn.qwest.net ([75.166.130.93]:55612 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pZvwF-000Mk5-Ru for gdb-patches@sourceware.org; Wed, 08 Mar 2023 08:42:47 -0700 From: Tom Tromey Subject: [PATCH 0/5] Make line tables independent of objfile Date: Wed, 08 Mar 2023 08:42:44 -0700 Message-Id: <20230308-submit-constify-linetable-v1-0-ca4057478141@tromey.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAPSsCGQC/x2N3QrCMAxGX2Xk2kDX4g++iniRdKkLbJ00VZSxd 7fz8vBxvrOCSVExuHYrFHmr6ZIb9IcO4kj5IahDY/DOBxfcBe3Fs1aMS7aq6YuTZqnEk2DingZ PRz6dAzSfyQS5UI7j/jCTVSn78CyS9POP3u7b9gM+Tt45hAAAAA== To: gdb-patches@sourceware.org X-Mailer: b4 0.12.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.130.93 X-Source-L: No X-Exim-ID: 1pZvwF-000Mk5-Ru X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-93.hlrn.qwest.net ([192.168.0.21]) [75.166.130.93]:55612 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3020.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This is a tiny step toward the long-term goal of "objfile splitting" -- that is, making symbol tables independent of the objfile. This goal, if ever achieved, would allow for sharing of symbols and symbol tables across inferiors. The main issue in this splitting is to ensure that runtime offsets aren't part of symbols. This series applies this change to line tables. Regression tested on x86-64 Fedora 36. Tom --- Tom Tromey (5): Add operator< and operator== to linetable_entry Change linetables to be objfile-independent Constify linetables Remove extra scopes from objfile_relocate1 Change linetable_entry::is_stmt to bool gdb/buildsym.c | 30 +++++-------- gdb/coffread.c | 1 - gdb/dbxread.c | 9 ++-- gdb/disasm.c | 31 +++++++++----- gdb/dwarf2/read.c | 5 +-- gdb/jit.c | 12 +++--- gdb/linespec.c | 6 +-- gdb/mdebugread.c | 14 ++++--- gdb/mi/mi-symbol-cmds.c | 6 ++- gdb/objfiles.c | 92 +++++++++++++++------------------------- gdb/python/py-linetable.c | 14 +++---- gdb/record-btrace.c | 12 ++++-- gdb/symmisc.c | 10 ++--- gdb/symtab.c | 104 ++++++++++++++++++++++++++++------------------ gdb/symtab.h | 36 +++++++++++++--- gdb/xcoffread.c | 19 ++++----- 16 files changed, 215 insertions(+), 186 deletions(-) --- base-commit: 447d06696999be437b0e3c1a1f26e050ad91b952 change-id: 20230308-submit-constify-linetable-fb1ad2a5b673 Best regards,