summaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-03-26 11:35:03 +0000
committerEli Zaretskii <eliz@gnu.org>2001-03-26 11:35:03 +0000
commit3d67e040a54572c66014440d2ea9d33d62a6f1cf (patch)
tree2b60c94bdee853093be7af2628197b2af1e71bbc /gdb/doc
parent49baf8199475800c546792d1a92f95bd873ba680 (diff)
downloadbinutils-gdb-3d67e040a54572c66014440d2ea9d33d62a6f1cf.tar.gz
* gdb.texinfo (Output Formats): Mention "info symbol" and provide
a cross-reference to its description. (Symbols): Document "info symbol".
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdb.texinfo20
2 files changed, 26 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 05f7f728d70..a6dcf506a66 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-26 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * gdb.texinfo (Output Formats): Mention "info symbol" and provide
+ a cross-reference to its description.
+ (Symbols): Document "info symbol".
+
2001-03-21 Eli Zaretskii <eliz@is.elta.co.il>
* gdbint.texinfo (Algorithms): New section "Watchpoints" and new
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 4f7d94677db..18a123bc126 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4641,6 +4641,7 @@ see @ref{Memory,,Examining memory}.}
@item a
@cindex unknown address, locating
+@cindex locate address
Print as an address, both absolute in hexadecimal and as an offset from
the nearest preceding symbol. You can use this format used to discover
where (in what function) an unknown address is located:
@@ -4650,6 +4651,10 @@ where (in what function) an unknown address is located:
$3 = 0x54320 <_initialize_vx+396>
@end example
+@noindent
+The command @code{info symbol 0x54320} yields similar results.
+@xref{Symbols, info symbol}.
+
@item c
Regard as an integer and print it as a character constant.
@@ -7527,6 +7532,21 @@ Note the contrast with @samp{print &@var{symbol}}, which does not work
at all for a register variable, and for a stack local variable prints
the exact address of the current instantiation of the variable.
+@kindex info symbol
+@item info symbol @var{addr}
+Print the name of a symbol which is stored at the address @var{addr}.
+If no symbol is stored exactly at @var{addr}, @value{GDBN} prints the
+nearest symbol and an offset from it:
+
+@example
+(@value{GDBP}) info symbol 0x54320
+_initialize_vx + 396 in section .text
+@end example
+
+@noindent
+This is the opposite of the @code{info address} command. You can use
+it to find out the name of a variable or a function given its address.
+
@kindex whatis
@item whatis @var{expr}
Print the data type of expression @var{expr}. @var{expr} is not