diff options
author | Gustavo Romero <gustavo.romero@linaro.org> | 2024-04-18 20:10:32 +0000 |
---|---|---|
committer | Luis Machado <luis.machado@arm.com> | 2024-04-19 15:29:39 +0100 |
commit | 75606e5e8de136a1ad217e53ce5943a91d5ea424 (patch) | |
tree | e77190d50902f7b491a0a63dea9fbb09732db08c /ar-lib | |
parent | 9cf3c87e166b2f3728ae5c50c501f64f385e349e (diff) | |
download | gdb-75606e5e8de136a1ad217e53ce5943a91d5ea424.zip gdb-75606e5e8de136a1ad217e53ce5943a91d5ea424.tar.gz gdb-75606e5e8de136a1ad217e53ce5943a91d5ea424.tar.bz2 |
gdb: aarch64: Remove MTE address checking from get_memtag
This commit removes aarch64_linux_tagged_address_p from
aarch64_linux_get_memtag. aarch64_linux_tagged_address_p checks if an
address is tagged (MTE) or not.
The check is redundant because aarch64_linux_get_memtag is always called
from the upper layers (i.e. from printcmd.c via gdbarch hook
gdbarch_get_memtag) after either gdbarch_tagged_address_p (that already
points to aarch64_linux_tagged_address_p) has been called or
after should_validate_memtags (that calls gdbarch_tagged_address_p at
the end) has been called, so the address is already checked. Hence:
a) in print_command_1, aarch64_linux_get_memtag (via gdbarch_get_memtag
hook) is called but only after should_validate_memtags, which calls
gdbarch_tagged_address_p;
b) in do_examine, aarch64_linux_get_memtag is also called only after
gdbarch_tagged_address_p is directly called;
c) in memory_tag_check_command, gdbarch_get_memtag is called -- tags
matching or not -- after the initial check via direct call to
gdbarch_tagged_address_p;
d) in memory_tag_print_tag_command, address is checked directly via
gdbarch_tagged_address_p before gdbarch_get_memtag is called.
Also, because after this change the address checking only happens at the
upper layer it now allows the address checking to be specialized easily
per target, via a target hook.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Approved-By: Luis Machado <luis.machado@arm.com>
Tested-By: Luis Machado <luis.machado@arm.com>
Diffstat (limited to 'ar-lib')
0 files changed, 0 insertions, 0 deletions