From: Michael Eager <eager@eagerm.com>
To: sravan megan <sravan22021987@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Fwd: Backtrace stopped: frame did not save the PC
Date: Tue, 20 Aug 2013 16:54:00 -0000 [thread overview]
Message-ID: <52139F59.8080406@eagerm.com> (raw)
In-Reply-To: <CAESop7U3jKLDqZVE=2YoUjL2r+di-RA-0pgHVUmN1AM4Ld+uEw@mail.gmail.com>
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
prev parent reply other threads:[~2013-08-20 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAESop7Uxpo46gbxiPU9-RnvcEbnzNEOsupuWQCotE0Ev9ha_RQ@mail.gmail.com>
2013-08-19 7:15 ` sravan megan
2013-08-19 23:33 ` Michael Eager
2013-08-20 6:24 ` sravan megan
2013-08-20 16:54 ` Michael Eager [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52139F59.8080406@eagerm.com \
--to=eager@eagerm.com \
--cc=gdb@sourceware.org \
--cc=sravan22021987@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox