From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20926 invoked by alias); 6 Oct 2011 19:09:50 -0000 Received: (qmail 20914 invoked by uid 22791); 6 Oct 2011 19:09:49 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Oct 2011 19:09:35 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RBtK2-0001pd-35 from pedro_alves@mentor.com ; Thu, 06 Oct 2011 12:09:34 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 6 Oct 2011 20:09:27 +0100 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [patch 3/3] Implement qXfer:libraries for Linux/gdbserver #2 Date: Thu, 06 Oct 2011 19:09:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: Jan Kratochvil , Paul Pluzhnikov References: <20111003215530.GC20272@host1.jankratochvil.net> In-Reply-To: <20111003215530.GC20272@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110062009.24796.pedro@codesourcery.com> 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/msg00175.txt.bz2 I think this is great, On Monday 03 October 2011 22:55:30, Jan Kratochvil wrote: > should instead include a list of allocated sections. The segment or > section bases are start addresses, not relocation offsets; they do not > -depend on the library's link-time base addresses. > +depend on the library's link-time base addresses. For SVR4 systems > +are reported parameters @{lm} with address of @code{struct link_map} > +used for TLS (Thread Local Storage) access, @code{l_addr} specifying > +bias of the mapped memory address minus the prelinked base address > +and also @code{l_ld} which is memory address of the @code{PT_DYNAMIC} > +segment. SVR4 systems additionally specify @code{struct link_map} > +address of the main executable in the @code{} element. but this reuse of is a mistake. If we're not going to use an solib-target.c at all, and the semantics of what goes over the wire is not the same as /TARGET_OBJECT_LIBRARIES, then let's come up with a completely independent new target object + dtd instead. Let's call it for example TARGET_OBJECT_SVR4_LIBRARIES. We should not prevent the possibility of _both_ using solib-svr4.c and solib-target.c at the same time, or the possibility of having a completely target-side implementation of svr4 libraries in the future, using as is (and having gdb be aware that support is present from qXfer:read:libraries+ in qSupported). -- Pedro Alves