From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MoajHwx5qV9fcQAAWB0awg (envelope-from ) for ; Mon, 09 Nov 2020 12:14:52 -0500 Received: by simark.ca (Postfix, from userid 112) id 73A0E1F08B; Mon, 9 Nov 2020 12:14:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [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 263141E552 for ; Mon, 9 Nov 2020 12:14:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CFC57386185A; Mon, 9 Nov 2020 17:14:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFC57386185A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604942091; bh=yNjUoljwfxrZHOI09Yd59aYPCZqqZiFnsRP4cHZzLtE=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ri78dMRByEbjPXKxCwiBbEcgpfnqjpj6p2ZlYSLwP8LkWBN/zKuzJA4QUVBPer3qd 9AgesEF1/SLgN5IhlqaTjD2x8Nbn7yARuf2/xHvm4nRyewUhnOY60bwTOGnhaktWg1 Kzm7eXSO7jG9+4awifguBOMZClxybACBB3kzl/04= Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id E2219386185A for ; Mon, 9 Nov 2020 17:14:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E2219386185A Received: from fencepost.gnu.org ([2001:470:142:3::e]:47779) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcAki-0000w8-5G; Mon, 09 Nov 2020 12:14:48 -0500 Received: from [176.228.60.248] (port=1626 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kcAkg-0005Mm-Ra; Mon, 09 Nov 2020 12:14:47 -0500 Date: Mon, 09 Nov 2020 19:14:54 +0200 Message-Id: <83d00m4fld.fsf@gnu.org> To: Luis Machado In-Reply-To: <20201109170435.15766-22-luis.machado@linaro.org> (message from Luis Machado via Gdb-patches on Mon, 9 Nov 2020 14:04:32 -0300) Subject: Re: [PATCH v3 21/24] Extend "x" and "print" commands to support memory tagging References: <20201109170435.15766-1-luis.machado@linaro.org> <20201109170435.15766-22-luis.machado@linaro.org> 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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: david.spickett@linaro.org, gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > Date: Mon, 9 Nov 2020 14:04:32 -0300 > From: Luis Machado via Gdb-patches > Cc: david.spickett@linaro.org > > Suppose we have a pointer "p" with value 0x1234 (logical tag 0x0) and that we > have an allocation tag of 0x1 for that particular area of memory. This is the > expected output: > > (gdb) p/x p > Logical tag (0x0) does not match the allocation tag (0x1). > $1 = 0x1234 If the tags did match, GDB would have also printed the contents of the memory pointed to by p, right? At least with pointer to 'char *' strings it would. Does GDB still print the contents if the tags don't match? If it doesn't, it should say something like "Cannot access memory at NNNN: logical tag doesn't match".