From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3628 invoked by alias); 24 Nov 2008 13:24:27 -0000 Received: (qmail 3569 invoked by uid 22791); 24 Nov 2008 13:24:26 -0000 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Nov 2008 13:23:51 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8489D29001B; Mon, 24 Nov 2008 14:23:40 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3EdwuerPD6-C; Mon, 24 Nov 2008 14:23:39 +0100 (CET) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id ADB81290003 for ; Mon, 24 Nov 2008 14:23:39 +0100 (CET) Received: by province.act-europe.fr (Postfix, from userid 560) id 945D7165719; Mon, 24 Nov 2008 14:23:39 +0100 (CET) Date: Mon, 24 Nov 2008 18:05:00 -0000 From: Jerome Guitton To: gdb-patches@sourceware.org Subject: [RFA] Use the frame address in block to locate alpha mdebug records Message-ID: <20081124132339.GA80088@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00638.txt.bz2 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1193 Hello, In alpha-mdebug-tdep.c, the frame address in block is used to locate the mdebug information associated to a function... except for one occurence, in alpha_mdebug_frame_unwind_cache, where the return address is used. I fail to understand why, and it seems wrong to me: the return address may point to the "next" function in .text, so we may end up fetching the wrong debug record. This typically happens with no-return functions that do not have epilogue sequences. This patch should fix this. This also fixes Ada's "catch exception" feature on alpha-tru64; the procedures that raise exceptions in the Ada run-time are no-return, which is why they are affected by the problem I mentionned. I failed to run the dejaGNU testsuite on an alpha machine, too many hangups. However, I have been validated this patch against AdaCore's internal testsuite and I had no regression. I am pretty confident that it will not break anything. OK to apply? Thanks, Jerome 2008-11-24 Jerome Guitton * alpha-mdebug-tdep.c (alpha_mdebug_frame_unwind_cache): Use the frame address in block instead of the return address to locate the mdebug PDR of the frame. --17pEHd4RhPHOinZp Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="alpha-mdebug-tdep.c.diff" Content-length: 694 Index: alpha-mdebug-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/alpha-mdebug-tdep.c,v retrieving revision 1.21 diff -u -p -r1.21 alpha-mdebug-tdep.c --- alpha-mdebug-tdep.c 21 May 2008 14:47:26 -0000 1.21 +++ alpha-mdebug-tdep.c 24 Nov 2008 11:55:55 -0000 @@ -193,7 +193,7 @@ alpha_mdebug_frame_unwind_cache (struct info = FRAME_OBSTACK_ZALLOC (struct alpha_mdebug_unwind_cache); *this_prologue_cache = info; - pc = get_frame_pc (this_frame); + pc = get_frame_address_in_block (this_frame); /* ??? We don't seem to be able to cache the lookup of the PDR from alpha_mdebug_frame_p. It'd be nice if we could change --17pEHd4RhPHOinZp--