From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CTrJAxaBt2eNujcAWB0awg (envelope-from ) for ; Thu, 20 Feb 2025 14:23:02 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ad1xQ3Yj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E0E611E105; Thu, 20 Feb 2025 14:23:01 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6DBA71E05C for ; Thu, 20 Feb 2025 14:23:01 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0CCA8385840B for ; Thu, 20 Feb 2025 19:23:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CCA8385840B Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=ad1xQ3Yj Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id CCA143858C42 for ; Thu, 20 Feb 2025 19:22:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCA143858C42 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 CCA143858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740079338; cv=none; b=uCrulUWBU9329mAmuRSloGdrsiOp4PoplxOiXgIp/oGf9YKXAtZ93qoEkL3FOfYLkK6Phhe7cWYKefG33bpwQVvrg4bm2XkIv9X7kFNoe7Nnw65wl0Qd5dqNVgsMTSl8pEafTUj3a7dfQLFnq5WHchJStINlrASn4PwNaYtr2uA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740079338; c=relaxed/simple; bh=vQK100WzYPBHoXTO6NMm6OR5zy8eyNCapvGMelWvZVM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=anIsrMyj48dYzW7fnK3uAPsWOln+TdAkdD+38YcasM8nOlb7BoDvSixHc3VtzHMHsD3nVmWTuztDoTaSZfunee0cDKnm1+mScDJoemZqm4f34Yjg6ApffobO2BIPCMCMdnn3+KNI3ufY9RVyW93pJfyJuIRT3GKPlOQ2ZU1JM8Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CCA143858C42 Received: from eig-obgw-6010a.ext.cloudfilter.net ([10.0.30.248]) by cmsmtp with ESMTPS id l6xCtMUIczZPalC7mtqUfZ; Thu, 20 Feb 2025 19:22:18 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id lC7lt7MvZCQNJlC7ltImJD; Thu, 20 Feb 2025 19:22:17 +0000 X-Authority-Analysis: v=2.4 cv=OJ8h3zaB c=1 sm=1 tr=0 ts=67b780ea a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=T2h4t0Lz3GQA:10 a=ItBw4LHWJt0A:10 a=TDl5R864AAAA:8 a=99WRpiYS9braHsDeINEA:9 a=4IKI_MBedZsHOhguCAbN:22 a=6Ogn3jAGHLSNbaov7Orx: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:Date:References:In-Reply-To :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=SsPlbR7bRrvPg/QBM7rIhg+T+Hwy82+2EEVMMRcsmk8=; b=ad1xQ3Yja0U42LEe6yMEtqIBO3 VqO4Axv4GJIy1cjoa+UOtVywBQ15Wlh9h5jUGxcppRAvQcgSfks+oMkN1aHF5Zo8qE0xR4HFk5UsC 8buidIqjHpWA962bpSCaKeMtv; Received: from 97-118-36-154.hlrn.qwest.net ([97.118.36.154]:47238 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 1tlC7l-002Wof-04; Thu, 20 Feb 2025 12:22:17 -0700 From: Tom Tromey To: Jan Vrany Cc: gdb-patches@sourceware.org Subject: Re: [RFC 2/9] gdb/python: preserve identity for gdb.Symbol objects In-Reply-To: <20250127104435.823519-3-jan.vrany@labware.com> (Jan Vrany's message of "Mon, 27 Jan 2025 10:44:28 +0000") References: <20250127104435.823519-1-jan.vrany@labware.com> <20250127104435.823519-3-jan.vrany@labware.com> X-Attribution: Tom Date: Thu, 20 Feb 2025 12:22:15 -0700 Message-ID: <87tt8oa0bc.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) 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.118.36.154 X-Source-L: No X-Exim-ID: 1tlC7l-002Wof-04 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-118-36-154.hlrn.qwest.net (murgatroyd) [97.118.36.154]:47238 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfFLD/iV5dH+kCYluooSbhfEzkATjv4zLABsP3xbW8pjyj0hKSrZBAV3u/XJGqgPbkXgMlNFQwCBj3f3IZRxWXI7/3K/B+9kc4n1BVc9eEGBrRNvT4cSU ABNiRyZGSOKOVWrpNVSr8TCjGW31FwSIbT4AJwN45apj/k8OO5MvwkrRkkBDQaXinwIEdHJfW9/P5zJYllQitN16+QTH4C8OHuc= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Jan" == Jan Vrany writes: Jan> This commit changes symbol_to_symbol_object() so that each it is called Jan> with a particular struct symbol * it returns the very same gdb.Symbol Jan> object. Jan> + /* Can it really happen that symbol->symtab () is NULL? */ FWIW this is a classic sort of question in gdb and perhaps no one knows the answer. Jan> + return (PyObject*)sym_obj; Spaces. Jan> + else Jan> + { Jan> + sympy_gdbarch_data_key.set (sym_obj->symbol->arch (), Jan> + sym_obj->next); Jan> + } Over-bracing. Tom