Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Determine Which Shared Library a Function Belongs to in gdb?

Tags:

When I get the callstack from gdb, I only get function names and source file information.

(gdb) f
#0  main (argc=1, argv=0xbffff1d4) at main.c:5

I don't get which Shared Library or Application the function belongs to.

On Windows, Windbg or Visual Studio will show callstacks with "myDll!myFunc" format, which shows you which module the function belongs to.

Currently in gdb I'm using "info address [function]" to get the address of the function symbol, and then use "info share" to manually find the range in which the function lies in memory to determine which library it is in.

Anyway to see the library directly without this manual process?