This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: how to check the symbols inside binaries
- From: Daniel Jacobowitz <drow at false dot org>
- To: lin q <linq936 at hotmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 29 Apr 2005 13:58:36 -0400
- Subject: Re: how to check the symbols inside binaries
- References: <BAY10-F306E508DAFC4CF065F61DBE9240@phx.gbl>
On Fri, Apr 29, 2005 at 11:33:48AM -0600, lin q wrote:
> Hi,
> I am debugging a program, the source files scatter around many different
> places. When I start gdb and load the executable, I am prompted
> "<path1>/gui_main.c:there is no such file or directory". The "path1" is not
> right, there is no such directory at all.
>
> My question is how come gdb tries to load gui_main.c from path1? What is
> the logic under the hood?
>
> The problem is even worse, gui_main.c is not my file, it must be from one
> of libraries I link with. But I have no idea where it is.
That is the directory which the file was compiled in, by whoever built
it.
> I run ldd against the program and I see a lot of shared libraries, so my
> question is how I can know which library is this "gui_main" from? Or maybe
> it is in the executable itself? How can I know that?
Presumably it is in a library you link with. Whichever one provides
"main".
--
Daniel Jacobowitz
CodeSourcery, LLC