From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id C1D2F3858D35 for ; Tue, 16 Apr 2024 23:10:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C1D2F3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C1D2F3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713309053; cv=none; b=pqkwLmbfn2pDkhawivV9gi3HY0qTUsmn4J07oGbIMLaWrOeyYIz5E45rKOXLGgYM19nfAlA4tm4GCzUXnKd0k7fmcIiD5FsQN29amXO0JNScPUtS9tKX2uq2EmBtxQTf8bv3u6FIdMWFFXY4kDc0gsUs+kKPK3DTvRRfg5n6wig= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713309053; c=relaxed/simple; bh=7fI2WPoxesWlRjYeKxLTUnQKlKY4FoovIGLGx60emXA=; h=DKIM-Signature:Subject:To:From:Message-ID:Date:MIME-Version; b=qIJHRT+GHFGjgxHALrt1/sASo0Ph5FYMgDUHQVjAjOe2dd+JEFdfem4JQC9E+tyIo3XNwxwvg9h1Oam4yRIvYhv4RX9GkDSl7Q/X7Je4ScigGYgRrY+qvZOoEPTUag18MkTLmtKtbgouo07CrSc824HvwTnqWWDG/rohEa3ae6k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6ecf406551aso4062646b3a.2 for ; Tue, 16 Apr 2024 16:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713309050; x=1713913850; darn=sourceware.org; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=JZJ8I+W3xHEHDNO98Ql00wsL/X+kxplWJaQAiUjwpNw=; b=Gw5RDExzmsDE3r31gcCrVl4R/fLW7qQyFTO7SAqqTnBboSZB3bsXZ2GnT56wpfRJS9 Df0kNbaXu+aGpg5Z2ht6oN9iTcE6n1AamU+wSTUQ3Cug1M6gWJL4xldrCi1+1Mo+0jtQ muEpZPaLs0i0y3Jvp0nzW7w6TwjA5J25tNLUl7vE+Ued1iQgJ4A4YUIqkt9khv2wnta5 ks+hduuMzqCT8sYuZLsPN3wVo2WaHHdcsHtNazKz1I0btd/8SUXjdBtFaqMcNce6JVR0 JZJr92JJmECvq2FRFOgRZ5ZscEcpPud9cAP5G2nf57+2wIdymcg2PRkb6V3MoKzl7Jyn /jpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713309050; x=1713913850; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JZJ8I+W3xHEHDNO98Ql00wsL/X+kxplWJaQAiUjwpNw=; b=TVrTVaz2p3rOPWXIGl+DVYt0LUw/AfDrRezJeK+m2XaRXzhS54j4XA5h+PPTaR+6/S trWmektAX+0jfT9G6HAbtO7OOrkgu+nNnAeJxflWJz0VS9CgdaZNzgDhlqW/aPlRoFGO PaPQoCTbbEbEgFQhksC7Ir9zwpg6iTrSkhlbZyX1YkxeyeH+eY90qy/gMZ406eq/hEo0 Hv42U97mr6kERlw6SKeRIS8MTy3QdHsFHEXrH/VtslGbpUVm5x6+p8120J6KOT+vksDa h6c8/jC2dhxMlOmjyHZl5Ko1A4pS1kAS72kHRlHRLyqaNlzOyww5cf7G7wBwF37N4J2i 8frQ== X-Gm-Message-State: AOJu0YyGJO+rEL2goexNxlNgQv8ZDXzNLegO///HW+HcodMZyzZXAVx/ 0t1ro8bgWjD7+xJs5h7I+nMDhfURPrpbdPw+m6yK3X1aeB5LV6JV+nue02u2kHg= X-Google-Smtp-Source: AGHT+IFrcyu18Uq7znGA8rTPwsMJu5ZWbGaNsNFm6kf3HluCGjYax0LJHDPvc3ZTB8hnMfBr6ToGqw== X-Received: by 2002:a05:6a20:409c:b0:1a7:a435:1388 with SMTP id a28-20020a056a20409c00b001a7a4351388mr11262354pzf.49.1713309049739; Tue, 16 Apr 2024 16:10:49 -0700 (PDT) Received: from [192.168.0.102] ([177.139.3.230]) by smtp.gmail.com with ESMTPSA id k27-20020a635a5b000000b005f75f325db4sm4073175pgm.29.2024.04.16.16.10.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Apr 2024 16:10:47 -0700 (PDT) Subject: Re: [PATCH v4 8/8] gdb: Document qIsAddressTagged packet To: Eli Zaretskii Cc: gdb-patches@sourceware.org, luis.machado@arm.com, thiago.bauermann@linaro.org, tom@tromey.com References: <20240416140728.198163-1-gustavo.romero@linaro.org> <20240416140728.198163-9-gustavo.romero@linaro.org> <86y19didft.fsf@gnu.org> From: Gustavo Romero Message-ID: Date: Tue, 16 Apr 2024 20:10:43 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <86y19didft.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 List-Id: Hi Eli, Thanks a lot for the review. I just have one question. On 4/16/24 11:34 AM, Eli Zaretskii wrote: >> From: Gustavo Romero >> Cc: luis.machado@arm.com, >> thiago.bauermann@linaro.org, >> eliz@gnu.org, >> tom@tromey.com, >> gustavo.romero@linaro.org >> Date: Tue, 16 Apr 2024 14:07:28 +0000 >> >> This commit documents the qIsAddressTagged packet. > > Thanks. > >> diff --git a/gdb/NEWS b/gdb/NEWS >> index feb3a37393a..1693a7a15f8 100644 >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -192,6 +192,16 @@ QThreadOptions in qSupported >> QThreadOptions packet, and the qSupported response can contain the >> set of thread options the remote stub supports. >> >> +qIsAddressTagged >> + This new packet allows GDB to query the stub about a given address to check >> + if it is tagged or not. Many memory tagging-related GDB commands need to >> + perform this check before they read/write the allocation tag related to an >> + address. Currently, however, this is done through a 'vFile' request to read >> + the file /proc//smaps and check if the address is in a region reported >> + as memory tagged. Since not all targets have a notion of what the smaps >> + file is about, this new packet provides a more generic way to perform such >> + a check. >> + >> *** Changes in GDB 14 > > This part is okay. > >> +@item qIsAddressTagged:@var{address} >> +@cindex check if a given address is in a memory tagged region. > ^ > Index entries should not end in a period. > >> +Check if address @var{address} is in a memory tagged region; if it is, it's >> +said to be tagged. The target is responsible for checking it, as this is > > I suggest to use @dfn{tagged}, since this is new terminology. It will > then look nicer in print (and will be quoted in Info). > >> +@item @var{01} >> +Address @var{address} is tagged. >> + >> +@item @var{00} >> +Address @var{address} is not tagged. > > I think 01 and 00 should not be in @var here, since they are literal > strings. The @samp markup of the @table will do here. > >> +@item E @var{nn} >> +An error occurred. This means that address could not be checked for some >> +reason. > > Here "nn" is the error value, right? If so, I suggest to say > > @item E @var{nn} > An error occurred whose code is @var{nn}. Do you mean remove the "This means that address could not be checked for some reason." text completely or just s/An error occurred/An error occurred whose code is @var{nn}/? I'd like to keep the text because the error codes actually don't tell much about the reason of the error -- usually -- in this context, so I'd like to inform users that in any case the address could not be checked if an error (any error) occurs. For example, in the gdbserver we can find comments like: gdbserver/remote-utils.cc-1020-void gdbserver/remote-utils.cc-1021-write_enn (char *buf) gdbserver/remote-utils.cc-1022-{ gdbserver/remote-utils.cc:1023: /* Some day, we should define the meanings of the error codes... */ gdbserver/remote-utils.cc-1024- buf[0] = 'E'; gdbserver/remote-utils.cc-1025- buf[1] = '0'; gdbserver/remote-utils.cc-1026- buf[2] = '1'; gdbserver/remote-utils.cc-1027- buf[3] = '\0'; gdbserver/remote-utils.cc-1028-} Cheers, Gustavo