From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 368253858D20 for ; Fri, 20 Oct 2023 17:29:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 368253858D20 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 368253858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697822969; cv=none; b=pEuC9cE33zg1LVzwjBE+4JwMkoLS+G77x03JQXWmLApdjMCNphiXocyaZE5pewKP00FxK+9CnK438F61PzCadGn8gQnujGxvmAs7EnBnJm8Ye9ZHkq7cUFRv7wl+C42oooFuQCkRHAMFRROkLrRxrAxZCvE3Sdc9gzlMoezQkno= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697822969; c=relaxed/simple; bh=F03u6kHMJKtnL4atPYw0DUhhNKiNkT5XabpxXaEdZk8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HBGqfTTy2YTLyaUNavi/GH71XusEh0/cee7OKrt83J41iRH5Rx5GmzxdcIK4FY8+iVhxxDnDz0/m4UiTboAMdF9ulg/NxbbmTFMSSyLJzmcUcIKgnU1wYrJnj/Sbp/iEAEeHfZuDqTCFrRQv1NpGg+syLJiJgLjf4IJI4TLb+vE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5001a.ext.cloudfilter.net ([10.0.29.139]) by cmsmtp with ESMTPS id tt8QqTMG0WcCIttJPqOOho; Fri, 20 Oct 2023 17:29:27 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id ttJPqxiTyTbebttJPqSw1f; Fri, 20 Oct 2023 17:29:27 +0000 X-Authority-Analysis: v=2.4 cv=E8LeGIRl c=1 sm=1 tr=0 ts=6532b8f7 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=bhdUkHdE2iEA:10 a=Qbun_eYptAEA:10 a=_ZhYKdCeAAAA:8 a=zstS-IiYAAAA:8 a=hF371GK8nbntUCwV6CAA:9 a=zZCYzV9kfG8A:10 a=uqOk3ZSnBfCTOznnrPA1:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: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=xrBfx5VOI3Xtblxh2BmXFi3e1pqiOzk1qifuOAjHMjE=; b=imYVKbD8BV0APvmnh3Tb4Nr1pY hjxqvXLSrJ2CEPlQ/pwD/e2WZ4kkmkAPJqCPfaxbdWQhU2aroaRaSLldujw21tc6KsqLC6DcbaXOq usl6Xfa9FH2uiPNHFcaDapXgQ; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:52964 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1qttJO-0011ox-2b; Fri, 20 Oct 2023 11:29:26 -0600 From: Tom Tromey To: Simon Marchi Cc: gdb-patches@sourceware.org, Simon Marchi Subject: Re: [PATCH v2] gdb: fix owner passed to remove_target_sections in clear_solib References: <20231020033231.1261222-1-simon.marchi@polymtl.ca> X-Attribution: Tom Date: Fri, 20 Oct 2023 11:29:25 -0600 In-Reply-To: <20231020033231.1261222-1-simon.marchi@polymtl.ca> (Simon Marchi's message of "Thu, 19 Oct 2023 23:31:19 -0400") Message-ID: <87fs25p5hm.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 1qttJO-0011ox-2b X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net (murgatroyd) [97.122.77.73]:52964 X-Source-Auth: tom+tromey.com X-Email-Count: 11 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfAjx+0igERmGmx6+8c4xb/685q6r6f9Ivu3oeQAuh3i/4sef2gye+SYvYmu/+WzhvCs1agdmfzDZvXW8ZPi+frcN1ihfjS9Oc/tIqF0YNCK5xYL1KPz5 3W1DNavqgzcdDP0l+qBCC4Pdhll/Fv40H0mJoMzA4u456lLlRgWiXSbt9Q2fZCx9d4LMlmoKcgpXaOouEbbfX5azaTnSCtmJppk= X-Spam-Status: No, score=-3017.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_NONE,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 List-Id: >>>>> "Simon" == Simon Marchi writes: Simon> Fix that, but try to make things less error prone. Make the current Simon> add_target_sections and remove_target_sections methods of program_space Simon> private, and add wrappers that are typed, with the types we expect Simon> (bfd *, objfile *, so_list *). Perhaps there is a more elegant way to Simon> do this, but I think that this is already better / safer than what we Simon> have, as it would have caught my mistake. Thank you for doing this. I think the approach you've taken is a good improvement over the status quo. IIRC I wrote the current code back in the C days, when overloading was more of a pain. Simon> - Rename private methods (suffix with `_1`) to avoid using them by Simon> mistake C++ doesn't mean freedom from the _1 stuff :) But it seems fine anyway, it's a private method. Approved-By: Tom Tromey Tom