From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25166 invoked by alias); 16 May 2008 15:58:55 -0000 Received: (qmail 25106 invoked by uid 22791); 16 May 2008 15:58:54 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 May 2008 15:58:34 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CE85B983F9; Fri, 16 May 2008 15:58:29 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id AB314983D6; Fri, 16 May 2008 15:58:29 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jx2KC-00084x-MX; Fri, 16 May 2008 11:58:28 -0400 Date: Fri, 16 May 2008 15:58:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: gdb@sourceware.org Subject: Re: Frame lost after 'leave' and before 'ret' instruction on i386? Message-ID: <20080516155828.GA31038@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , gdb@sourceware.org References: <482DA814.7030703@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <482DA814.7030703@qnx.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00125.txt.bz2 On Fri, May 16, 2008 at 11:28:20AM -0400, Aleksandar Ristovski wrote: > What happens is, we have restored the stack pointer but gdb is unaware of that fact and tries to unwind using already unwound value... > > how is this supposed to work? Poorly. The biggest problem, in my opinion, is that GCC emits bogus unwind info that does not describe epilogues. I don't know about other compilers. So far no one has fixed this in a way that didn't bloat debug info to an unacceptable size. When DWARF unwinding is not in use, there's the in_epilogue_p hook. Prologue analyzers could also detect epilogues using the same technique. But this is slow and complicated. -- Daniel Jacobowitz CodeSourcery