From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29839 invoked by alias); 20 Aug 2013 16:54:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 29820 invoked by uid 89); 20 Aug 2013 16:54:52 -0000 X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.2 Received: from caibbdcaaaaf.dreamhost.com (HELO homiemail-a47.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 20 Aug 2013 16:54:51 +0000 Received: from homiemail-a47.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a47.g.dreamhost.com (Postfix) with ESMTP id D67AC28405B; Tue, 20 Aug 2013 09:54:49 -0700 (PDT) Received: from redwood.eagercon.com (c-50-148-128-197.hsd1.ca.comcast.net [50.148.128.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a47.g.dreamhost.com (Postfix) with ESMTPSA id AA3F5284058; Tue, 20 Aug 2013 09:54:49 -0700 (PDT) Message-ID: <52139F59.8080406@eagerm.com> Date: Tue, 20 Aug 2013 16:54:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: sravan megan CC: gdb@sourceware.org Subject: Re: Fwd: Backtrace stopped: frame did not save the PC References: <5212AB55.9050203@eagerm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00076.txt.bz2 On 08/19/13 23:24, sravan megan wrote: >> You don't indicate what options were used when you compile. >> When you compile without optimization, MicroBlaze stores >> the previous frame pointer in the stack frame. With -O1, >> MicroBlaze does not save the frame pointer in the stack frame. > > I have used the XSDK to build my application. Below are the compiler flags You should contact Xilinx technical support for help with gdb distributed in the Xilinx SDK. There are differences between FSF gcc/gdb sources and the sources used to build the SDK. If you are using a tool chain built with the FSF sources, I'm better able to help you. > Building file: ../src/helloworld.c > Invoking: MicroBlaze gcc compiler > mb-gcc -Wall -O0 -c -fmessage-length=0 > -I../../hello_bsp/microblaze_1/include -mlittle-endian > -mxl-pattern-compare -mno-xl-soft-div -mcpu=v8.00.b -mno-xl-soft-mul > -Wl,--no-relax -ffunction-sections -fdata-sections -MMD -MP > -MF"src/helloworld.d" -MT"src/helloworld.d" -o "src/helloworld.o" > "../src/helloworld.c" > Finished building: ../src/helloworld.c You can check the generated code (either assembly or by using objdump) to confirm that a frame pointer is being saved. > I looked at them they seem to be good but I have doubt on > "microblaze_frame_prev_register" function. > This function seems to always return r15/r1 registers as regnum for > "trad_frame_get_prev_register" function for any frame in my case. Is > this behaviour correct?? It depends on whether microblaze_analyze_prologue() determines if there is a frame or not. If it believes that there is no frame, then it always returns R15/R1 for PC/SP. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077