From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KU1JCSsfmF9NRAAAWB0awg (envelope-from ) for ; Tue, 27 Oct 2020 09:22:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 15D2C1EFBB; Tue, 27 Oct 2020 09:22:51 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from 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 RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 759C21E590 for ; Tue, 27 Oct 2020 09:22:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD7BE389701A; Tue, 27 Oct 2020 13:22:49 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id B1ED13951868 for ; Tue, 27 Oct 2020 13:22:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B1ED13951868 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5B3FC1E590; Tue, 27 Oct 2020 09:22:47 -0400 (EDT) Subject: Re: [PATCH v2 01/24] New target methods for memory tagging support To: Luis Machado , gdb-patches@sourceware.org References: <20201022200014.5189-1-luis.machado@linaro.org> <20201022200014.5189-2-luis.machado@linaro.org> From: Simon Marchi Message-ID: <89a1dc1c-75c0-5098-acf0-5f647df5a766@simark.ca> Date: Tue, 27 Oct 2020 09:22:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201022200014.5189-2-luis.machado@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: david.spickett@linaro.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-10-22 3:59 p.m., Luis Machado via Gdb-patches wrote: > diff --git a/gdb/target.h b/gdb/target.h > index 039194c239..80f9b1ee92 100644 > --- a/gdb/target.h > +++ b/gdb/target.h > @@ -1260,6 +1260,22 @@ struct target_ops > /* Cleanup after generating a core file. */ > virtual void done_generating_core () > TARGET_DEFAULT_IGNORE (); > + > + /* Returns true if the target supports memory tagging. */ > + virtual bool supports_memory_tagging () > + TARGET_DEFAULT_RETURN (false); > + > + /* Return the allocated memory tags of type TYPE associated with > + [ADDRESS, ADDRESS + LEN) in TAGS. */ > + virtual int fetch_memtags (CORE_ADDR address, size_t len, > + gdb::byte_vector &tags, int type) > + TARGET_DEFAULT_IGNORE (); > + > + /* Write the allocation tags of type TYPE contained in TAGS to the memory > + range [ADDRESS, ADDRESS + LEN). */ > + virtual int store_memtags (CORE_ADDR address, size_t len, > + const gdb::byte_vector &tags, int type) > + TARGET_DEFAULT_IGNORE (); Could you precise the comment for fetch_memtags and store_memtags? It's not clear to me what the tags vector contains. Will it be of length LEN, with each element containing the tag of the matching memory location in [ADDRESS, ADDRESS + LEN)? Also, what does the return values mean? Simon