From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30690 invoked by alias); 11 Mar 2004 18:45:36 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 30679 invoked from network); 11 Mar 2004 18:45:31 -0000 Received: from unknown (HELO e3.ny.us.ibm.com) (32.97.182.103) by sources.redhat.com with SMTP; 11 Mar 2004 18:45:31 -0000 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e3.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2BIjUAB535812; Thu, 11 Mar 2004 13:45:30 -0500 Received: from DYN318008BLD.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2BIjSfp136638; Thu, 11 Mar 2004 13:45:29 -0500 From: Max Asbock To: Richard Henderson Subject: Re: problems parsing dwarf frame info on amd64 optimized code Date: Thu, 11 Mar 2004 18:45:00 -0000 User-Agent: KMail/1.5.4 Cc: gcc@gcc.gnu.org References: <200403081044.03933.masbock@us.ibm.com> <20040310194055.GA2224@redhat.com> In-Reply-To: <20040310194055.GA2224@redhat.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200403111007.05459.masbock@us.ibm.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2004-03/txt/msg00539.txt.bz2 Hi Richard, sorry for being unclear. I will try again: I am unwinding through -O optimized amd64 C code using the dwarf unwind inf= o. (gcc version 3.5.0 20040308) First Frame: The dwarf parser finds two rules in the CIE: CFA_def_cfa r7+0x8 (rsp) CFA_offset r16 at cfa-0x8 (return address) and then in the FDE it finds: ... CFA_def_cfa_offset When applying the rules I set cfa1 =3D r7 + offset1 There is no rule for r7, so I was assuming r7 stays unchanged. Second Frame: CFA_def_cfa r7+0x8 CFA_offset r16 at cfa-0x8 ... CFA_def_cfa_offset Applying the rules gives cfa2 =3D r7 + offset2 however this is incorrect, the actual value is cfa2 =3D cfa1 + offset2 >From this I infer that the assumption I made about r7 remaining unchanged=20 when there is no rule for it is incorrect and what I really have to do is s= omething like: Frame 1: cfa1 =3D r7 + offset1 if (r7 unspecified) r7 =3D cfa1 Frame 2: cfa2 =3D r7 + offset2 .... Is this the correct approach or are there cases where it would fail? thanks, max