From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17234 invoked by alias); 29 Apr 2005 17:58:42 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17113 invoked from network); 29 Apr 2005 17:58:37 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 29 Apr 2005 17:58:37 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DRZl6-0000EN-Uk; Fri, 29 Apr 2005 13:58:37 -0400 Date: Fri, 29 Apr 2005 18:03:00 -0000 From: Daniel Jacobowitz To: lin q Cc: gdb@sources.redhat.com Subject: Re: how to check the symbols inside binaries Message-ID: <20050429175836.GA837@nevyn.them.org> Mail-Followup-To: lin q , gdb@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-04/txt/msg00238.txt.bz2 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 > "/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