From: Tom de Vries Date: Thu, 18 Nov 2021 18:22:51 +0000 (+0100) Subject: [gdb/doc] Fix negative repeat count examining memory example X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ba97c19049103ec2232531abdca4268089ea64d;p=binutils-gdb.git [gdb/doc] Fix negative repeat count examining memory example The documentation for the examining memory command x contains an example: ... You can also specify a negative repeat count to examine memory backward from the given address. For example, 'x/-3uh 0x54320' prints three halfwords (h) at 0x54314, 0x54328, and 0x5431c. ... The 0x54328 looks like a typo, which was intended to be 0x54318. But the series uses a 4-byte distance, while the halfword size used in the command means a 2-byte distance, so the series should be: ... 0x5431a, 0x5431c, and 0x5431e. ... Fix this by updating the addresses in the example accordingly. Reported here ( https://sourceware.org/pipermail/gdb/2021-November/049784.html ). --- diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index f6d221f003e..1b13973cdc5 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -10912,7 +10912,7 @@ words (@samp{w}) of memory above the stack pointer (here, @samp{$sp}; You can also specify a negative repeat count to examine memory backward from the given address. For example, @samp{x/-3uh 0x54320} prints three -halfwords (@code{h}) at @code{0x54314}, @code{0x54328}, and @code{0x5431c}. +halfwords (@code{h}) at @code{0x5431a}, @code{0x5431c}, and @code{0x5431e}. Since the letters indicating unit sizes are all distinct from the letters specifying output formats, you do not have to remember whether