From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27332 invoked by alias); 4 Apr 2008 17:22:38 -0000 Received: (qmail 27321 invoked by uid 22791); 4 Apr 2008 17:22:37 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 04 Apr 2008 17:22:19 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 719BC2A9F31 for ; Fri, 4 Apr 2008 13:22:17 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id W5BA769+WjB6 for ; Fri, 4 Apr 2008 13:22:17 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3C4532A9F22 for ; Fri, 4 Apr 2008 13:22:17 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 05351E7ACD; Fri, 4 Apr 2008 10:22:14 -0700 (PDT) Date: Fri, 04 Apr 2008 19:10:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFC 2/5] Frame unwinding using struct value Message-ID: <20080404172214.GD23283@adacore.com> References: <20080331221024.GA22334@caradoc.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080331221024.GA22334@caradoc.them.org> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00104.txt.bz2 > +struct value * > +frame_unwind_register_value (struct frame_info *frame, int regnum) > +{ > + struct value *value; > + > + if (frame_debug) > + { > + fprintf_unfiltered (gdb_stdlog, "\ > +{ frame_unwind_register_value (frame=%d,regnum=%d(%s),...) ", > + frame->level, regnum, > + frame_map_regnum_to_name (frame, regnum)); > + } > + > + gdb_assert (frame != NULL); The gdb_assert should be moved up before the "if (frame_debug)" block. Otherwise, we'll bomb while dereferencing FRAME before we trip the assertion. (I realize that this code was already like this before) Other than that, I tried to read it as carefully as possible and grasp as much of the big picture as I could, and it looked good to me. I can help with the conversion of some of the targets: hppa, ia64, mips (but it would be better if someone having access to mips-linux did it for me, mips-irix results are not stellar right now), powerpc, and sparc. I can't test alpha anymore, for some reason dejagnu no longer works on our Tru64 machines :-(. -- Joel