+2021-06-28 Luis Machado <luis.machado@linaro.org>
+
+ * aarch64-linux-tdep.c (aarch64_linux_memtag_matches_p): Remove the top
+ byte.
+ (aarch64_linux_set_memtags): Likewise.
+ (aarch64_linux_get_memtag): Likewise.
+ (aarch64_linux_report_signal_info): Likewise.
+
2021-06-28 Luis Machado <luis.machado@linaro.org>
* aarch64-linux-tdep.c
CORE_ADDR addr = value_as_address (address);
/* Fetch the allocation tag for ADDRESS. */
- gdb::optional<CORE_ADDR> atag = aarch64_mte_get_atag (addr);
+ gdb::optional<CORE_ADDR> atag
+ = aarch64_mte_get_atag (address_significant (gdbarch, addr));
if (!atag.has_value ())
return true;
}
else
{
+ /* Remove the top byte. */
+ addr = address_significant (gdbarch, addr);
+
/* Make sure we are dealing with a tagged address to begin with. */
if (!aarch64_linux_tagged_address_p (gdbarch, address))
return false;
if (!aarch64_linux_tagged_address_p (gdbarch, address))
return nullptr;
+ /* Remove the top byte. */
+ addr = address_significant (gdbarch, addr);
gdb::optional<CORE_ADDR> atag = aarch64_mte_get_atag (addr);
if (!atag.has_value ())
uiout->field_core_addr ("fault-addr", gdbarch, fault_addr);
uiout->text ("\n");
- gdb::optional<CORE_ADDR> atag = aarch64_mte_get_atag (fault_addr);
+ gdb::optional<CORE_ADDR> atag
+ = aarch64_mte_get_atag (address_significant (gdbarch, fault_addr));
gdb_byte ltag = aarch64_mte_get_ltag (fault_addr);
if (!atag.has_value ())