• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

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

修訂62ccae8ff85d2769c3c1103b1f21679cbd6ac505 (tree)
時間2020-06-16 21:58:33
作者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.

Change Summary

差異

--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -9801,6 +9801,10 @@ If you omit @var{expr}, @value{GDBN} displays the last value again (from the
98019801 conveniently inspect the same value in an alternative format.
98029802 @end table
98039803
9804+If the architecture supports memory tagging, the @code{print} command will
9805+display pointer/memory tag mismatches if what is being printed is a pointer
9806+or reference type.
9807+
98049808 A more low-level way of examining data is with the @code{x} command.
98059809 It examines data in memory at a specified address and prints it in a
98069810 specified format. @xref{Memory, ,Examining Memory}.
@@ -10568,7 +10572,8 @@ number is specified, memory is examined backward from @var{addr}.
1056810572 @item @var{f}, the display format
1056910573 The display format is one of the formats used by @code{print}
1057010574 (@samp{x}, @samp{d}, @samp{u}, @samp{o}, @samp{t}, @samp{a}, @samp{c},
10571-@samp{f}, @samp{s}), and in addition @samp{i} (for machine instructions).
10575+@samp{f}, @samp{s}), @samp{i} (for machine instructions) and
10576+@samp{m} (for displaying memory tags).
1057210577 The default is @samp{x} (hexadecimal) initially. The default changes
1057310578 each time you use either @code{x} or @code{print}.
1057410579
@@ -10663,6 +10668,20 @@ counter is shown with a @code{=>} marker. For example:
1066310668 0x804838c <main+24>: call 0x80482d4 <puts@@plt>
1066410669 @end smallexample
1066510670
10671+If the architecture supports memory tagging, the tags can be displayed by
10672+using @samp{m}. The information will be displayed once per granule size
10673+(the amount of bytes a particular memory tag covers). For example, AArch64
10674+has a granule size of 16 bytes, so it will display a tag every 16 bytes.
10675+
10676+Due to the way @value{GDBN} prints information with the @code{x} command (not
10677+aligned to a particular boundary), the tag information will refer to the
10678+initial address displayed on a particular line. If a memory tag boundary
10679+is crossed in the middle of a line displayed by the @code{x} command, it
10680+will be displayed in the next line.
10681+
10682+The @samp{m} format doesn't affect any other specified formats that were
10683+passed to the @code{x} command.
10684+
1066610685 @cindex @code{$_}, @code{$__}, and value history
1066710686 The addresses and contents printed by the @code{x} command are not saved
1066810687 in the value history because there is often too much of them and they
@@ -10729,8 +10748,17 @@ If the underlying architecture supports memory tagging, like AArch64,
1072910748 @value{GDBN} can make use of it to validate addresses and pointers against
1073010749 memory allocation tags.
1073110750
10732-A command prefix of @code{mtag} gives access to the various memory tagging
10733-commands.
10751+The @code{print} and @code{x} commands will display tag information when
10752+appropriate, and a command prefix of @code{mtag} gives access to the
10753+various memory tagging commands.
10754+
10755+The @code{print} command will automatically attempt to validate the logical
10756+tag against the allocation tag for pointers and addresses, and will display
10757+a message in case of failure.
10758+
10759+The @code{x} command has a @code{m} modifier. When present, this modifier
10760+will make the @code{x} command output allocation tag information for a given
10761+memory region that is being examined.
1073410762
1073510763 The @code{mtag} commands are the following:
1073610764
@@ -24806,7 +24834,7 @@ available for inspection and editing of logical and allocation tags.
2480624834
2480724835 @value{GDBN} will also output additional information for memory tag
2480824836 violations, which come as SIGSEGV signals, so developers can have a clue
24809-about what caused the crash. The logical and allocation tags will be shown
24837+about what caused the crash. The logical and allocation tags will be shown
2481024838 alongside the fault address, if available.
2481124839
2481224840 A new register set is made available through the MTE feature.