From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4171 invoked by alias); 11 Feb 2010 20:59:34 -0000 Received: (qmail 4160 invoked by uid 22791); 11 Feb 2010 20:59:33 -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-f188.google.com (HELO mail-iw0-f188.google.com) (209.85.223.188) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Feb 2010 20:59:28 +0000 Received: by iwn26 with SMTP id 26so1855786iwn.0 for ; Thu, 11 Feb 2010 12:59:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.156.205 with SMTP id y13mr242021ibw.27.1265921966499; Thu, 11 Feb 2010 12:59:26 -0800 (PST) In-Reply-To: References: <8ba6bed41002101145l3a29389cod7e3890b7e9a3312@mail.gmail.com> Date: Thu, 11 Feb 2010 20:59:00 -0000 Message-ID: <8ba6bed41002111259g745df3eq9b87986a5efcb0cb@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 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/msg00075.txt.bz2 On Wed, Feb 10, 2010 at 7:12 PM, Amker.Cheng wrote: > On Thu, Feb 11, 2010 at 3:45 AM, Matt Rice wrote: >> On Wed, Feb 10, 2010 at 4:09 AM, Amker.Cheng wrote: > >> >> 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. >> > Thanks, but I trid gdb-7.0.1 in two ways, both facing the same problem: Yeah, I don't think 7.0.1 is recent enough to contain Jan's patches gdb seems to be moving at quite the pace these days > 1 : cross debug using gdb-7.0.1; > 2 : native debug using gdb-7.0.1, which was built for and running > under mipsel-linux; > > gdb always complains about "Cannot access memory at address 0x32a14" > > Maybe I've missed something important when following instruction at > http://sources.redhat.com/glibc/wiki/Debugging/Loader_Debugging I tried the same on x86_64 a while back, and had the same issues I spoke with the author of this documentation, he couldn't remember the version of gdb used and said that he had possibly patched it, I believe that with a properly working gdb capable of debugging ld.so this documentation is sound and will prove helpful to you. but to get gdb capable of debugging ld.so, you'll currently have to try out cvs, and if that doesn't work, researching Jan's PIE patches is your best bet. as in the first mail in the thread he mentions the various cases of ld.so debugging. http://sourceware.org/ml/gdb-patches/2009-11/msg00167.html (note that these threads are split across months which if i recall the list archives handle less than gracefully) sorry i'm being real vague here, but this is a large patch series which has undergone recent progress, and i'm not really aware of the current status. But in these cases the best way to ensure that a future gdb release works how you need it is to try out current developments.