From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28291 invoked by alias); 13 Aug 2003 14:39:52 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28278 invoked from network); 13 Aug 2003 14:39:51 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 13 Aug 2003 14:39:51 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D8CB62B7F; Wed, 13 Aug 2003 10:39:41 -0400 (EDT) Message-ID: <3F3A4DAD.7000702@redhat.com> Date: Wed, 13 Aug 2003 14:39:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Henderson Cc: Michal Ludvig , Daniel Jacobowitz , gdb Subject: Re: [testsuite & dwarf2] How to handle store.exp failure on AMD64? References: <3F3212B7.8060003@suse.cz> <20030807135035.GA28000@nevyn.them.org> <3F326928.3020502@redhat.com> <20030807150201.GA29511@nevyn.them.org> <3F3275EC.3000702@redhat.com> <3F32C75D.2010007@suse.cz> <3F39B678.70409@redhat.com> <20030813045405.GB11912@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-08/txt/msg00135.txt.bz2 > On Tue, Aug 12, 2003 at 11:54:32PM -0400, Andrew Cagney wrote: > >> I would have expected the CIE.INITIAL_INSTRUCTIONS to specify the >> default state of all DWARF2 registers, and not just a select few. > > > Folks already complain unwind info is too large. Sounds like a furphy, the difference really is in the noise. > As I said, GCC's unwinder assumes DW_CFA_same_value unless otherwise > stated. Since scratch registers aren't live across the call, it > doesn't matter that we don't mark registers DW_CFA_undefined; any > (accurate) debug information you'll find at the call site in the > caller simply won't say that values are live in those registers. > Anything else would be a bug. > > So assuming DW_CFA_same_value produces the most compact representation. Hmm, an important detail I should have re-iterated (Daniel's original post mentioned it but it appears to been lost in that exchange). The unwind info is in two parts: CIE: This is a global structure shared between many many FDEs FDE: This is the thing that describes an unwind table. The initial status of each register is drawn from the CIE, and not the FDE. In the case of the example in question (store.c) there are 3 CIEs (I halved everthing as .eh_frame makes the info appear twice) and 30 FDEs. Breaking it down: 1 CIE appears to have 0 references; 1 has 1 reference; and 1 (the only real one) has the remaining 29 references. At worst GCC would need to add the information to 3 CIEs, at best 1. If GCC is going to move forward with optimizations that involve local functions not complying to the ABI, it will need to supply complete INITIAL_INSTRUCTIONS information. Might as well fix this bug and start doing it now. Andrew