From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27614 invoked by alias); 5 Jan 2010 11:02:06 -0000 Received: (qmail 27392 invoked by uid 22791); 5 Jan 2010 11:02:05 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Jan 2010 11:02:00 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 0132A290007; Tue, 5 Jan 2010 12:01:58 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iQLZlndZqxZc; Tue, 5 Jan 2010 12:01:57 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id D89D3290001; Tue, 5 Jan 2010 12:01:57 +0100 (CET) Subject: Re: Regression on prelinked-sepdebug-shlibs Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <20100104181009.GA15630@host0.dyn.jankratochvil.net> Date: Tue, 05 Jan 2010 11:02:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20091225200440.GA3747@host0.dyn.jankratochvil.net> <1EA52AF6-6633-4D00-A3D7-842856D6C908@adacore.com> <20100104181009.GA15630@host0.dyn.jankratochvil.net> To: Jan Kratochvil 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/msg00076.txt.bz2 On Jan 4, 2010, at 7:10 PM, Jan Kratochvil wrote: Hi Jan, > 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 ? N= o sepdebug.exp regressions. >=20 > it works (for the reproducer I provided - you could not run it?) In fact not easily. The RH machine on which I can run this test hasn't acc= ess to my home and I haven't taken the time to put a new gdb repo. > after > removing: >=20 > + /* In most cases, the offsets are 0. In this case we return NULL to r= educe > + overhead. */ > + for (i =3D 0; i < objfile->num_sections; i++) > + if (objfile->section_offsets->offsets[i]) > + break; > + if (i >=3D objfile->num_sections) > + return NULL; >=20 > These offsets are for file vs. memory displacement. If I have .so prelin= ked at > 0x3404200190 it gets loaded at 0x3404200190 so > objfile->section_offsets->offsets[*] will be 0 but still the .so.debug fi= le is > 0x0-based and the .so.debug file needs to be relocated to 0x3404200190. Yes, that's right. But without that sepdebug.exp fails: by default (default_symfile_offsets), = addresses from addr_info are used as offsets. So if I put the vma into address, the addresses of the se= parate debug file are doubled. The convertion of addr to offset in syms_from_objfile is *not* done for mai= nline sym files - but I don't know why. Unless I still don't understand something it looks like we need to coordina= te to submit this patch. IIUC you haven't yet committed all your PIE patches. Could you simply add = it to your own patches set ? Tristan.