From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13047 invoked by alias); 2 Jan 2012 14:44:20 -0000 Received: (qmail 13037 invoked by uid 22791); 2 Jan 2012 14:44:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 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-ww0-f43.google.com (HELO mail-ww0-f43.google.com) (74.125.82.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Jan 2012 14:44:06 +0000 Received: by wgbds11 with SMTP id ds11so21829058wgb.12 for ; Mon, 02 Jan 2012 06:44:05 -0800 (PST) Received: by 10.227.207.15 with SMTP id fw15mr48435057wbb.15.1325515445470; Mon, 02 Jan 2012 06:44:05 -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 u5sm50879183wbm.2.2012.01.02.06.44.03 (version=SSLv3 cipher=OTHER); Mon, 02 Jan 2012 06:44:04 -0800 (PST) Message-ID: <4F01C2B2.7010808@gmail.com> Date: Mon, 02 Jan 2012 14:44: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> <4F01BAA6.8000004@gmail.com> <20120102141937.GA14138@host2.jankratochvil.net> In-Reply-To: <20120102141937.GA14138@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/msg00038.txt.bz2 On 01/02/2012 02:19 PM, Jan Kratochvil wrote: > On Mon, 02 Jan 2012 15:09:42 +0100, Pedro Alves wrote: >> 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? > > This `- 1' is in inferior's: > > gcc/libgcc/unwind-dw2.c: > uw_frame_state_for: > fde = _Unwind_Find_FDE (context->ra + _Unwind_IsSignalFrame (context) - 1, > &context->bases); > > GDB can only change the address put on inferior stack and later picked up by > the inferior's exceptions unwinder. I see. That '_Unwind_IsSignalFrame(context)' is there to cancel out the '- 1' for signal frames. Ideally, the same treatment would be applied for gdb's dummy frame, perhaps by having gdb itself change `context->flags' making libunwind treat it as a signal frame. I have no idea whether that's feasible. Oh well. -- Pedro Alves