From: Gustavo Romero <gustavo.romero@linaro.org>
To: Luis Machado <luis.machado@arm.com>,
Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 4/4] gdb: Add new remote packet to check if address is tagged
Date: Wed, 3 Apr 2024 13:39:28 -0300 [thread overview]
Message-ID: <99d1b18f-7581-d754-29af-a0d3d4cfee18@linaro.org> (raw)
In-Reply-To: <9be4c93e-6f02-4171-8dcd-ed262ffc6d69@arm.com>
Hi Thiago, Luis
On 4/3/24 11:04 AM, Luis Machado wrote:
> On 3/30/24 03:08, Thiago Jung Bauermann wrote:
>>
>> Just one more suggestion that occurred to me later:
>>
>> Gustavo Romero <gustavo.romero@linaro.org> writes:
>>
>>> For supporting the new packet, a new target hook is introduced,
>>> check_memtag_addr, which is used instead of the gdbarch_tagged_address_p
>>> gdbarch hook in the upper layers (printcmd.c).
>>
>> "check_memtag_addr" is a bit vague: what does it check? This confused me
>> a bit when I was reading the code with these patches
>> applied. Alternatives I can think of are "is_addr_tagged", or
>> "tagged_address_p".
>
> That last bit seems more in line with the gdb terminology. A target took "tagged_address_p" or "target_is_address_tagged" should be a bit more clear.
>
> Plus we have precedent in the target hooks is_async_p, can_async_p, always_non_stop_p etc.
>
>>
>> I'm not too fond of the "_p" suffix, but it has the advantage of being
>> consistent with the existing gdbarch hook so it may be preferable in
>> this case.
So, I really thought of something like the is_address_tagged at first,
without the _p suffix because I thought this suffix would be present
only in gdbarch hooks, not in the target hooks, but that seems not right,
which is still a bit confusing to me tbh, because I have this in mind:
/* MTE-specific settings and hooks. */
if (tdep->has_mte ())
{
/* Register a hook for checking if an address is tagged or not. */
set_gdbarch_tagged_address_p (gdbarch, aarch64_linux_tagged_address_p);
which I understand that functions with _p would be the functions to be
set as the hooks for the gdbarch hooks only, using the set_gdbarch_*
"API" functions. That, afaics, doesn't happen for the target hooks, like
is_async_p, which is never explicitly set to any hook using a set_* function
(so I'm also not fond of the _p in the is_async_p case too).
Anyways, I'm going for "target_is_address_tagged", which I think is the
clearest option and we all seem to agree on it :) Thanks!
Cheers,
Gustavo
next prev parent reply other threads:[~2024-04-03 16:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 22:48 [PATCH v2 0/4] Add another way to check for MTE-tagged addresses on remote targets Gustavo Romero
2024-03-28 22:48 ` [PATCH v2 1/4] gdb: aarch64: Remove MTE address checking from get_memtag Gustavo Romero
2024-03-30 0:37 ` Thiago Jung Bauermann
2024-03-30 0:55 ` Thiago Jung Bauermann
2024-04-04 5:15 ` Gustavo Romero
2024-03-28 22:48 ` [PATCH v2 2/4] gdb: aarch64: Move MTE address check out of set_memtag Gustavo Romero
2024-03-30 0:47 ` Thiago Jung Bauermann
2024-04-04 5:25 ` Gustavo Romero
2024-04-06 1:55 ` Thiago Jung Bauermann
2024-03-28 22:48 ` [PATCH v2 3/4] gdb: aarch64: Remove MTE address checking from memtag_matches_p Gustavo Romero
2024-03-30 2:53 ` Thiago Jung Bauermann
2024-03-28 22:48 ` [PATCH v2 4/4] gdb: Add new remote packet to check if address is tagged Gustavo Romero
2024-03-29 23:35 ` Thiago Jung Bauermann
2024-04-04 5:32 ` Gustavo Romero
2024-03-30 3:08 ` Thiago Jung Bauermann
2024-04-03 14:04 ` Luis Machado
2024-04-03 16:39 ` Gustavo Romero [this message]
2024-04-03 11:51 ` [PATCH v2 0/4] Add another way to check for MTE-tagged addresses on remote targets Luis Machado
2024-04-03 14:29 ` Gustavo Romero
2024-04-03 14:39 ` Luis Machado
2024-04-04 5:35 ` Gustavo Romero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=99d1b18f-7581-d754-29af-a0d3d4cfee18@linaro.org \
--to=gustavo.romero@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@arm.com \
--cc=thiago.bauermann@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox