From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4160 invoked by alias); 17 Nov 2003 22:27:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4152 invoked from network); 17 Nov 2003 22:27:52 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 17 Nov 2003 22:27:52 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 132D72B8F; Mon, 17 Nov 2003 17:27:48 -0500 (EST) Message-ID: <3FB94B63.7000906@gnu.org> Date: Mon, 17 Nov 2003 22:27:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix backtrace/1435 References: <200311172135.hAHLZl0n009190@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00366.txt.bz2 > This patch fixes backtrace/1435. The failure occurs when main > immediately follows a function (say foo) which has its epilogue > optimized out by the compiler. In that case the backtrace will be > terminated prematurely since get_frame_pc on foo's frame will return > the address of the first instruction of main. This can be fixed by > using get_frame_address_in_block. > > Ok to check this in? Yes, but with more comments :-) > Index: ChangeLog > from Mark Kettenis > > * frame.c (get_prev_frame): Use result from > get_frame_address_in_block instead of get_frame_pc as argument to > inside_main_func. > Andrew