From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6VUyCnJ661+TawAAWB0awg (envelope-from ) for ; Tue, 29 Dec 2020 13:50:26 -0500 Received: by simark.ca (Postfix, from userid 112) id 1B1B51F0AA; Tue, 29 Dec 2020 13:50:26 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED 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 622E51E965 for ; Tue, 29 Dec 2020 13:50:25 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA711388A41D; Tue, 29 Dec 2020 18:50:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA711388A41D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609267824; bh=jgd5HWvNgGsMSMe+7jrJTJa7v3h8LXMOzO+ipAC8Yg8=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UYBNkRV8x2wc+APxaVI1TVhEAyN21gyx+BwgQHBf2a7nM57cFvCKdqKgtqUzM4DRE H8FYdAmFGKyQm8Y1eYM1N1ujcovDCCDPftnDL9nttgKbK0J6a0L3r/m5f0OT0SBfJw /xV8BLP0NaBmqnSTj/Tau3bPAkmA5KNNexbd105g= Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by sourceware.org (Postfix) with ESMTPS id 45FB33851C0D for ; Tue, 29 Dec 2020 18:50:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 45FB33851C0D Received: by mail-qk1-x729.google.com with SMTP id b64so12098269qkc.12 for ; Tue, 29 Dec 2020 10:50:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jgd5HWvNgGsMSMe+7jrJTJa7v3h8LXMOzO+ipAC8Yg8=; b=Apd0BisymQttyvhBiiOaMIyeeG4LZuwLWSFQwjCI/mpZi3dgBa15uQRXn8Iw4uG5C3 vFg+TfJ12UztG57SappTmKlo9QLEYYqun/szJf6qtMaZUWFXSWKwn9ArgxJGuRXcs4H1 HXK7FvcEhmphPjomRao4N7qF5q6p+iEBn2FA0+SzdTEDKaUa3nNODJ6v4V8f22+aR7E2 awtotdsjeteOZe5AIabk+oc/8zsAoeYsza3yT6vIDc6oc38C1+IIVN2NgQE0uzuS9Aap DxgADoxj7+NDrmWO6rbCkZSQKwEK+nuN+9goY3q0EF8p63nUu4MvuXPRV0QPspfEGHrV MEHQ== X-Gm-Message-State: AOAM530nTfkjCGFnCab+vSGk81mRuSeSgt5mRCp3dXf+J7xHgg72tP/h rzdbNfwGqLwUg3/WyUaSEZzTmg== X-Google-Smtp-Source: ABdhPJz8LPrjpyS1+eKbwXlqezg0S/xiKQnPLs31Ztyhc4h6zKpmBvkBODMZ17lNEdf6pvPLL9mlfA== X-Received: by 2002:a05:620a:22ab:: with SMTP id p11mr50118407qkh.237.1609267821910; Tue, 29 Dec 2020 10:50:21 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:370e:891:588d:2ac2:dc7e? ([2804:7f0:8284:370e:891:588d:2ac2:dc7e]) by smtp.gmail.com with ESMTPSA id c139sm25022660qke.24.2020.12.29.10.50.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 10:50:21 -0800 (PST) Subject: Re: [PATCH v3 21/24] Extend "x" and "print" commands to support memory tagging To: Simon Marchi , gdb-patches@sourceware.org References: <20201109170435.15766-1-luis.machado@linaro.org> <20201109170435.15766-22-luis.machado@linaro.org> <19b87dc2-9192-c5d5-9534-b21d747e7e8c@polymtl.ca> Message-ID: <6e10ecee-e09f-70a2-f388-e7767e4fdd88@linaro.org> Date: Tue, 29 Dec 2020 15:50:18 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <19b87dc2-9192-c5d5-9534-b21d747e7e8c@polymtl.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Cc: david.spickett@linaro.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/27/20 1:18 AM, Simon Marchi wrote: > On 2020-11-09 12:04 p.m., Luis Machado via Gdb-patches wrote: >> The "print" command will point out any possible tag mismatches it finds >> when dealing with pointers, in case such a pointer is tagged. No additional >> modifiers are needed. >> >> 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 > > Should there be an option to print to enable/disable this behavior? > Something like "print -memory-tags-violations ", and a > corresponding "set print memory-tags-violations "? The switch that controls this is the one that enables/disables memory tagging. It controls both the print command behavior and the "x" command behavior. Do you think we should have a command for each individual command? > > Simon >