From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31487 invoked by alias); 14 Dec 2003 18:22:29 -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 31480 invoked from network); 14 Dec 2003 18:22:26 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 14 Dec 2003 18:22:26 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id hBEIMGmb001932; Sun, 14 Dec 2003 19:22:16 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id hBEIMGCq014168; Sun, 14 Dec 2003 19:22:16 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id hBEIMFZ7014165; Sun, 14 Dec 2003 19:22:15 +0100 (CET) Date: Sun, 14 Dec 2003 18:22:00 -0000 Message-Id: <200312141822.hBEIMFZ7014165@elgar.kettenis.dyndns.org> From: Mark Kettenis To: cagney@gnu.org CC: gdb-patches@sources.redhat.com In-reply-to: <3FDBAD57.7060906@gnu.org> (message from Andrew Cagney on Sat, 13 Dec 2003 19:22:47 -0500) 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> <3FDBAD57.7060906@gnu.org> X-SW-Source: 2003-12/txt/msg00371.txt.bz2 Date: Sat, 13 Dec 2003 19:22:47 -0500 From: Andrew Cagney > 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? I think so. I tested i386-unknown-freebsd4.7, i386-pc-solaris2.9, x86_64-unknown-freebsd5.2 and alpha-unknown-freenbsd5.2, and things didn't change. 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. I think I agree. So shall I remove the code? Mark