From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30790 invoked by alias); 22 May 2007 01:40:29 -0000 Received: (qmail 30719 invoked by uid 22791); 22 May 2007 01:40:17 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 May 2007 01:40:11 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id B99FE48CDE2; Mon, 21 May 2007 21:40:05 -0400 (EDT) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15603-01-3; Mon, 21 May 2007 21:40:05 -0400 (EDT) Received: from joel.gnat.com (unknown [70.71.0.212]) by nile.gnat.com (Postfix) with ESMTP id 8C4CB48CDD7; Mon, 21 May 2007 21:40:04 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 9D784E7B4F; Mon, 21 May 2007 18:40:44 -0700 (PDT) Date: Tue, 22 May 2007 01:40:00 -0000 From: Joel Brobecker To: Maxim Grigoriev Cc: gdb@sourceware.org, Marc Gauthier , Pete MacLiesh , Ross Morley Subject: Re: Understanding GDB frames Message-ID: <20070522014044.GC3627@adacore.com> References: <46521C04.7040405@hq.tensilica.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46521C04.7040405@hq.tensilica.com> User-Agent: Mutt/1.4.2.2i 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: 2007-05/txt/msg00099.txt.bz2 If my understanding of the frame code is correct, then the only thing that is really guaranteed is that the frame ID remains constant throughout the lifetime of its associated frame, or function call. The rest is implementation-dependent. In practice, I think most targets implement the frame ID as a tuple that contains one stack address (usually the address on the stack of the function frame), and one code address (usually the address of the first instruction for that function). So two consecutive calls to the same function from the same caller would usually result in the same frame ID being computed for these two calls. But this is not guaranteed, for instance if the compiler elected to adjust the stack for whatever reason between the two function calls. IA64 is slighly more complicated, because it also has to take into account the fact that it has a register stack. So the frame ID tuple also includes a non-zero "special addr". Hope this helps. Others will correct me if I'm wrong. -- Joel