]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
New mtag commands
authorLuis Machado <luis.machado@linaro.org>
Mon, 15 Jun 2020 18:49:37 +0000 (15:49 -0300)
committerLuis Machado <luis.machado@linaro.org>
Thu, 25 Jun 2020 16:23:39 +0000 (13:23 -0300)
commit0b4abec09e273120966b3472dfdbf02983157915
treeaf367fae01bd26859c56cd34b9e1faea3d96f321
parent653bc1ffddfbbe46d0551b83c37a63900661ce25
New mtag commands

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.
gdb/printcmd.c
gdbsupport/rsp-low.cc