From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27799 invoked by alias); 3 Mar 2004 16:43:26 -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 27773 invoked from network); 3 Mar 2004 16:43:25 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 3 Mar 2004 16:43:25 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 410AA2B92; Wed, 3 Mar 2004 11:43:20 -0500 (EST) Message-ID: <40460B28.3000504@gnu.org> Date: Wed, 03 Mar 2004 16:43:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfc] trad-frame change Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00045.txt Message-ID: <20040303164300.eIqPMBdViFpeJaL05A5bVwwuoRhXc6mSZNSbr6LPNsE@z> Think of this as a pseudo patch. I'm looking to extend the trad-frame code so that it includes the interface: trad_frame_append (gdbarch, frame_type, frame_sniffer, frame_cache); This would do all the housekeeping necessary to create a FRAME_TYPE unwinder implemented with FRAME_SNIFFER and FRAME_CACHE functions. The second function would have the interface: struct trad_frame_cache { struct frame_id this_id; CORE_ADDR this_base; struct trad_frame *saved_regs; }; void frame_cache (struct frame_info *next_frame, struct trad_frame_cache *this_cache); and would be called _once_ to populate the entire trad-frame cache. After that frame ID and register requests would be handled directly. My rationale is simple. Having just churned out unwinders for two architectures I'm seeing a pattern that suggests this would make life easier: - people in a hurry can use interface - people wanting to tune their unwinder can use the lower-level interface thoughts? Andrew PS: This has been suggested before, but not as a new layer above the existing unwinder code