/* Remove the top byte. */
addr = gdbarch_remove_non_address_bits (gdbarch, addr);
- /* Make sure we are dealing with a tagged address to begin with. */
- if (!aarch64_linux_tagged_address_p (gdbarch, address))
- return false;
-
/* With G being the number of tag granules and N the number of tags
passed in, we can have the following cases:
error (_("Error parsing tags argument. Tags should be 2 digits per byte."));
tags = hex2bin (tags_string.c_str ());
-
- /* If the address is not in a region memory mapped with a memory tagging
- flag, it is no use trying to access/manipulate its allocation tag. */
- if (!gdbarch_tagged_address_p (current_inferior ()->arch (), *val))
- show_addr_not_tagged (value_as_address (*val));
}
/* Implement the "memory-tag set-allocation-tag" command.
/* Parse the input. */
parse_set_allocation_tag_input (args, &val, &length, tags);
+ /* If the address is not in a region memory-mapped with a memory tagging
+ flag, it is no use trying to manipulate its allocation tag. */
+ if (!gdbarch_tagged_address_p (current_inferior ()->arch (), val))
+ show_addr_not_tagged (value_as_address (val));
+
if (!gdbarch_set_memtags (current_inferior ()->arch (), val, length, tags,
memtag_type::allocation))
gdb_printf (_("Could not update the allocation tag(s).\n"));