From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26072 invoked by alias); 19 Mar 2009 14:18:21 -0000 Received: (qmail 26041 invoked by uid 22791); 19 Mar 2009 14:18:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Mar 2009 14:18:09 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5A3492BAC55; Thu, 19 Mar 2009 10:18:07 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5iAReQ9+cK1t; Thu, 19 Mar 2009 10:18:07 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 401E92BAC53; Thu, 19 Mar 2009 10:18:07 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 03BE9F5CFA; Thu, 19 Mar 2009 07:18:06 -0700 (PDT) Date: Thu, 19 Mar 2009 14:18:00 -0000 From: Joel Brobecker To: Roland Schwingel Cc: gdb Subject: Re: Strange stack trace on Windows Message-ID: <20090319141805.GS32001@adacore.com> References: <49C0BE1F.8050909@onevision.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49C0BE1F.8050909@onevision.de> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-03/txt/msg00126.txt.bz2 > Unfortunately it does not work. > cache->pc is set from get_frame_func(this_frame). > current_pc is set from get_frame_pc(this_frame) I am not sure why it doesn't work. Maybe it's one of these things that are so obvious that you don't see them anymore... In any case, my reasoning was that: - get_frame_func(this_frame) returns the address of the function corresponding to this_frame - get_frame_pc(this_frame) returns the current PC in this frame. The idea is that, during a function call made during single-stepping, you'll stop at the first instruction of the function. At this point, we want to use the standard method of computing the frame cache rather than using the alternative method of trusting the %ebp register. This is what the check that I added was about. The patch that I sent was to be made on top of the first patch that I sent long ago. Did you do that? > In my tests both cache->pc and current_pc are ALWAYS identical. They should be identical when you step into a function during your "next" operation, but other should be different. If this is not the case, then I missed something (maybe something obvious). -- Joel