From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23788 invoked by alias); 30 Sep 2002 15:53:17 -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 23781 invoked from network); 30 Sep 2002 15:53:16 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 30 Sep 2002 15:53:16 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E4CED3CB7; Mon, 30 Sep 2002 11:53:16 -0400 (EDT) Message-ID: <3D98736C.30607@redhat.com> Date: Mon, 30 Sep 2002 08:53:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michal Ludvig Cc: Gerhard Tonn , gdb-patches@sources.redhat.com Subject: Re: [PATCH RFC] DWARF2 CFI exploitation for Linux on S/390 References: <3D91908A.8030308@suse.cz> <3D93C87C.4050603@redhat.com> <3D986506.2010401@suse.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00757.txt.bz2 > What needs to be done for this in general? The theory is that the function: static void set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp, frame_register_unwind_ftype **unwind) { if (!USE_GENERIC_DUMMY_FRAMES) /* Still need to set this to something. The ``info frame'' code calls this function to find out where the saved registers are. Hopefully this is robust enough to stop any core dumps and return vaguely correct values.. */ *unwind = frame_saved_regs_register_unwind; else if (PC_IN_CALL_DUMMY (pc, fp, fp)) *unwind = generic_call_dummy_register_unwind; else *unwind = frame_saved_regs_register_unwind; } is modified so that it contains a clause like: else if (this frame's block contains dwarf2cfi && this target things it works with dwarf2cfi) *unwind = dwarf2cfi_register_unwind; where dwarf2cfi_register_unwind() is strictly *recursive* - it uses functions defined in frame.h when it needs a read a more inner register. Variation on the theme might be: else if (architecture things its got a custom unwind function for this frame's block) *unwind = architecture's custom unwind function There are warts in the theory - also need to add a per-frame frame_saved_pc() and (probably) some sort of per-frame frame_chain(). (see recent post to gdb@). Andrew