From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14071 invoked by alias); 17 Jul 2007 17:07:17 -0000 Received: (qmail 13996 invoked by uid 22791); 17 Jul 2007 17:07:16 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Jul 2007 17:07:08 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l6HH76WF004858 for ; Tue, 17 Jul 2007 13:07:06 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6HH75fX006365; Tue, 17 Jul 2007 13:07:05 -0400 Received: from [172.16.14.55] (toner.toronto.redhat.com [172.16.14.55]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l6HH753X019090; Tue, 17 Jul 2007 13:07:05 -0400 Message-ID: <469CF739.7000706@redhat.com> Date: Tue, 17 Jul 2007 17:07:00 -0000 From: Sami Wagiaalla User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Roland McGrath CC: frysk Subject: Re: Dwarf expertise needed References: <20070619213109.8D9BB4D05D3@magilla.localdomain> In-Reply-To: <20070619213109.8D9BB4D05D3@magilla.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00137.txt.bz2 Roland McGrath wrote: >> Okay it sounds like I missunderstood what addrdie does. I guess what I >> am trying to do is find the narrowest scope which contains the given pc. >> Is there a way to get all dies whos ranges contain the pc maybe ? The >> problem I am trying to solve is given a pc find the inlined/concrete >> function that contains it. >> > > This is what dwarf_getscopes is for. > Okay so I have been looking at dwarf_getscopes.c trying to find a fix for https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230235. Now i can fudge the function pc_record to return the results that I am expecting but it looks like it is trying to do something different from what I understand when it comes to inlined functions. It looks like getscopes is trying to return the scopes from narrowest up to the scope before the concrete inlined instance then the abstract definition of the concrete instance, and then the scopes that contain that. Is this a correct understanding of the code ? What I am expecting it to return is the the scopes from narrowest to and including the scope corresponding to the concrete inlined instance, then the function within which it has been inlined and the scopes containing that; as per the dwarf spec. Is this a correct understanding of what the function /should/ do ? And should I fix the function, write a parallel one that does what i want, or is there another code pathway to get it ? Cheers, Sami Wagiaalla