From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21719 invoked by alias); 14 Dec 2003 00:23:01 -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 21699 invoked from network); 14 Dec 2003 00:23:00 -0000 Received: from unknown (HELO localhost.redhat.com) (65.49.0.121) by sources.redhat.com with SMTP; 14 Dec 2003 00:23:00 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8ADB22B8F; Sat, 13 Dec 2003 19:22:47 -0500 (EST) Message-ID: <3FDBAD57.7060906@gnu.org> Date: Sun, 14 Dec 2003 00:23: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: [PATCH] Remove zero PC check from blockframe.c:inside_main_func() References: <200312131509.hBDF9TLA035995@elgar.kettenis.dyndns.org> <3FDB6232.5040102@gnu.org> <200312132206.hBDM6p33006707@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-12/txt/msg00365.txt.bz2 > RCS file: /cvs/src/src/gdb/frame.c,v > retrieving revision 1.153 > diff -u -p -r1.153 frame.c > --- frame.c 10 Dec 2003 17:40:42 -0000 1.153 > +++ frame.c 13 Dec 2003 21:47:43 -0000 > @@ -1732,6 +1732,7 @@ struct frame_info * > get_prev_frame (struct frame_info *this_frame) > { > struct frame_info *prev_frame; > + CORE_ADDR pc; > > if (frame_debug) > { > @@ -1961,7 +1962,8 @@ get_prev_frame (struct frame_info *this_ > because (well ignoring the PPC) a dummy frame can be located > using THIS_FRAME's frame ID. */ > > - if (frame_pc_unwind (this_frame) == 0) > + pc = frame_pc_unwind (this_frame); > + if (this_frame->level >= 0 && pc == 0) > { > /* The allocated PREV_FRAME will be reclaimed when the frame > obstack is next purged. Can it be deleted? This would likely affect the initial call sequence made to the unwinder - frame_pc_unwind may not be called first (?). But I also think that the reason for insisting on an explicit pc unwind may have also been removed - the new code is written more robustly anyway. If not, I'd prefer the PC delcaration to be made local to that code. Andrew