From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30175 invoked by alias); 13 Nov 2012 14:44:46 -0000 Received: (qmail 30161 invoked by uid 22791); 13 Nov 2012 14:44:44 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_VF X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Nov 2012 14:44:33 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TYHj6-0000TR-OH from Yao_Qi@mentor.com ; Tue, 13 Nov 2012 06:44:32 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 13 Nov 2012 06:44:32 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Tue, 13 Nov 2012 06:44:31 -0800 Message-ID: <50A25CB7.6060205@codesourcery.com> Date: Tue, 13 Nov 2012 14:44:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Mark Kettenis CC: 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> In-Reply-To: <201211131427.qADERVUl015787@glazunov.sibelius.xs4all.nl> 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-11/txt/msg00315.txt.bz2 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? -- Yao