From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9096 invoked by alias); 7 Mar 2003 15:25:56 -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 9056 invoked from network); 7 Mar 2003 15:25:55 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 7 Mar 2003 15:25:55 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id F043A2A9C; Fri, 7 Mar 2003 10:25:50 -0500 (EST) Message-ID: <3E68B9FE.6090207@redhat.com> Date: Fri, 07 Mar 2003 15:25: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: Michal Ludvig Cc: GDB Patches Subject: Re: [RFA] Debug info detection. References: <3E67D471.3040100@suse.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00159.txt.bz2 > Hi all, > The attached patch adds new function cfi_have_unwind_info() that I'll use for detection, whether a given function has a dwarf2 unwind info (from .eh_frame or .debug_frame) or not. I'll use it in the upcomming x86_64_frame_p() to detect which set of unwind functions should be returned for a given frame. Your comment about x86_64_frame_p() makes me wonder if you're going in the right direction. Looking at the d10v, you'll see: frame_unwind_append_predicate (gdbarch, d10v_frame_p); For the x86-64, since it wants to also use dwarf2cfi and dwarf2eh, I'd expect to see something like: /* Try for a true CFI frame first. If that fails, fall back to a .eh_frame info. */ frame_unwind_append_predicate (gdbarch, dwarf2cfi_frame_p); frame_unwind_append_predicate (gdbarch, dwarf2eh_frame_p); /* Finally, and as a last resort, use a prologue based unwinder. */ frame_unwind_append_predicate (gdbarch, x86_64_frame_p); While I'm sure that splitting dwarf2cfi and dwarf2eh is logical, having separate x86_64_frame_p() that only implements traditional prologe based unwind is correct. Can I suggest starting from the other end - a new file dwarf2cfi-frame.[hc] and then moving in from there? The dwarf2expr.[hc] code was recently added and that was ment to superseed much of dwarf2cfi.c. I'd also have a copy of cagney_offbyone-20030303-branch handy (you could even prototype the changes on it or a successor). That contains a key fix that hasn't yet been committed to the mainline. Andrew