From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31813 invoked by alias); 17 Jan 2008 14:34:55 -0000 Received: (qmail 31804 invoked by uid 22791); 17 Jan 2008 14:34:54 -0000 X-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_MED,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; Thu, 17 Jan 2008 14:34:35 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m0HEYVBd001948; Thu, 17 Jan 2008 09:34:31 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m0HEYV5j018582; Thu, 17 Jan 2008 09:34:31 -0500 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m0HEYUDY011808; Thu, 17 Jan 2008 09:34:31 -0500 Message-ID: <478F66E0.1090900@redhat.com> Date: Thu, 17 Jan 2008 14:34:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Mark Wielaard CC: frysk@sourceware.org Subject: Re: [patch] Add debug_frame parsing References: <1200568336.2470.18.camel@dijkstra.wildebeest.org> In-Reply-To: <1200568336.2470.18.camel@dijkstra.wildebeest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 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: 2008-q1/txt/msg00033.txt.bz2 Mark Wielaard wrote: > Hi, > > This patch widens out libunwind interface to accept either eh_frame or > debug_frame tables and adds support for parsing debug_frame data. It > currently does a linear search through the data to find the right fde > and corresponding cie by making the right adjustments. Although it does > find the right fde covering the ip ranges, it doesn't always run the cfi > program correctly. So for now the default is still the default and > debug_frame is only used as fallback when eh_frame data cannot be found > (that can be changed in a simple if statement, see the FIXME in UnwindH > - that will however give a couple of test failures). It also fixes a > couple of libunwind issues found when working on this (direct usage of > local memory space, error values not being negative and unw_word being > 64bit != dwarf 64 format is always in use). > > Nice work mark; this gets us to a much more reliable unwinder! Andrew > frysk-imports/libunwind/ChangeLog > 2008-01-17 Mark Wielaard > > * include/dwarf.h (dwarf_extract_proc_info_from_fde): Pass > table_start. > * src/dwarf/Gfde.c (is_cie_id): Removed. > (parse_cie): Accept debug and eh cie ids. > (dwarf_extract_proc_info_from_fde): Accept table_start. Calculate > correct cie_addr. Fix error reporting. > * src/dwarf/Gfind_proc_info-lsb.c (linear_search): Don't depend > on local address space. Pass table start for fde parsing. > (dwarf_search_unwind_table): Handle debug_frame by linear search. > * src/mi/Gget_unwind_table.c (get_frame_table, get_debug_table): > new functions. > (unw_get_unwind_table): Call either get_frame_table or > get_debug_table depending on format. > > frysk-sys/lib/unwind/ChangeLog > 2008-01-17 Mark Wielaard > > * cni/UnwindH.hxx (get_eh_frame_hdr_addr): Find and return > debug_frame address and set pi->format. > (createProcInfoFromElfImage): Handle either debug_frame or > eh_frame addresses. > > Tested on x86_64 and x86 (fedora and centos, which both have full > eh_frame coverage, so admittedly most of the new code paths aren't hit > yet). > > Cheers, > > Mark >