From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14334 invoked by alias); 27 Jun 2009 22:23:19 -0000 Received: (qmail 14325 invoked by uid 22791); 27 Jun 2009 22:23:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Jun 2009 22:23:07 +0000 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id DC98F1C1529B for ; Sun, 28 Jun 2009 00:23:04 +0200 (CEST) Received: from localhost (dynscan2.mnet-online.de [192.168.1.215]) by mail.m-online.net (Postfix) with ESMTP id D164390280 for ; Sun, 28 Jun 2009 00:23:04 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan2.mnet-online.de [192.168.1.215]) (amavisd-new, port 10024) with ESMTP id nw7scHOTJ5xF for ; Sun, 28 Jun 2009 00:23:03 +0200 (CEST) Received: from igel.home (DSL01.83.171.173.123.ip-pool.NEFkom.net [83.171.173.123]) by mail.mnet-online.de (Postfix) with ESMTP for ; Sun, 28 Jun 2009 00:23:03 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 7891010C42F; Sun, 28 Jun 2009 00:23:02 +0200 (CEST) From: Andreas Schwab To: gdb-patches@sourceware.org Subject: Don't overshoot when executing cfa instructions X-Yow: I'm sitting on my SPEED QUEEN.. To me, it's ENJOYABLE.. I'm WARM.. I'm VIBRATORY.. Date: Sat, 27 Jun 2009 22:23:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00777.txt.bz2 The dwarf2 unwinder is careful to substract one from pc when finding the associated fde, but when executing the cfa instructions it uses the original pc as the limit, which may cause it to execute too much, for example if this is a frame calling a noreturn function. Tested on powerpc-linux. Andreas. 2009-06-28 Andreas Schwab * dwarf2-frame.c (execute_cfa_program): Use get_frame_address_in_block instead of get_frame_pc. --- gdb/dwarf2-frame.c.~1.89.~ 2009-06-25 00:05:03.000000000 +0200 +++ gdb/dwarf2-frame.c 2009-06-27 21:52:17.000000000 +0200 @@ -376,7 +376,7 @@ execute_cfa_program (struct dwarf2_fde * struct dwarf2_frame_state *fs) { int eh_frame_p = fde->eh_frame_p; - CORE_ADDR pc = get_frame_pc (this_frame); + CORE_ADDR pc = get_frame_address_in_block (this_frame); int bytes_read; struct gdbarch *gdbarch = get_frame_arch (this_frame); -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."