From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19765 invoked by alias); 9 Nov 2004 16:06:08 -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 19190 invoked from network); 9 Nov 2004 16:05:37 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 9 Nov 2004 16:05:37 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id iA9G5Xf1029777; Tue, 9 Nov 2004 17:05:33 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id iA9G5Wet091110; Tue, 9 Nov 2004 17:05:33 +0100 (CET) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id iA9G5WdZ091107; Tue, 9 Nov 2004 17:05:32 +0100 (CET) Date: Tue, 09 Nov 2004 16:07:00 -0000 Message-Id: <200411091605.iA9G5WdZ091107@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: cagney@gnu.org CC: gdb@sources.redhat.com In-reply-to: <4190D933.5070006@gnu.org> (message from Andrew Cagney on Tue, 09 Nov 2004 09:50:27 -0500) Subject: Re: [RFC] Is skip_prologue_using_sal actually usable? References: <200411071355.iA7DtfTE002934@elgar.sibelius.xs4all.nl> <4190D933.5070006@gnu.org> X-SW-Source: 2004-11/txt/msg00084.txt.bz2 Date: Tue, 09 Nov 2004 09:50:27 -0500 From: Andrew Cagney Mark, DWARF 2 provides us with the exact location[s] of a prologue end, can we use that? DW_LNS_set_prologue_end is a DWARF3 thingy, which GCC doesn't generate yet. The DWARF3 definition seems to match exactly what I have in mind though. skip_prologue, just like the traditional unwinder, only has to be ``good enough''. The problem here is that we as devlopers don't seem to agree on what we mean by "good enough". As a result, the implementations in GDB vary wildly throughout GDB. The concrete problem I'm facing here is that skip_prologue_using_sal as used by mips-tdep.c doesn't work for me on OpenBSD/mips64. It can be fixed by applying the patch in the message that started this thread, but if an implementation only has to be "good enough", I think skip_prologue_using_sal is actually doing to much. Something like the following code would be better: static CORE_ADDR sparc32_skip_prologue (CORE_ADDR start_pc) { struct symtab_and_line sal; CORE_ADDR func_start, func_end; struct sparc_frame_cache cache; /* This is the preferred method, find the end of the prologue by using the debugging information. */ if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end)) { sal = find_pc_line (func_start, 0); if (sal.end < func_end && start_pc <= sal.end) return sal.end; } return sparc_analyze_prologue (start_pc, 0xffffffffUL, &cache); } Mark