From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17247 invoked by alias); 13 Nov 2012 15:12:06 -0000 Received: (qmail 17235 invoked by uid 22791); 13 Nov 2012 15:12:03 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,TW_VF X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Nov 2012 15:11:30 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id qADFBOMc004828; Tue, 13 Nov 2012 16:11:24 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id qADFBNju008709; Tue, 13 Nov 2012 16:11:23 +0100 (CET) Date: Tue, 13 Nov 2012 15:12:00 -0000 Message-Id: <201211131511.qADFBNju008709@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: yao@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <50A25CB7.6060205@codesourcery.com> (message from Yao Qi on Tue, 13 Nov 2012 22:44:07 +0800) Subject: Re: [PATCH/arm] Backtrace through exception frames on arm/cortex-m target References: <1352816140-3221-1-git-send-email-yao@codesourcery.com> <201211131427.qADERVUl015787@glazunov.sibelius.xs4all.nl> <50A25CB7.6060205@codesourcery.com> 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-11/txt/msg00316.txt.bz2 > Date: Tue, 13 Nov 2012 22:44:07 +0800 > From: Yao Qi > > On 11/13/2012 10:27 PM, Mark Kettenis wrote: > >> + unwound_sp = get_frame_register_unsigned (this_frame, ARM_SP_REGNUM); > > Calling get_frame_register_unsign(this_frame, ...) in the unwinder > > itself is verboten!. > > Really? It is a surprise to me. I see get_frame_register_unsigned is > called in many other unwinders, for example, > > *** alpha-mdebug-tdep.c: > alpha_mdebug_frame_unwind_cache[217] vfp = get_frame_register_unsigned > (this_frame, PROC_FRAME_REG (proc_desc)); > > *** amd64obsd-tdep.c: > amd64obsd_trapframe_cache[373] sp = get_frame_register_unsigned > (this_frame, AMD64_RSP_REGNUM); > > *** arm-linux-tdep.c: > arm_linux_sigtramp_cache[258] CORE_ADDR sp = > get_frame_register_unsigned (this_frame, ARM_SP_REGNUM); > > *** avr-tdep.c: > avr_frame_unwind_cache[987] this_base = get_frame_register_unsigned > (this_frame, AVR_FP_REGNUM); > > Am I missing something? Ugh, no, you're right. It's unwinding THIS_FRAME in the unwinder that is verboten. Objection withdrawn.