From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2227 invoked by alias); 11 Nov 2005 10:35:45 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 2157 invoked by uid 22791); 11 Nov 2005 10:35:36 -0000 Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 11 Nov 2005 10:35:36 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1EaWFo-00070N-VI for gdb@sources.redhat.com; Fri, 11 Nov 2005 13:35:33 +0300 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1EaWFb-0006zc-NA; Fri, 11 Nov 2005 13:35:19 +0300 From: Vladimir Prus To: Jim Blandy Subject: Re: frame_id question Date: Fri, 11 Nov 2005 10:35:00 -0000 User-Agent: KMail/1.7.2 Cc: gdb@sources.redhat.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511111335.18605.ghost@cs.msu.su> X-SW-Source: 2005-11/txt/msg00226.txt.bz2 On Friday 11 November 2005 13:23, Jim Blandy wrote: > Vladimir Prus writes: > > The question is: why frame id has to include program address at all? It > > it ever possible for two frames to have the same stack address? If so, > > when? > > Some functions don't need any stack space at all. Such a function can > even call other functions if it moves the return address to a > callee-saved register while doing so. Do I understand correctly that this can happen only on architectures where return address is not automatically pushed to the stack, but moved to a special register? Like MIPS's "jal" instructions that moves return address to $31 > Unwinding through such a call, > the caller's frame will have the same CFA as the callee, but a > different function address. Since the two frame ID's have different > function addresses, frame_id_eq will declare them distinct, and GDB > won't complain that it has gotten stuck trying to unwind the stack. Does it mean that for architectures with automatic pushing of return address, using '0' as code address in frame_id will be safe? Or there are some corner cases? Thanks, Volodya