GNU Binutils with patches for OS216
Revision | d0c98d56c30d9a88fcccd785ffdd21ed4f62de3a (tree) |
---|---|
Time | 2020-06-26 01:23:38 |
Author | Luis Machado <luis.machado@lina...> |
Commiter | Luis Machado |
Documentation for memory tagging remote packets
Document the remote packet changes to support memory tagging.
gdb/doc/ChangeLog:
YYYY-MM-DD Luis Machado <luis.machado@linaro.org>
* gdb.texinfo (General Query Packets): Document qMemTags and
QMemTags.
Document the "memory-tagging" feature.
@@ -40647,6 +40647,77 @@ is a sequence of thread IDs, @var{threadid} (eight hex | ||
40647 | 40647 | digits), from the target. See @code{remote.c:parse_threadlist_response()}. |
40648 | 40648 | @end table |
40649 | 40649 | |
40650 | +@item qMemTags:@var{start address}:@var{length} | |
40651 | +@cindex fetch memory tags | |
40652 | +@cindex @samp{qMemTags} packet | |
40653 | +Fetch memory tags in the address range @r{[}@var{start address}, | |
40654 | +@var{start address} + @var{length}@r{)}. The target is responsible for | |
40655 | +calculating how many tags will be returned, as this is architecture-specific. | |
40656 | + | |
40657 | +@var{start address} is the starting address of the memory range. | |
40658 | + | |
40659 | +@var{length} is the length, in bytes, of the memory range. | |
40660 | + | |
40661 | +Reply: | |
40662 | +@table @samp | |
40663 | +@item @var{mXX}@dots{} | |
40664 | +Hex encoded sequence of uninterpreted bytes representing the tags found in | |
40665 | +the request memory range. | |
40666 | + | |
40667 | +@item E @var{nn} | |
40668 | +An error occured. This means that fetching of memory tags failed for some | |
40669 | +reason. | |
40670 | + | |
40671 | +@item @w{} | |
40672 | +An empty reply indicates that @samp{qMemTags} is not supported by the stub, | |
40673 | +although this should not happen given @value{GDBN} will only send this packet | |
40674 | +if the stub has advertised support for memory tagging via @samp{qSupported}. | |
40675 | +@end table | |
40676 | + | |
40677 | +@item QMemTags:@var{start address}:@var{length}:@var{tag bytes} | |
40678 | +@cindex store memory tags | |
40679 | +@cindex @samp{QMemTags} packet | |
40680 | +Store memory tags to the address range @r{[}@var{start address}, | |
40681 | +@var{start address} + @var{length}@r{)}. The target is responsible for | |
40682 | +interpreting the tag bytes and modifying the memory tag granules | |
40683 | +accordingly, given this is architecture-specific. | |
40684 | + | |
40685 | +The interpretation of how many tags should be written to how many memory tag | |
40686 | +granules is also architecture-specific. The behavior is | |
40687 | +implementation-specific, but the following is suggested. | |
40688 | + | |
40689 | +If the number of memory tags, @var{N}, is greater than or equal to the number | |
40690 | +of memory tag granules, @var{G}, only @var{G} tags will be stored. | |
40691 | + | |
40692 | +If @var{N} is less than @var{G}, the behavior is that of a fill operation, | |
40693 | +and the tag bytes will be used as a pattern that will get repeated until | |
40694 | +@var{G} tags are stored. | |
40695 | + | |
40696 | +@var{start address} is the starting address of the memory range. The address | |
40697 | +does not have any restriction on alignment or size. | |
40698 | + | |
40699 | +@var{length} is the length, in bytes, of the memory range. | |
40700 | + | |
40701 | +@var{tag bytes} is a sequence of hex encoded uninterpreted bytes which will be | |
40702 | +interpreted by the target. Each pair of hex digits is interpreted as a | |
40703 | +single byte. | |
40704 | + | |
40705 | +Reply: | |
40706 | +@table @samp | |
40707 | +@item OK | |
40708 | +The request was successful and the memory tag granules were modified | |
40709 | +accordingly. | |
40710 | + | |
40711 | +@item E @var{nn} | |
40712 | +An error occured. This means that modifying the memory tag granules failed | |
40713 | +for some reason. | |
40714 | + | |
40715 | +@item @w{} | |
40716 | +An empty reply indicates that @samp{QMemTags} is not supported by the stub, | |
40717 | +although this should not happen given @value{GDBN} will only send this packet | |
40718 | +if the stub has advertised support for memory tagging via @samp{qSupported}. | |
40719 | +@end table | |
40720 | + | |
40650 | 40721 | @item qOffsets |
40651 | 40722 | @cindex section offsets, remote request |
40652 | 40723 | @cindex @samp{qOffsets} packet |
@@ -41314,6 +41385,11 @@ These are the currently defined stub features and their properties: | ||
41314 | 41385 | @tab @samp{-} |
41315 | 41386 | @tab No |
41316 | 41387 | |
41388 | +@item @samp{memory-tagging} | |
41389 | +@tab No | |
41390 | +@tab @samp{-} | |
41391 | +@tab No | |
41392 | + | |
41317 | 41393 | @end multitable |
41318 | 41394 | |
41319 | 41395 | These are the currently defined stub features, in more detail: |
@@ -41528,6 +41604,14 @@ The remote stub understands the @samp{QThreadEvents} packet. | ||
41528 | 41604 | @item no-resumed |
41529 | 41605 | The remote stub reports the @samp{N} stop reply. |
41530 | 41606 | |
41607 | +@item memory-tagging | |
41608 | +The remote stub supports and implements the required memory tagging | |
41609 | +functionality and understands the @samp{qMemTags} and @samp{QMemTags} packets. | |
41610 | + | |
41611 | +For AArch64 GNU/Linux systems, this feature also requires access to the smaps | |
41612 | +file in the proc filesystem so memory mapping page flags can be inspected. This | |
41613 | +is done via the @samp{vFile} requests. | |
41614 | + | |
41531 | 41615 | @end table |
41532 | 41616 | |
41533 | 41617 | @item qSymbol:: |