Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Document "info symbol"
Date: Mon, 26 Mar 2001 03:39:00 -0000	[thread overview]
Message-ID: <Pine.SUN.3.91.1010326133255.8356E-100000@is> (raw)

The GDB manual didn't mention "info symbol".  Now it does.

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".


--- gdb/doc/gdb.te~	Wed Jan 24 00:48:56 2001
+++ gdb/doc/gdb.texinfo	Fri Mar 23 21:50:52 2001
@@ -4634,6 +4634,7 @@
 
 @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:
@@ -4643,6 +4644,10 @@
 $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.
 
@@ -7520,6 +7525,21 @@
 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


                 reply	other threads:[~2001-03-26  3:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SUN.3.91.1010326133255.8356E-100000@is \
    --to=eliz@is.elta.co.il \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox