Add new commands under the "mtag" prefix to allow users to inspect, modify and
check memory tags in different ways.
The available subcommands are the following:
- mtag showltag <address>: Shows the logical tag for a particular address.
- mtag setltag <address> <tag>: Prints the address tagged with the logical tag
<tag>
- mtag showatag <address>: Shows the allocation tag for a particular address.
- mtag setatag <address> <length> <tags>: Sets one or more allocation tags to
the specified tags.
- mtag check <address>: Check if the logical tag in <address> matches its
allocation tag.
These commands make use of the memory tagging gdbarch methods, and are still
available, but disabled, when memory tagging is not supported by the
architecture.
gdb/ChangeLog:
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* printcmd.c: Include gdbsupport/rsp-low.h.
(mtaglist): New static global.
(process_print_command_args): Factored out of
print_command_1.
(print_command_1): Use process_print_command_args.
(show_addr_not_tagged, show_memtag_unsupported, mtag_command)
(mtag_showtag_command, mtag_showltag_command, mtag_showatag_command)
(parse_setltag_input, mtag_setltag_command, parse_setatag_input)
(mtag_setatag_command, mtag_check_command): New functions.
(_initialize_printcmd): Add "mtag" prefix and subcommands.
gdbsupport/ChangeLog:
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* rsp-low.cc (fromhex): Change error message text to not be
RSP-specific.