From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10155 invoked by alias); 4 Jun 2008 13:12:58 -0000 Received: (qmail 10146 invoked by uid 22791); 4 Jun 2008 13:12:58 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Jun 2008 13:12:32 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K3smz-0006nX-K5 for gdb@sources.redhat.com; Wed, 04 Jun 2008 13:12:29 +0000 Received: from mobius.qnx.com ([209.226.137.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Jun 2008 13:12:29 +0000 Received: from aristovski by mobius.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Jun 2008 13:12:29 +0000 To: gdb@sources.redhat.com From: Aleksandar Ristovski Subject: Re: Frame lost after 'leave' and before 'ret' instruction on i386? Date: Wed, 04 Jun 2008 13:12:00 -0000 Message-ID: References: <482DA814.7030703@qnx.com> <20080516155828.GA31038@caradoc.them.org> <48358355.7050500@qnx.com> <20080522143936.GA32221@caradoc.them.org> <48358860.5010703@qnx.com> <1211479573.3601.84.camel@localhost.localdomain> <4836E0A7.8050800@qnx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) In-Reply-To: <4836E0A7.8050800@qnx.com> 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-06/txt/msg00017.txt.bz2 Any comments on this? Aleksandar Ristovski wrote: > Hello, > The patch is an attempt to solve the issue from the subject. It > introduces a check for in_function_epilogue_p and introduces > architecture level prev_register_from_epilogue. > > The patch is a draft (works but is not complete). > Rationale: Dealing with epilogue in frame unwinders needs to be done > only in sentinel frame (older frames will never be in epilogue). > Comments appreciated. > > > Thanks, > > Aleksandar Ristovski > QNX Software Systems > > > ChangeLog (for reference only): > > * gdbarch.c, gdbarch.h: Regenerated. > * gdbarch.sh: Introduce gdbarch_prev_frame_from_epilogue and provide > default_prev_frame_from_epilogue. > * i386-tdep.c (i386_in_function_epilogue_p, > i386_prev_register_from_epilogue): New functions. > (struct frame_unwind_cache): Struct definition. > (i386_gdbarch_init): Register i386_prev_register_from_epilogue and > i386_in_function_epilogue_p. > * sentinel-frame.c (sentinel_frame_prev_register): Check if we are > in epilogue and if so, call gdbarch provided prev_frame_from_epilogue. > If this returns NULL do as before. >