From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27191 invoked by alias); 4 Feb 2011 17:47:16 -0000 Received: (qmail 27182 invoked by uid 22791); 4 Feb 2011 17:47:15 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,FSL_RU_URL X-Spam-Check-By: sourceware.org Received: from mail.apical.co.uk (HELO srv1.office.apical.co.uk) (213.106.251.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Feb 2011 17:47:09 +0000 Received: from [10.250.148.115] (23.nat.acronis.net [91.195.22.23]) (authenticated bits=0) by srv1.office.apical.co.uk (8.14.4/8.14.4) with ESMTP id p14Hkktd025136 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 4 Feb 2011 17:46:48 GMT Message-ID: <4D4C383A.3000203@sw.ru> Date: Fri, 04 Feb 2011 17:47:00 -0000 From: Vladimir Simonov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Thunderbird/3.0.4 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: gdb: Incorrect stack unwinding if compressed debug info is used References: <1296238472.3009.ezmlm@sourceware.org> <4D46D872.6080407@sw.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-02/txt/msg00081.txt.bz2 On 02/04/2011 07:34 PM, Tom Tromey wrote: >>>>>> "Vladimir" == Vladimir Simonov writes: > > Vladimir> I've spend some time and, looks like, found the problem. It is in > Vladimir> dwarf2_symbol_mark_computed function (dwarf2read.c). Check > Vladimir> "DW_UNSND (attr)< dwarf2_per_objfile->loc.size" > Vladimir> is incorrect if compressed section is used. > > Thanks for finding this. > > Since fill_in_loclist_baton is going to read the loc section right away > anyhow, it seems to me that it is simpler to just have > dwarf2_symbol_mark_computed do it. > > Could you try the appended? > All is OK with it. I'd also suggest to remove dwarf2_read_section from fill_in_loclist_baton. Without it all works ok also. But resulted code looks a bit hackish: dwarf2_symbol_mark_computed (...) { if (attr_form_is_section_offset (attr)) /* We need to read the section before we can check its size, because the size is only valid once the section is uncompressed. */ dwarf2_read_section (dwarf2_per_objfile->objfile, &dwarf2_per_objfile->loc); if (attr_form_is_section_offset (attr) ........ && DW_UNSND (attr)< dwarf2_per_objfile->loc.size) ) { .... fill_in_loclist_baton /* which uses results of dwarf2_read_section */ .... } ... Regards Vladimir