From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7178 invoked by alias); 2 Jan 2012 14:10:04 -0000 Received: (qmail 7096 invoked by uid 22791); 2 Jan 2012 14:10:02 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wi0-f169.google.com (HELO mail-wi0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Jan 2012 14:09:47 +0000 Received: by wibhq12 with SMTP id hq12so11325731wib.0 for ; Mon, 02 Jan 2012 06:09:45 -0800 (PST) Received: by 10.180.93.193 with SMTP id cw1mr72038087wib.5.1325513385478; Mon, 02 Jan 2012 06:09:45 -0800 (PST) Received: from [192.168.0.103] (bl16-31-110.dsl.telepac.pt. [188.81.31.110]) by mx.google.com with ESMTPS id fq7sm50765758wbb.1.2012.01.02.06.09.43 (version=SSLv3 cipher=OTHER); Mon, 02 Jan 2012 06:09:44 -0800 (PST) Message-ID: <4F01BAA6.8000004@gmail.com> Date: Mon, 02 Jan 2012 14:10:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Jan Kratochvil CC: gdb-patches@sourceware.org Subject: Re: [patch] Fix gdb.cp/gdb2495.exp regression with gcc-4.7 References: <20111222202047.GA16110@host2.jankratochvil.net> In-Reply-To: <20111222202047.GA16110@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2012-01/txt/msg00035.txt.bz2 On 12/22/2011 08:20 PM, Jan Kratochvil wrote: > @@ -634,9 +635,32 @@ call_function_by_hand (struct value *function, int nargs, struct value **args) > case AT_ENTRY_POINT: > { > CORE_ADDR dummy_addr; > + gdb_byte *insn; > + CORE_ADDR insn_len; > > real_pc = funaddr; > dummy_addr = entry_point_address (); > + > + /* If the inferior call throws an uncaught C++ exception the inferior > + unwinder will try to unwind all the frames incl. the dummy frame. > + Using the entry_point_address directly will try to find FDE at the > + function right before the entry_point_address address as the > + unwinder subtracts 1 to get at the call instruction. FDE of the > + preceding function, if found, would be invalid for the dummy frame > + and it would crash the inferior's unwinder. Therefore attempt to > + skip the very first instruction of entry_point_address. */ > + I'm confused. Shouldn't this instead be handled in the unwind machinery? Is this subtraction you refer to the get_frame_address_in_block one? That already has special handling for something like this. Why doesn't it work?