From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5540 invoked by alias); 8 May 2003 00:22:13 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5533 invoked from network); 8 May 2003 00:22:12 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 8 May 2003 00:22:12 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8FF2C2B2F; Wed, 7 May 2003 20:22:08 -0400 (EDT) Message-ID: <3EB9A330.50601@redhat.com> Date: Thu, 08 May 2003 00:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: gdb@sources.redhat.com Subject: Re: frame.c assertion failure References: <1030507222547.ZM32134@localhost.localdomain> <1030507234012.ZM557@localhost.localdomain> <3EB99EB1.8090205@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00102.txt.bz2 > (unless you're trying to get code to use the new unwinder that is, or its some sort of inner most frame edge case?). Nope, the backtrace tells all ... > #0 internal_error (file=0x82acccd "../../src/gdb/frame.c", line=2083, > string=0x82accb2 "%s%sAssertion `%s' failed.") at ../../src/gdb/utils.c:800 > #1 0x08141d9f in get_frame_type (frame=0x87af19c) at ../../src/gdb/frame.c:2083 > #2 0x080f39d6 in mips_init_extra_frame_info (fromleaf=0, fci=0x87af19c) > at ../../src/gdb/mips-tdep.c:2504 The legacy mips target is calling get_frame_type() on a frame that hasn't yet had it's type initialized. I can think of: -- Tweaking the below if to also test !legacy_frame_p(). > enum frame_type > get_frame_type (struct frame_info *frame) ... > if (frame->unwind == NULL) -- Tweaking the assignment to also check !legacy_frame_p(). > /* FIXME: cagney/2003-04-02: Rather than storing the frame's > type in the frame, the unwinder's type should be returned > directly. Unfortunatly, legacy code, called by > legacy_get_prev_frame, explicitly set the frames type using > the method deprecated_set_frame_type(). */ > gdb_assert (frame->unwind->type != UNKNOWN_FRAME); -- explicitly setting ->unwind to legacy_... in legacy_get_prev_frame. I think the first is best: - the second causes a get_frame_pc() call when, quite possibly, the legacy code isn't ready for this (see comments in legacy_get_prev_frame). - the third leaves things open to gdb unintentionally calling a legacy unwind method. Andrew