From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6845 invoked by alias); 2 May 2006 04:15:48 -0000 Received: (qmail 6835 invoked by uid 22791); 2 May 2006 04:15:47 -0000 X-Spam-Check-By: sourceware.org Received: from mail.cybermesa.com (HELO mail.cybermesa.com) (198.59.109.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 May 2006 04:15:44 +0000 Received: from [127.0.0.1] ([65.19.50.50]) by mail.cybermesa.com (8.12.11/8.12.10) with ESMTP id k424Ffq6031201 for ; Mon, 1 May 2006 22:15:42 -0600 Message-ID: <4456DCEB.7030103@intellimetrix.us> Date: Tue, 02 May 2006 04:15:00 -0000 From: Doug Abbott User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Remote gdb and shared libraries Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00005.txt.bz2 Hi, This should be a fairly simple problem of inadequate documentation. I've searched the archives and found quite a bit of stuff on shared libraries, but nothing that exactly matches the problem I'm seeing. I'm running gdb 6.3 under Red Hat 9 using gdbserver on an ARM9 target board to debug a simple Hello World program. I've worked through the stuff about setting solib-absolute-prefix and both the host and target copies of the libraries seem to be identical. 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. After the program starts and halts at a breakpoint, the info share command returns: 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? 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". At that point things are pretty much hung up. Surely this is a simple problem. I've used gdbserver before in x86 and Motorola Dragonball environments without a problem. But in those situations, I didn't have to build the shared libraries (if there were any?). And BTW, the hello program runs fine on the target without gdb. Any help would be greatly appreciated. Doug