From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14448 invoked by alias); 4 Jan 2010 18:10:44 -0000 Received: (qmail 14439 invoked by uid 22791); 4 Jan 2010 18:10:43 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jan 2010 18:10:38 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o04IADf3006628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Jan 2010 13:10:14 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o04IAAGI021429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Jan 2010 13:10:13 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o04IAAx9015721; Mon, 4 Jan 2010 19:10:10 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o04IA9r7015711; Mon, 4 Jan 2010 19:10:09 +0100 Date: Mon, 04 Jan 2010 18:10:00 -0000 From: Jan Kratochvil To: Tristan Gingold Cc: gdb-patches@sourceware.org Subject: Re: Regression on prelinked-sepdebug-shlibs Message-ID: <20100104181009.GA15630@host0.dyn.jankratochvil.net> References: <20091225200440.GA3747@host0.dyn.jankratochvil.net> <1EA52AF6-6633-4D00-A3D7-842856D6C908@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1EA52AF6-6633-4D00-A3D7-842856D6C908@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-01/txt/msg00066.txt.bz2 Hi Tristan, On Mon, 04 Jan 2010 16:23:22 +0100, Tristan Gingold wrote: > can you try and/or comment this patch before I officially submit it ? No sepdebug.exp regressions. it works (for the reproducer I provided - you could not run it?) after removing: + /* In most cases, the offsets are 0. In this case we return NULL to reduce + overhead. */ + for (i = 0; i < objfile->num_sections; i++) + if (objfile->section_offsets->offsets[i]) + break; + if (i >= objfile->num_sections) + return NULL; These offsets are for file vs. memory displacement. If I have .so prelinked at 0x3404200190 it gets loaded at 0x3404200190 so objfile->section_offsets->offsets[*] will be 0 but still the .so.debug file is 0x0-based and the .so.debug file needs to be relocated to 0x3404200190. Thanks, Jan