From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12278 invoked by alias); 8 Feb 2006 06:25:21 -0000 Received: (qmail 12224 invoked by uid 22791); 8 Feb 2006 06:25:20 -0000 X-Spam-Check-By: sourceware.org Received: from gandalf.inter.net.il (HELO gandalf.inter.net.il) (192.114.186.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Feb 2006 06:25:19 +0000 Received: from nitzan.inter.net.il (nitzan.inter.net.il [192.114.186.20]) by gandalf.inter.net.il (MOS 3.7.1-GA) with ESMTP id HUT14555; Wed, 8 Feb 2006 08:25:04 +0200 (IST) Received: from HOME-C4E4A596F7 (IGLD-80-230-21-61.inter.net.il [80.230.21.61]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id CQP67590 (AUTH halo1); Wed, 8 Feb 2006 08:25:02 +0200 (IST) Date: Wed, 08 Feb 2006 06:25:00 -0000 Message-Id: From: Eli Zaretskii To: Alexandre Oliva CC: gdb-patches@sources.redhat.com, cagney@redhat.com In-reply-to: (message from Alexandre Oliva on Wed, 08 Feb 2006 03:18:01 -0200) Subject: Re: cope with varying prelink base addresses Reply-to: Eli Zaretskii References: X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00166.txt.bz2 > From: Alexandre Oliva > Date: Wed, 08 Feb 2006 03:18:01 -0200 > > The only piece of information available for this that I could find was > the address of the dynamic table in the dynamic loader data > structures. The heuristics I used was to check whether the dynamic > table address changed but remained at the same position within a > page. If so, I assume the difference is caused by prelinking, and > then I adjust the load_addr that gdb is going to use for that binary. > Otherwise, it will face the same problems you're expected to face when > debugging a core file using a different binary. Would it make sense to add a user command/variable that will tell GDB the difference between the two base addresses? I guess it would be a good idea if the user has a way of finding out this number by some means that are unavailable to GDB (e.g., by gaining access to the other machine or talking to someone sitting in front of it). WDYT?