From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20183 invoked by alias); 7 Mar 2007 12:20:38 -0000 Received: (qmail 20175 invoked by uid 22791); 7 Mar 2007 12:20:38 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 07 Mar 2007 12:20:35 +0000 Received: from dsl093-172-095.pit1.dsl.speakeasy.net ([66.93.172.95] helo=caradoc.them.org) by nevyn.them.org with esmtp (Exim 4.63) (envelope-from ) id 1HOv8D-0005wE-4k; Wed, 07 Mar 2007 07:20:33 -0500 Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HOv8C-00053A-Uk; Wed, 07 Mar 2007 07:20:32 -0500 Date: Wed, 07 Mar 2007 12:20:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/mips(commit?)] Unwinding from noreturn function Message-ID: <20070307122032.GB18998@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20070307041643.GJ25742@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070307041643.GJ25742@adacore.com> User-Agent: Mutt/1.5.13 (2006-08-11) 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: 2007-03/txt/msg00071.txt.bz2 On Tue, Mar 06, 2007 at 08:16:43PM -0800, Joel Brobecker wrote: > However, this doesn't work very well in our case, especially > in this situation: > > static const struct frame_unwind * > mips_insn16_frame_sniffer (struct frame_info *next_frame) > { > CORE_ADDR pc = frame_unwind_address_in_block (next_frame, NORMAL_FRAME); > if (mips_pc_is_mips16 (pc)) > return &mips_insn16_frame_unwind; > return NULL; > } I Am Dumb. Check CVS history, but I think I changed that just a couple of weeks ago; I audited all the sniffers looking for what ought to use the unwound PC and what ought to use the unwound block address. Here, I'm pretty sure I made the wrong choice. I would recommend you revert my changes to this function and mips_insn32_frame_sniffer instead. > It seems to me that the above check is only an optimization, > and I've spotted at least one instance where I cannot see an > obvious guaranty that the address has not been decremented > by one of the _in_block functions... So the decision I made > was to remove that check. No, it's not just an optimization. Especially with limited debug info, it's important. > > 2. One minor: There was a confusion in the unwinder between > the return address and the address of the instruction calling us. > So I replaced frame_pc_unwind calls by their associated > frame_unwind_address_in_block. This half looks right. -- Daniel Jacobowitz CodeSourcery