From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24068 invoked by alias); 22 Mar 2007 15:45:22 -0000 Received: (qmail 24037 invoked by uid 22791); 22 Mar 2007 15:45:20 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Mar 2007 15:45:08 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 189494B267; Thu, 22 Mar 2007 10:45:07 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id DD7914B262; Thu, 22 Mar 2007 10:45:06 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HUPTO-0001rl-BT; Thu, 22 Mar 2007 11:45:06 -0400 Date: Thu, 22 Mar 2007 15:45:00 -0000 From: Daniel Jacobowitz To: Xu Haojun-a18535 Cc: gdb@sourceware.org Subject: Re: Help with stepping into shared-library with stripped ld-linux on arm board Message-ID: <20070322154506.GA7032@caradoc.them.org> Mail-Followup-To: Xu Haojun-a18535 , gdb@sourceware.org References: <6D989D7EEBF1A34EA5CAF6A24FD3E15801E3CB50@zmy16exm63.ds.mot.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6D989D7EEBF1A34EA5CAF6A24FD3E15801E3CB50@zmy16exm63.ds.mot.com> User-Agent: Mutt/1.5.14+cvs20070313 (2007-03-13) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00276.txt.bz2 On Thu, Mar 22, 2007 at 11:29:14PM +0800, Xu Haojun-a18535 wrote: > Hello, gdb experts. > > Recently we are trying to stepping into shared-library on arm board > using GDB 6.3 with gdbserver > > First we find ld-linux.so is stripped so that gdb cannot insert a > breakpoint at _dl_debug_state. Then it has to continue with SINGLE_STEP > out of the linker codes, which is quite slow!! > Then one option we used is to re-compile the glibc with symbol info and > put it into arm board, then it works. I suggest you have two copies of your root filesystem. Point GDB at one on your host that is not stripped, and run one that is exactly the same but stripped on the target. Then everything will work much better. > Any clue about this? What makes gdb decide to send SINGLE_STEP or CONT > to gdbserver during stepping into a shared library? It looks it keep > sending SINGLE_STEP command to gdbserver, till out of linker code. Do I > miss something besides enable_break() in solib-srv4.c? It needs to know what function it's in to recognize shared library trampolines. Without symbols, it's not going to work. A compromise which might help is to use strip -g for ld.so and libpthread.so on your target instead of strip; that will leave the symbol tables, and remove only the debug info. -- Daniel Jacobowitz CodeSourcery