From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30832 invoked by alias); 8 May 2003 00:03:02 -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 30825 invoked from network); 8 May 2003 00:03:02 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 8 May 2003 00:03:02 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D9FAE2B2F; Wed, 7 May 2003 20:02:57 -0400 (EDT) Message-ID: <3EB99EB1.8090205@redhat.com> Date: Thu, 08 May 2003 00:03: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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00101.txt.bz2 > On May 7, 3:25pm, Kevin Buettner wrote: > > >> ../../src/gdb/frame.c:2083: internal-error: get_frame_type: >> Assertion `frame->unwind->type != UNKNOWN_FRAME' failed. > > > FWIW, this problem is "fixed" by backing out the following change: > > 2003-04-16 Andrew Cagney > > * frame.c (get_prev_frame): Do not initialize "unwind" or "type", > update comments. > (get_frame_type): Initialize unwind and type when needed. > (get_frame_id, frame_register_unwind): Ditto. The code is: > enum frame_type > get_frame_type (struct frame_info *frame) > { > /* Some targets still don't use [generic] dummy frames. Catch them > here. */ > if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES > && deprecated_frame_in_dummy (frame)) > return DUMMY_FRAME; > if (frame->unwind == NULL) > { I'd only expect the d10v to execute the following. > /* Initialize the frame's unwinder because it is that which > provides the frame's type. */ > frame->unwind = frame_unwind_find_by_pc (current_gdbarch, > get_frame_pc (frame)); For the d10v, this never returns legacy_saved_regs_unwinder and so .... > /* 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); ... this can never be UNKNOWN_FRAME. > frame->type = frame->unwind->type; > } > if (frame->type == UNKNOWN_FRAME) > return NORMAL_FRAME; > else > return frame->type; > } What should happen is: int legacy_frame_p (struct gdbarch *current_gdbarch) { return (DEPRECATED_INIT_FRAME_PC_P () || DEPRECATED_INIT_FRAME_PC_FIRST_P () || DEPRECATED_INIT_EXTRA_FRAME_INFO_P () || DEPRECATED_FRAME_CHAIN_P () || !gdbarch_unwind_dummy_id_p (current_gdbarch) || !SAVE_DUMMY_FRAME_TOS_P ()); should return true, and hence get_prev_frame should call legacy_get_prev_frame() which should always set ->unwind? 'set debug frame 1' Will at least indicate which type of frame is being created. (unless you're trying to get code to use the new unwinder that is, or its some sort of inner most frame edge case?). Andrew