From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28606 invoked by alias); 14 Feb 2011 16:50:06 -0000 Received: (qmail 28589 invoked by uid 22791); 14 Feb 2011 16:50:04 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e23smtp06.au.ibm.com (HELO e23smtp06.au.ibm.com) (202.81.31.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 16:49:58 +0000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p1EGnmNJ032082 for ; Tue, 15 Feb 2011 03:49:48 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1EGns6w2080978 for ; Tue, 15 Feb 2011 03:49:54 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1EGnsNu007384 for ; Tue, 15 Feb 2011 03:49:54 +1100 Received: from in.ibm.com ([9.77.125.236]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p1EGnlTu007291 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 15 Feb 2011 03:49:51 +1100 Date: Mon, 14 Feb 2011 16:50:00 -0000 From: "K.Prasad" To: Mark Wielaard Cc: Roland McGrath , systemtap@sourceware.org Subject: Re: Failures with exelib.exp testcase (was Re: minutes 2010-08-19) Message-ID: <20110214164945.GA2159@in.ibm.com> Reply-To: prasad@linux.vnet.ibm.com References: <20110120185339.6FF851807D2@magilla.sf.frob.com> <1295651779.3049.15.camel@springer.wildebeest.org> <20110202121440.GB3524@in.ibm.com> <1296651551.4270.34.camel@springer.wildebeest.org> <20110203050358.GA2488@in.ibm.com> <1296728173.3341.7.camel@springer.wildebeest.org> <20110203123353.GC2488@in.ibm.com> <1296737077.3341.22.camel@springer.wildebeest.org> <20110203185926.19226180954@magilla.sf.frob.com> <1297170815.3956.34.camel@springer.wildebeest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1297170815.3956.34.camel@springer.wildebeest.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00242.txt.bz2 On Tue, Feb 08, 2011 at 02:13:35PM +0100, Mark Wielaard wrote: > On Thu, 2011-02-03 at 10:59 -0800, Roland McGrath wrote: > > What you need to do is: > > > > Elf64_Addr opd_addr; > > Dwarf_Addr bias; > > Elf_Scn *opd = dwfl_module_address_section (mod, &sym_addr, &bias); > > if (opd == NULL) ...; > > Elf_Data *data = elf_rawdata (opd, NULL); > > if (data == NULL) ...; > > Elf_Data in, out; > > out.d_buf = &final_addr; > > in.d_buf = (char *) data->d_buf + sym_addr; > > out.d_size = in.d_size = sizeof (Elf64_Addr); > > out.d_type = in.d_type = ELF_T_ADDR; > > if (elf64_xlatetom (elf, &out, &in, e_ident[EI_DATA]) == NULL) ...; > > sym_addr = opd_addr + bias; > > Thanks for the pseudocode example. Prasad, is that enough for you to > take a stab at hacking up a solution for the powerpc symbol lookup > issue? > So basically this would turn out into a piece of code to derive symbol address in, say dump_unwindsyms() in translate.cxx specific to __powerpc__ (or so I understand)? I'll give this a try and report what happens. Thanks for all the help. -- K.Prasad