• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修订版8d8848b10477ff0c569ad25fb507d583146a87ca (tree)
时间2020-06-26 01:23:39
作者Luis Machado <luis.machado@lina...>
CommiterLuis Machado

Log Message

Document new "x" and "print" memory tagging extensions

Document the changes to the "print" and "x" commands to support memory
tagging.

gdb/doc/ChangeLog:

YYYY-MM-DD Luis Machado <luis.machado@linaro.org>

* gdb.texinfo (Data): Document memory tagging changes to the "print"
command.
(Examining Memory): Document memory tagging changes to the "x"
command.
(Memory Tagging): Update with more information on changes to the "x"
and "print" commands.

更改概述

差异

--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -9891,6 +9891,10 @@ If you omit @var{expr}, @value{GDBN} displays the last value again (from the
98919891 conveniently inspect the same value in an alternative format.
98929892 @end table
98939893
9894+If the architecture supports memory tagging, the @code{print} command will
9895+display pointer/memory tag mismatches if what is being printed is a pointer
9896+or reference type.
9897+
98949898 A more low-level way of examining data is with the @code{x} command.
98959899 It examines data in memory at a specified address and prints it in a
98969900 specified format. @xref{Memory, ,Examining Memory}.
@@ -10658,7 +10662,8 @@ number is specified, memory is examined backward from @var{addr}.
1065810662 @item @var{f}, the display format
1065910663 The display format is one of the formats used by @code{print}
1066010664 (@samp{x}, @samp{d}, @samp{u}, @samp{o}, @samp{t}, @samp{a}, @samp{c},
10661-@samp{f}, @samp{s}), and in addition @samp{i} (for machine instructions).
10665+@samp{f}, @samp{s}), @samp{i} (for machine instructions) and
10666+@samp{m} (for displaying memory tags).
1066210667 The default is @samp{x} (hexadecimal) initially. The default changes
1066310668 each time you use either @code{x} or @code{print}.
1066410669
@@ -10753,6 +10758,20 @@ counter is shown with a @code{=>} marker. For example:
1075310758 0x804838c <main+24>: call 0x80482d4 <puts@@plt>
1075410759 @end smallexample
1075510760
10761+If the architecture supports memory tagging, the tags can be displayed by
10762+using @samp{m}. The information will be displayed once per granule size
10763+(the amount of bytes a particular memory tag covers). For example, AArch64
10764+has a granule size of 16 bytes, so it will display a tag every 16 bytes.
10765+
10766+Due to the way @value{GDBN} prints information with the @code{x} command (not
10767+aligned to a particular boundary), the tag information will refer to the
10768+initial address displayed on a particular line. If a memory tag boundary
10769+is crossed in the middle of a line displayed by the @code{x} command, it
10770+will be displayed in the next line.
10771+
10772+The @samp{m} format doesn't affect any other specified formats that were
10773+passed to the @code{x} command.
10774+
1075610775 @cindex @code{$_}, @code{$__}, and value history
1075710776 The addresses and contents printed by the @code{x} command are not saved
1075810777 in the value history because there is often too much of them and they
@@ -10819,8 +10838,17 @@ If the underlying architecture supports memory tagging, like AArch64,
1081910838 @value{GDBN} can make use of it to validate addresses and pointers against
1082010839 memory allocation tags.
1082110840
10822-A command prefix of @code{mtag} gives access to the various memory tagging
10823-commands.
10841+The @code{print} and @code{x} commands will display tag information when
10842+appropriate, and a command prefix of @code{mtag} gives access to the
10843+various memory tagging commands.
10844+
10845+The @code{print} command will automatically attempt to validate the logical
10846+tag against the allocation tag for pointers and addresses, and will display
10847+a message in case of failure.
10848+
10849+The @code{x} command has a @code{m} modifier. When present, this modifier
10850+will make the @code{x} command output allocation tag information for a given
10851+memory region that is being examined.
1082410852
1082510853 The @code{mtag} commands are the following:
1082610854