From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sH8BJCkHsWasFT0AWB0awg (envelope-from ) for ; Mon, 05 Aug 2024 13:08:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1722877737; bh=zofUKN3cUlALR4W4xxsSk77SjwxbxBnvsFOqns6nfPw=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DtpOAQHyMdeYUBKvh8JK25eKd7P9dLrVmgvMRcJ9lZr/OTZUifjpXizwDY/U7RnNZ fdvlZmAaXKFPF1l/cCyl7VwQX6IDH3qo6mG9Qtm2wzYeOfyITon6/uD/oxWtAWjr1/ Zq3rtYJ0GMZWKgA5FZBEME2gO02EFVzG5Iu9fAjw= Received: by simark.ca (Postfix, from userid 112) id 8DA9B1E0D0; Mon, 5 Aug 2024 13:08:57 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=NM+hlpxq; dkim-atps=neutral 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 6E71D1E08C for ; Mon, 5 Aug 2024 13:08:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2B63D3857C4F for ; Mon, 5 Aug 2024 17:08:55 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 73B66385840F for ; Mon, 5 Aug 2024 17:08:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73B66385840F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 73B66385840F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722877718; cv=none; b=syovSOSh5Y5C3wt/fCWD6uRFc6P2BZnZ/mx472nWekUI6lydWe8STx0Kq5BmSEe1n272iitX46AEeGfbfVqk7oZV4VLlKBsktP4m5WU9oOD6kfeinCYb9CfkKthY0d5EORch2ju7Q356EQAULef7s90WfDep57UC3ZJ2UbL8cpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722877718; c=relaxed/simple; bh=zofUKN3cUlALR4W4xxsSk77SjwxbxBnvsFOqns6nfPw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=tOFWimmXPCfhw4Q3GXKLyEgoHBY/FhQsa9oImtaWaL3mf4fBnH9G9q1ECANFgPDYIUj0W434ohU92tDDSGG2knMTIYIjo0S3AGliaRmAaFSqIyIZNwdIbZdDB3eTC7JIa2Yv/y6SePP5MLsc1zSRuA4Ru91tVAXL15leJ13JQao= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1722877716; bh=zofUKN3cUlALR4W4xxsSk77SjwxbxBnvsFOqns6nfPw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=NM+hlpxqRvB1v8pTWPPvRFR57KEUl1KCVpTf0+Kz64Tt2eNPlRYSRRRICZsR1OSds bmPbkarf5l53q5CieCGpFNbr6/7VZjIL70XIN8dXUCnX8XUQ5lqJMj9hbizjWKmUZw hPxBdCOdDqG6WO/eiiE2AqmBG5I7I5swgKlUehdE= Received: from [10.0.0.170] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id DD5AC1E08C; Mon, 5 Aug 2024 13:08:35 -0400 (EDT) Message-ID: Date: Mon, 5 Aug 2024 13:08:35 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PING][PATCH] [gdb/tdep] Use cached breakpoint kind in breakpoint_kind To: Tom de Vries , gdb-patches@sourceware.org References: <20240607143821.29797-1-tdevries@suse.de> <5188e7e4-5d7b-4d9a-b81b-9393d7b2ff77@suse.de> <69569020-ae82-40c5-aad6-9a90099947db@suse.de> Content-Language: fr From: Simon Marchi In-Reply-To: <69569020-ae82-40c5-aad6-9a90099947db@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 8/5/24 12:00 PM, Tom de Vries wrote: > I've given this patch some more thought, and I think I have come up > with a counter example. > > Say you have a breakpoint kind that is different depending on the > alignment, one kind for "addr & 0x4 == 0x0" and another kind for "addr > & 0x4 == 0x2". > > Then when relocating the exec, the kind might change, but due to the > caching introduced by this patch, we might be incorrectly using the > same kind as before the relocation. Did you see this kind of relocation in practice? Typically, executables get relocated with an offset that is a multiple of the page size, or something big like that, so it wouldn't affect alignment in such way. Simon