From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19527 invoked by alias); 12 Oct 2011 20:22:34 -0000 Received: (qmail 19516 invoked by uid 22791); 12 Oct 2011 20:22:33 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_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; Wed, 12 Oct 2011 20:22:16 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9CKM9nl012791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Oct 2011 16:22:09 -0400 Received: from host1.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9CKM6Kg003038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Oct 2011 16:22:08 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p9CKM5VX022802; Wed, 12 Oct 2011 22:22:05 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p9CKM4O2022801; Wed, 12 Oct 2011 22:22:04 +0200 Date: Wed, 12 Oct 2011 20:22:00 -0000 From: Jan Kratochvil To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org, Paul Pluzhnikov , Pedro Alves Subject: Re: [patch 3/3] Implement qXfer:libraries for Linux/gdbserver #2 Message-ID: <20111012202204.GA22522@host1.jankratochvil.net> References: <20111003215530.GC20272@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-10/txt/msg00372.txt.bz2 On Mon, 10 Oct 2011 04:43:36 +0200, Daniel Jacobowitz wrote: > I would be a whole lot happier if we could use the same > elements for SVR4. There may be some creative interpretations we can > use to make it work... yes, we'd likely have to pass the link map > addresses as additional information; fortunately that's easy. I'm not > sure I understand the issue with dealing with absolute library base > addresses. > But in short, the way to think about this is to move all > the complicated bits of library processing to the target agent, and > give GDB a simplified view of what's really going on. The problem is the host symbol file may be also prelinked, therefore there still needs to be the relocation on gdb side, whether the single number covers just the host displacement or a sum of both the host and target displacement does not matter much. Just this case: [patch] [i386] Fix {,un}prelinked libraries for attach/core-load http://sourceware.org/ml/gdb-patches/2011-02/msg00630.html had to be made in a heuristic way while with using /proc/PID/maps on the gdbserver Linux side for absolute addresses normalization it could be made reliable. Going to try it. > If that's not practical, then +1 to Pedro's suggestion; if you're > bulk-reading the link maps, or doing some svr4-specific semantics, we > should express it that way. If the addresses are absolute then we can just add new attributes to the current format and I assume the Pedro's suggestion for an incompatible format is no longer valid then. Thanks, Jan