From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11457 invoked by alias); 15 Mar 2013 15:38:08 -0000 Received: (qmail 11417 invoked by uid 22791); 15 Mar 2013 15:38:07 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from na3sys009aog109.obsmtp.com (HELO na3sys009aog109.obsmtp.com) (74.125.149.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Mar 2013 15:37:59 +0000 Received: from mx10.qnx.com ([209.226.137.110]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKUUNAR7zRyvJw0QZBMMkG5YdG/9HadES9@postini.com; Fri, 15 Mar 2013 08:37:59 PDT Received: by mx10.qnx.com (Postfix, from userid 500) id C7B7721165; Fri, 15 Mar 2013 11:37:39 -0400 (EDT) Received: from exhts.ott.qnx.com (exch2 [10.222.2.136]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx10.qnx.com (Postfix) with ESMTPS id D467D20A8B; Fri, 15 Mar 2013 11:37:37 -0400 (EDT) Received: from [10.222.96.215] (10.222.2.5) by exch2.ott.qnx.com (10.222.2.136) with Microsoft SMTP Server id 14.2.318.4; Fri, 15 Mar 2013 11:37:37 -0400 Message-ID: <51434041.4080309@qnx.com> Date: Fri, 15 Mar 2013 15:38:00 -0000 From: Aleksandar Ristovski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: gmane.comp.gdb.patches To: Jan Kratochvil CC: "gdb-patches@sourceware.org" Subject: Re: [draft patch 0/6] Split FYI and some review notes References: <51278984.3070208@qnx.com> <20130310210734.GA21130@host2.jankratochvil.net> In-Reply-To: <20130310210734.GA21130@host2.jankratochvil.net> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2013-03/txt/msg00669.txt.bz2 Message-ID: <20130315153800.6kWBxkpNRCysdeUI8f752yfgiyPhXmKaWeJ-y48wwTA@z> On 13-03-10 05:07 PM, Jan Kratochvil wrote: > get_hex_build_id must not be based on soname, moreover playing with realname > on it, it is too fragile. It should be based on addresses, you know that l_ld > is absolute address inside the library. So find maps/smaps entry containing > l_ld, subtract its file offset from vaddr and you have the ELF header address. Thinking about this, we have to do a real name on this as maps/smaps contain name as requested initially, not pathname as resolved. While we can determine entry that corresponds to the given l_ld, the name sent to gdb needs to be realname as that is what gdb expects.