From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9629 invoked by alias); 2 May 2006 04:19:51 -0000 Received: (qmail 9621 invoked by uid 22791); 2 May 2006 04:19:51 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 02 May 2006 04:19:49 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FamMU-0005fZ-WF; Tue, 02 May 2006 00:19:47 -0400 Date: Tue, 02 May 2006 04:19:00 -0000 From: Daniel Jacobowitz To: Doug Abbott Cc: gdb@sourceware.org Subject: Re: Remote gdb and shared libraries Message-ID: <20060502041946.GA21752@nevyn.them.org> Mail-Followup-To: Doug Abbott , gdb@sourceware.org References: <4456DCEB.7030103@intellimetrix.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4456DCEB.7030103@intellimetrix.us> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00006.txt.bz2 On Mon, May 01, 2006 at 10:15:39PM -0600, Doug Abbott wrote: > The first suspicious thing that happens is when gdb connects to the > target, it returns: > > 0x40001470 in ?? () > > implying to me that it can't find the name of the function at that > particular address. You're in the dynamic loader but GDB doesn't yet know where the dynamic loader has been loaded. This is typical. > From To Syms Read Shared Object > Library > 0x40035cd0 0x401162cc No > /usr/local/arm/arm-linux/lib/libc.so.6 > 0x40001470 0x40011598 No > /usr/local/arm/arm-linux/lib/ld-linux.so.2 > > Hmmm. The most suspicious aspect of this is the Syms Read column that > says "No". Why didn't it read the symbols? Because it couldn't find them. You have to tell it where they are. Have you used set solib-absolute-prefix? If not, try that. Do your libraries precisely match the target's? > With each next command, gdb says "Cannot access memory at address 0x0". > When I try to step over a call to printf() (with next), it says > "0x000082cc in ?? ()". Executing next again returns "Cannot find bounds > of current function". You have to use nexti / stepi when you've gotten into somewhere that GDB doesn't know about. The fact that it doesn't know about 0x82cc is suspicious. You did load your application into GDB, right? Using "file" or on the command line? -- Daniel Jacobowitz CodeSourcery