GNU Binutils with patches for OS216
修訂 | bb45427197506e89962a17fc700cb624a842e602 (tree) |
---|---|
時間 | 2020-06-16 21:58:32 |
作者 | 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.
@@ -40532,6 +40532,77 @@ is a sequence of thread IDs, @var{threadid} (eight hex | ||
40532 | 40532 | digits), from the target. See @code{remote.c:parse_threadlist_response()}. |
40533 | 40533 | @end table |
40534 | 40534 | |
40535 | +@item qMemTags:@var{start address}:@var{length} | |
40536 | +@cindex fetch memory tags | |
40537 | +@cindex @samp{qMemTags} packet | |
40538 | +Fetch memory tags in the address range @r{[}@var{start address}, | |
40539 | +@var{start address} + @var{length}@r{)}. The target is responsible for | |
40540 | +calculating how many tags will be returned, as this is architecture-specific. | |
40541 | + | |
40542 | +@var{start address} is the starting address of the memory range. | |
40543 | + | |
40544 | +@var{length} is the length, in bytes, of the memory range. | |
40545 | + | |
40546 | +Reply: | |
40547 | +@table @samp | |
40548 | +@item @var{mXX}@dots{} | |
40549 | +Hex encoded sequence of uninterpreted bytes representing the tags found in | |
40550 | +the request memory range. | |
40551 | + | |
40552 | +@item E @var{nn} | |
40553 | +An error occured. This means that fetching of memory tags failed for some | |
40554 | +reason. | |
40555 | + | |
40556 | +@item @w{} | |
40557 | +An empty reply indicates that @samp{qMemTags} is not supported by the stub, | |
40558 | +although this should not happen given @value{GDBN} will only send this packet | |
40559 | +if the stub has advertised support for memory tagging via @samp{qSupported}. | |
40560 | +@end table | |
40561 | + | |
40562 | +@item QMemTags:@var{start address}:@var{length}:@var{tag bytes} | |
40563 | +@cindex store memory tags | |
40564 | +@cindex @samp{QMemTags} packet | |
40565 | +Store memory tags to the address range @r{[}@var{start address}, | |
40566 | +@var{start address} + @var{length}@r{)}. The target is responsible for | |
40567 | +interpreting the tag bytes and modifying the memory tag granules | |
40568 | +accordingly, given this is architecture-specific. | |
40569 | + | |
40570 | +The interpretation of how many tags should be written to how many memory tag | |
40571 | +granules is also architecture-specific. The behavior is | |
40572 | +implementation-specific, but the following is suggested. | |
40573 | + | |
40574 | +If the number of memory tags, @var{N}, is greater than or equal to the number | |
40575 | +of memory tag granules, @var{G}, only @var{G} tags will be stored. | |
40576 | + | |
40577 | +If @var{N} is less than @var{G}, the behavior is that of a fill operation, | |
40578 | +and the tag bytes will be used as a pattern that will get repeated until | |
40579 | +@var{G} tags are stored. | |
40580 | + | |
40581 | +@var{start address} is the starting address of the memory range. The address | |
40582 | +does not have any restriction on alignment or size. | |
40583 | + | |
40584 | +@var{length} is the length, in bytes, of the memory range. | |
40585 | + | |
40586 | +@var{tag bytes} is a sequence of hex encoded uninterpreted bytes which will be | |
40587 | +interpreted by the target. Each pair of hex digits is interpreted as a | |
40588 | +single byte. | |
40589 | + | |
40590 | +Reply: | |
40591 | +@table @samp | |
40592 | +@item OK | |
40593 | +The request was successful and the memory tag granules were modified | |
40594 | +accordingly. | |
40595 | + | |
40596 | +@item E @var{nn} | |
40597 | +An error occured. This means that modifying the memory tag granules failed | |
40598 | +for some reason. | |
40599 | + | |
40600 | +@item @w{} | |
40601 | +An empty reply indicates that @samp{QMemTags} is not supported by the stub, | |
40602 | +although this should not happen given @value{GDBN} will only send this packet | |
40603 | +if the stub has advertised support for memory tagging via @samp{qSupported}. | |
40604 | +@end table | |
40605 | + | |
40535 | 40606 | @item qOffsets |
40536 | 40607 | @cindex section offsets, remote request |
40537 | 40608 | @cindex @samp{qOffsets} packet |
@@ -41199,6 +41270,11 @@ These are the currently defined stub features and their properties: | ||
41199 | 41270 | @tab @samp{-} |
41200 | 41271 | @tab No |
41201 | 41272 | |
41273 | +@item @samp{memory-tagging} | |
41274 | +@tab No | |
41275 | +@tab @samp{-} | |
41276 | +@tab No | |
41277 | + | |
41202 | 41278 | @end multitable |
41203 | 41279 | |
41204 | 41280 | These are the currently defined stub features, in more detail: |
@@ -41413,6 +41489,14 @@ The remote stub understands the @samp{QThreadEvents} packet. | ||
41413 | 41489 | @item no-resumed |
41414 | 41490 | The remote stub reports the @samp{N} stop reply. |
41415 | 41491 | |
41492 | +@item memory-tagging | |
41493 | +The remote stub supports and implements the required memory tagging | |
41494 | +functionality and understands the @samp{qMemTags} and @samp{QMemTags} packets. | |
41495 | + | |
41496 | +For AArch64 GNU/Linux systems, this feature also requires access to the smaps | |
41497 | +file in the proc filesystem so memory mapping page flags can be inspected. This | |
41498 | +is done via the @samp{vFile} requests. | |
41499 | + | |
41416 | 41500 | @end table |
41417 | 41501 | |
41418 | 41502 | @item qSymbol:: |