From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26085 invoked by alias); 11 Nov 2005 10:23:38 -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 25913 invoked by uid 22791); 11 Nov 2005 10:23:22 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 11 Nov 2005 10:23:22 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id jABANKfo031276 for ; Fri, 11 Nov 2005 05:23:20 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jABANKV28630; Fri, 11 Nov 2005 05:23:20 -0500 Received: from theseus.home..redhat.com (vpn26-2.sfbay.redhat.com [172.16.26.2]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id jABANHt2011530; Fri, 11 Nov 2005 05:23:18 -0500 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: frame_id question References: From: Jim Blandy Date: Fri, 11 Nov 2005 10:23:00 -0000 In-Reply-To: (Vladimir Prus's message of "Wed, 09 Nov 2005 19:22:16 +0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-11/txt/msg00225.txt.bz2 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. 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.