From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32370 invoked by alias); 11 Dec 2002 21:27:14 -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 32363 invoked from network); 11 Dec 2002 21:27:13 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 11 Dec 2002 21:27:13 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 27F473C17; Wed, 11 Dec 2002 16:27:08 -0500 (EST) Message-ID: <3DF7ADAC.7060706@redhat.com> Date: Wed, 11 Dec 2002 13:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Unwind the PC first when creating a frame References: <3DF6A627.9060700@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-12/txt/msg00373.txt.bz2 > Hello, > > This patch changes the frame creation code so that it can unwind the PC before doing anything else. By unwinding the PC first, it becomes possible to correctly set the frame from the outset. The old code would set the frame's type last (resulting in architecture code having to back patch it). It also (at least in theory) makes it possible to avoid certain frame unwinds. > > Since, right now, all architectures currently specify a deprecated init frame pc method, the code isn't used by any architecture. A follow on will be to enable the code on at least one architecture. > > I'll commit the attached in a few days, > enjoy, > > Andrew > > > > 2002-12-10 Andrew Cagney > > * frame.c (frame_type_from_pc): New function. > (create_new_frame): Use frame_type_from_pc instead of custom code. > (get_prev_frame): When neither DEPRECATED_INIT_FRAME_PC_P nor > DEPRECATED_INIT_FRAME_PC_FIRST_P use frame_type_from_pc and > frame_pc_unwind to set the frame's type at the point of frame > creation. Hmm, I'm going to put this patch on hold until after the frame_id_unwind() patch I just posted is committed. That way the switch to use frame_id_unwind() and frame_pc_unwind() can be done in a single hit. Andrew