GNU Binutils with patches for OS216
修订版 | 8c6f8df50be59bfe8d84648854d0ccefb4f3419f (tree) |
---|---|
时间 | 2020-06-26 01:23:39 |
作者 | Luis Machado <luis.machado@lina...> |
Commiter | Luis Machado |
Documentation for the new mtag commands
Document the new "mtag" command prefix and all of its subcommands.
gdb/doc/ChangeLog:
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* gdb.textinfo (Memory Tagging): New subsection.
(AArch64 Memory Tagging Extension): New subsection.
@@ -10804,6 +10804,49 @@ target supports computing the CRC checksum of a block of memory | ||
10804 | 10804 | (@pxref{qCRC packet}). |
10805 | 10805 | @end table |
10806 | 10806 | |
10807 | +@subsection Memory Tagging | |
10808 | + | |
10809 | +Memory tagging is a memory protection technology that validates accesses | |
10810 | +through pointers via a tag. Both the pointer tag and the memory tag in the | |
10811 | +physical address space must match for the memory access to be validated. | |
10812 | + | |
10813 | +There are two types of tags: logical and allocation. The logical tag is | |
10814 | +stored in the pointers themselves. The allocation tag is the tag associated | |
10815 | +with the physical address space, against which the logical tags from pointers | |
10816 | +are validated. | |
10817 | + | |
10818 | +If the underlying architecture supports memory tagging, like AArch64, | |
10819 | +@value{GDBN} can make use of it to validate addresses and pointers against | |
10820 | +memory allocation tags. | |
10821 | + | |
10822 | +A command prefix of @code{mtag} gives access to the various memory tagging | |
10823 | +commands. | |
10824 | + | |
10825 | +The @code{mtag} commands are the following: | |
10826 | + | |
10827 | +@table @code | |
10828 | +@kindex mtag showltag | |
10829 | +@item mtag showltag @var{address_expression} | |
10830 | +Show the logical tag contained in the pointer resulting from evaluating the | |
10831 | +argument expression. | |
10832 | +@kindex mtag setltag | |
10833 | +@item mtag setltag @var{address_expression} @var{tag_bytes} | |
10834 | +Print the resulting pointer from evaluating the argument expression with a | |
10835 | +logical tag of @var{tag_bytes}. | |
10836 | +@kindex mtag showatag | |
10837 | +@item mtag showatag @var{address_expression} | |
10838 | +Show the allocation tag from the memory address pointed to by the evaluation | |
10839 | +of the argument expression. | |
10840 | +@kindex mtag setatag | |
10841 | +@item mtag setatag @var{starting_address} @var{length} @var{tag_bytes} | |
10842 | +Set the allocation tag for memory range @r{[}@var{starting_address}, | |
10843 | +@var{starting_address} + @var{length}@r{)} to @var{tag_bytes}. | |
10844 | +@kindex mtag check | |
10845 | +@item mtag check @var{address_expression} | |
10846 | +Given the pointer resulting from evaluating the argument expression, check that | |
10847 | +the logical tag and the allocation tags match. | |
10848 | +@end table | |
10849 | + | |
10807 | 10850 | @node Auto Display |
10808 | 10851 | @section Automatic Display |
10809 | 10852 | @cindex automatic display |
@@ -24843,6 +24886,19 @@ When GDB prints a backtrace, any addresses that required unmasking will be | ||
24843 | 24886 | postfixed with the marker [PAC]. When using the MI, this is printed as part |
24844 | 24887 | of the @code{addr_flags} field. |
24845 | 24888 | |
24889 | +@subsubsection AArch64 Memory Tagging Extension. | |
24890 | +@cindex AArch64 Memory Tagging Extension. | |
24891 | + | |
24892 | +When @value{GDBN} is debugging the AArch64 architecture, the program is | |
24893 | +using the v8.5-A feature Memory Tagging Extension (MTE) and there is support | |
24894 | +in the kernel for MTE, @value{GDBN} will make memory tagging functionality | |
24895 | +available for inspection and editing of logical and allocation tags. | |
24896 | + | |
24897 | +To aid debugging, @value{GDBN} will output additional information when SIGSEGV | |
24898 | +signals are generated as a result of memory tag failures. | |
24899 | + | |
24900 | +A new register set is made available through the MTE feature. | |
24901 | + | |
24846 | 24902 | @node i386 |
24847 | 24903 | @subsection x86 Architecture-specific Issues |
24848 | 24904 |