From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6774 invoked by alias); 22 Mar 2007 15:29:41 -0000 Received: (qmail 6764 invoked by uid 22791); 22 Mar 2007 15:29:41 -0000 X-Spam-Check-By: sourceware.org Received: from mail119.messagelabs.com (HELO mail119.messagelabs.com) (216.82.241.179) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 22 Mar 2007 15:29:26 +0000 X-VirusChecked: Checked X-Env-Sender: hjXu@motorola.com X-Msg-Ref: server-11.tower-119.messagelabs.com!1174577364!17977578!1 X-StarScan-Version: 5.5.10.7.1; banners=-,-,- Received: (qmail 22203 invoked from network); 22 Mar 2007 15:29:24 -0000 Received: from motgate3.mot.com (HELO motgate3.mot.com) (144.189.100.103) by server-11.tower-119.messagelabs.com with SMTP; 22 Mar 2007 15:29:24 -0000 Received: from az33exr02.mot.com (az33exr02.mot.com [10.64.251.232]) by motgate3.mot.com (8.12.11/Motorola) with ESMTP id l2MFTOge016444 for ; Thu, 22 Mar 2007 08:29:24 -0700 (MST) Received: from zmy16exm63.ds.mot.com (zmy16exm63.ap.mot.com [10.179.4.34]) by az33exr02.mot.com (8.13.1/8.13.0) with ESMTP id l2MFTMCU004281 for ; Thu, 22 Mar 2007 10:29:23 -0500 (CDT) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable x-cr-puzzleid: {DAD6F6CF-3D85-4EA1-BADE-00BA41626B44} Content-class: urn:content-classes:message x-cr-hashedpuzzle: ANtw AhKA BHoV BJe0 BfOs DKOB FURK FmJw GGqU GX96 Hmg2 H0Nk H4RB ItUp I1kM KxX4;1;ZwBkAGIAQABzAG8AdQByAGMAZQB3AGEAcgBlAC4AbwByAGcA;Sosha1_v1;7;{DAD6F6CF-3D85-4EA1-BADE-00BA41626B44};aABqAHgAdQBAAG0AbwB0AG8AcgBvAGwAYQAuAGMAbwBtAA==;Thu, 22 Mar 2007 15:29:14 GMT;SABlAGwAcAAgAHcAaQB0AGgAIABzAHQAZQBwAHAAaQBuAGcAIABpAG4AdABvACAAcwBoAGEAcgBlAGQALQBsAGkAYgByAGEAcgB5ACAAdwBpAHQAaAAgAHMAdAByAGkAcABwAGUAZAAgAGwAZAAtAGwAaQBuAHUAeAAgAG8AbgAgAGEAcgBtACAAYgBvAGEAcgBkAA== Subject: Help with stepping into shared-library with stripped ld-linux on arm board Date: Thu, 22 Mar 2007 15:29:00 -0000 Message-ID: <6D989D7EEBF1A34EA5CAF6A24FD3E15801E3CB50@zmy16exm63.ds.mot.com> From: "Xu Haojun-a18535" To: 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/msg00275.txt.bz2 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. But that's not final one, because eventually all the libs and exes in arm board have to be pre-linked for performance, so we have to figure out ways to debug shared-library with a stripped & pre-linked ld-linux. What we did is modify the enable_break() in solib-srv4.c and return a hard-coded address for _dl_debug_state, since it is pre-linked and the address is known. But it turns out not work, and it looks gdb still has to continue with SINGLE_STEP out of the linker codes. I checked the gdbserver using strace, it looks the breakpoint in LD is inserted using PTRACE_POKETEXT in the correct address, don't know why it not work. 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? Your help is greatly appreciated! Best Regards Haojun=20