Message ID | 20231029-split-objfile-2023-bound-sym-october-v1-2-612531df2734@tromey.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-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 C6AC03865C15 for <patchwork@sourceware.org>; Sun, 29 Oct 2023 23:23:44 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 2AA6938618A9 for <gdb-patches@sourceware.org>; Sun, 29 Oct 2023 23:23:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AA6938618A9 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2AA6938618A9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698621790; cv=none; b=WmcM31ieSIw+ZhJicHLJunT91INfGNNuoq/v0KrzSp/R3F2CgLHG8caRFDZ64MqWlnvhaEQBwb2a+dhWcaGj5KsQq82CBOB6eRv5+WxQ3FD63J3gvMiS/uaosag3Xky37SQ/qji7/IKizEx82qyWE4eo0L0QJ0JkITjXAlpRJq8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698621790; c=relaxed/simple; bh=MOG/Eput8uElzlO7rSvhcT5f+P3m/La3vJlr2gda2ug=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=jZoU6aksBatbDeSypvSLLRGLdzIqfT4Nx/Cp3FNRrSajOkt7kxy6TfkFqBFnI55Rvg558bQ0+frJnijv/YwU3Ctk/+/P+TrLg80ITM67fT44Bya5MtcHcw8awo2LWw1FWn8frLWtD4l6dZkUvjmPTtpMxwNqx7nQJ98OgWYBaXs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5002a.ext.cloudfilter.net ([10.0.29.215]) by cmsmtp with ESMTPS id x7GmqQzEKKOkLxF7aqQEP5; Sun, 29 Oct 2023 23:23:07 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xF7aqlJmzF1O4xF7aq7aq3; Sun, 29 Oct 2023 23:23:06 +0000 X-Authority-Analysis: v=2.4 cv=CcwbWZnl c=1 sm=1 tr=0 ts=653ee95a a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=bhdUkHdE2iEA:10 a=Qbun_eYptAEA:10 a=XJF8YgxpR_xPzUxlkKQA:9 a=QEXdDO2ut3YA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=/jAE6+rF6niFEq63AE45BxX2hZSrHd0OvjZfaztmsjk=; b=VLN4SK5+YCx9Ah4c9gYwr3ONo3 /H06HgpyOw6jDOHTOkUUTMRMUgXPJ7lcrkEC2X8yT0/aK+wvdmfpreq/1KM3Y+ngCb31VpoBDyvNF iKw95i6f8dxCd23U5DL+AI8WK; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:56344 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from <tom@tromey.com>) id 1qxF7Z-0042zY-2v for gdb-patches@sourceware.org; Sun, 29 Oct 2023 17:23:05 -0600 From: Tom Tromey <tom@tromey.com> Date: Sun, 29 Oct 2023 17:23:23 -0600 Subject: [PATCH 02/30] Add block_symbol::address MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231029-split-objfile-2023-bound-sym-october-v1-2-612531df2734@tromey.com> References: <20231029-split-objfile-2023-bound-sym-october-v1-0-612531df2734@tromey.com> In-Reply-To: <20231029-split-objfile-2023-bound-sym-october-v1-0-612531df2734@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 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: 97.122.77.73 X-Source-L: No X-Exim-ID: 1qxF7Z-0042zY-2v X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net ([192.168.0.21]) [97.122.77.73]:56344 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfNBv/sU1/AM3So2Sm6UqiQctXlRBzEKNA1B7Rl9Vye5zUNZssfm/pNgHh2r35nFazrpwGS04+qIhfgGA5lWhyjaLBB1a9P1/2XNuGBTAmMIi/BNnQria UTMSLm8yFoouTcfYoxZNSroS5ZaWVb/jlnpQDLc7e4lnv4h8HXoD9m2VYxqxnIvL+h6tpPaqpfBU88ChQ1yz31wXaFxyFSA6e5Y= X-Spam-Status: No, score=-3024.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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: 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 |
Baby step for objfile splitting
|
|
Commit Message
Tom Tromey
Oct. 29, 2023, 11:23 p.m. UTC
This adds a new block_symbol::address method. The long-term goal here is to change most existing calls to symbol::value_address to call block_symbol::address instead. Then, at some future date, we can add an objfile to block_symbol and change this method to relocate the address when called -- making a symbol independent of the objfile, as we've already done for minimal symbols and partial symbols. --- gdb/block-symbol.h | 2 ++ gdb/symtab.h | 6 ++++++ 2 files changed, 8 insertions(+)
diff --git a/gdb/block-symbol.h b/gdb/block-symbol.h index 35bc40c1986..f7087cf9943 100644 --- a/gdb/block-symbol.h +++ b/gdb/block-symbol.h @@ -34,6 +34,8 @@ struct block_symbol /* If SYMBOL is not NULL, then this is the block in which the symbol is defined. */ const struct block *block; + + CORE_ADDR address () const; }; #endif /* GDB_BLOCK_SYMBOL_H */ diff --git a/gdb/symtab.h b/gdb/symtab.h index 0b3ca3964b6..93cc1f11d08 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1522,6 +1522,12 @@ struct symbol : public general_symbol_info, public allocate_on_obstack CORE_ADDR get_maybe_copied_address () const; }; +inline CORE_ADDR +block_symbol::address () const +{ + return symbol->value_address (); +} + /* Note: There is no accessor macro for symbol.owner because it is "private". */