This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Learn function name by its address
On Thursday 25 June 2009 17:53:33 Paul Pluzhnikov wrote:
> On Thu, Jun 25, 2009 at 8:42 AM, Dmitry Dzhus<dima@sphinx.net.ru> wrote:
>
> > What way of finding out function name by address would you suggest?
>
> From "info gdb":
>
> The `-symbol-info-symbol' Command
> ---------------------------------
>
> Synopsis
> ........
>
> -symbol-info-symbol ADDR
>
> Describe what symbol is at location ADDR.
Looks like the wonders of MI's wishful thinking strike again:
apoenitz@gar:/tmp$ ~/gdb/fsf/src/gdb/gdb -i mi ./x
~"GNU gdb (GDB) 6.8.50.20090622-cvs\n"
~"Copyright (C) 2009 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"i686-pc-linux-gnu\".\n"
~"For bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>...\n"
(gdb)
b main
&"b main\n"
~"Breakpoint 1 at 0x805c72d: file x.cpp, line 475.\n"
^done
(gdb)
-symbol-info-symbol 0x805c72d
^error,msg="Undefined mi command: symbol-info-symbol (missing implementation)"
(gdb)
Same with 6.8.50.20090626-cvs. I don't have anything more recent.
Regards,
Andre'