From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28264 invoked by alias); 10 Feb 2010 19:45:30 -0000 Received: (qmail 28255 invoked by uid 22791); 10 Feb 2010 19:45:30 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-iw0-f178.google.com (HELO mail-iw0-f178.google.com) (209.85.223.178) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Feb 2010 19:45:26 +0000 Received: by iwn8 with SMTP id 8so442956iwn.13 for ; Wed, 10 Feb 2010 11:45:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.190.204 with SMTP id dj12mr1276166ibb.9.1265831124563; Wed, 10 Feb 2010 11:45:24 -0800 (PST) In-Reply-To: References: Date: Wed, 10 Feb 2010 19:45:00 -0000 Message-ID: <8ba6bed41002101145l3a29389cod7e3890b7e9a3312@mail.gmail.com> Subject: Re: cross debug glibc loader problem From: Matt Rice To: "Amker.Cheng" Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2010-02/txt/msg00062.txt.bz2 On Wed, Feb 10, 2010 at 4:09 AM, Amker.Cheng wrote: > Hi all: > =A0I am trying to debug glibc loader, e.g. ld.so. > I am following instructions at > http://sources.redhat.com/glibc/wiki/Debugging/Loader_Debugging, > the only difference is the cross debugging by running gdbserver from a > mips simulator. > the start up command is : > ------------------------------ > EGLIBC=3D/home/user/working-dir/eglibc-test/build/glibc > mipsel-linux-gnu-gdbserver --debug 192.168.10.2:3333 \ > $EGLIBC/elf/ld.so.1 > "--library-path > $EGLIBC:\ > $EGLIBC/math:\ > $EGLIBC/elf:\ > $EGLIBC/dlfcn:\ > $EGLIBC/nss:\ > $EGLIBC/nis:\ > $EGLIBC/rt:\ > $EGLIBC/resolv:\ > $EGLIBC/crypt:\ > $EGLIBC/nptl \ > $EGLIBC/string/tester > > then I trying to connect gdbserver in gdb command line by : > > target remote 192.168.10.2:3333 > > strangely, gdb complains that it :"Cannot access memory at address 0x32a1= 4". > > I have totally no idea about this question, so please help and any > tips will be appreciated. > > Thanks very much. > > the remote log file is attached, hoping helpful: I would try it out with gdb from cvs, and if that doesn't work investigate Jan Kratochvil's recent PIE: series of threads on the gdb-patches list (at least some of which have been integrated), as I am lead to believe from the first thread in the series that those patches covered debugging ld.so.