Message ID | 20231029-split-objfile-2023-bound-sym-october-v1-5-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 819A938323D2 for <patchwork@sourceware.org>; Sun, 29 Oct 2023 23:23:50 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta34.uswest2.a.cloudfilter.net (omta34.uswest2.a.cloudfilter.net [35.89.44.33]) by sourceware.org (Postfix) with ESMTPS id A72D538618EE for <gdb-patches@sourceware.org>; Sun, 29 Oct 2023 23:23:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A72D538618EE 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 A72D538618EE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698621791; cv=none; b=AS+afn25C6Jn8AsJRemouMglbgWZUR5f2PJcQ1ydT8sSZLFLh/XSKZr3+xSfzuSN92/TEXenlbwD8Q4egpUR2EhjyAViHfnEdOUiQ4CewEUUzkpCBv2K07qgEDqDNyZS/X4nbFRPaK0mVUFC9pcm2uZ8IxwFiP9aVT7aBl4a31c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698621791; c=relaxed/simple; bh=i5k1hsq+nkHDy8XlWqkC4gWtufrEfN7G4WVOTRolHk8=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=cMAJtknWXW350gpM9LI56ezz97i1zU4kCxLj4Ksrq42fXakAZlVEmmlLno7rPrMh3fof0z8vskZ9HONdPa/xFLLNx0oS1ytDpEJvi+Uic16QmkScEbVQp5ftG+QUvCLgh1wmUjvc1NJ853XIFY5aJLSaQ94rf2xdYwUYQv8rLr8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-6003a.ext.cloudfilter.net ([10.0.30.151]) by cmsmtp with ESMTPS id x3H1qn6Bp8HtexF7bqEXdp; Sun, 29 Oct 2023 23:23:07 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xF7aqJcdyRqxCxF7aqwDvY; Sun, 29 Oct 2023 23:23:06 +0000 X-Authority-Analysis: v=2.4 cv=IY2U5Ema 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=gNE060aIARCBDlep2ecA: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=17ebomy6i7NsO+YMiVzibIm1LLCmUAwjqtix/Vw2gK0=; b=OLHXWxNeDiIQgbi7SOOxv20erg wVWSBXqGkv1GC8b5nRaqV2buLsntuEDAqy2z+Tofrw84/rTCZEohNTq1GPcyV00zJzs9aP+kRjpZ3 v7fKE4h4EFnsqZal3l23lmPzp; 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 1qxF7a-0042zY-13 for gdb-patches@sourceware.org; Sun, 29 Oct 2023 17:23:06 -0600 From: Tom Tromey <tom@tromey.com> Date: Sun, 29 Oct 2023 17:23:26 -0600 Subject: [PATCH 05/30] Use block_symbol::address in printcmd.c 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-5-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: 1qxF7a-0042zY-13 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: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfMyh2mfhBgQXJ7zqpjV0lmTxzZnBmBFsHwDhpzCmUT2cpKOrwQc7xTYxr7brbVcqNcN6ajEetr02SP5ogEtCsGoGy+yuREg47CHJN0oH7oFWA2eWkOnv js4ixJPOtaSNh4yafsuZkpUJD1+QTRS9bxAnOGNAcy/3cNKy8LiEym6AUNaiUVlDsa/T3trhlUfFHO3/gerrlTMHgd2HRzmCSBI= 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 changes printcmd.c to use block_symbol::address. --- gdb/printcmd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Comments
On 2023-10-29 19:23, Tom Tromey wrote: > This changes printcmd.c to use block_symbol::address. > --- > gdb/printcmd.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/gdb/printcmd.c b/gdb/printcmd.c > index b9b6a3b8648..94ce5113e06 100644 > --- a/gdb/printcmd.c > +++ b/gdb/printcmd.c > @@ -1647,8 +1647,10 @@ info_address_command (const char *exp, int from_tty) > if (exp == 0) > error (_("Argument required.")); > > - sym = lookup_symbol (exp, get_selected_block (&context_pc), VAR_DOMAIN, > - &is_a_field_of_this).symbol; > + block_symbol bsym = lookup_symbol (exp, get_selected_block (&context_pc), > + VAR_DOMAIN, > + &is_a_field_of_this); > + sym = bsym.symbol; I would suggest moving the declaration of sym there. Simon
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes: >> - sym = lookup_symbol (exp, get_selected_block (&context_pc), VAR_DOMAIN, >> - &is_a_field_of_this).symbol; >> + block_symbol bsym = lookup_symbol (exp, get_selected_block (&context_pc), >> + VAR_DOMAIN, >> + &is_a_field_of_this); >> + sym = bsym.symbol; Simon> I would suggest moving the declaration of sym there. I did this. Tom
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index b9b6a3b8648..94ce5113e06 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1647,8 +1647,10 @@ info_address_command (const char *exp, int from_tty) if (exp == 0) error (_("Argument required.")); - sym = lookup_symbol (exp, get_selected_block (&context_pc), VAR_DOMAIN, - &is_a_field_of_this).symbol; + block_symbol bsym = lookup_symbol (exp, get_selected_block (&context_pc), + VAR_DOMAIN, + &is_a_field_of_this); + sym = bsym.symbol; if (sym == NULL) { if (is_a_field_of_this.type != NULL) @@ -1725,7 +1727,7 @@ info_address_command (const char *exp, int from_tty) case LOC_LABEL: gdb_printf ("a label at address "); - load_addr = sym->value_address (); + load_addr = bsym.address (); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); if (section_is_overlay (section)) @@ -1761,7 +1763,7 @@ info_address_command (const char *exp, int from_tty) case LOC_STATIC: gdb_printf (_("static storage at address ")); - load_addr = sym->value_address (); + load_addr = bsym.address (); fputs_styled (paddress (gdbarch, load_addr), address_style.style (), gdb_stdout); if (section_is_overlay (section))