[ECOS] powerpc-eabi-gdb backtrace problem
Jonathan Larmour
jifl@eCosCentric.com
Tue Feb 18 23:06:00 GMT 2003
Nick Garnett wrote:
> Jonathan Larmour <jifl@eCosCentric.com> writes:
>
>
>>Well if there's a problem it's with the HAL. HAL_THREAD_INIT_CONTEXT
>>is called _after_ all the padding is added, and it's that which should
>>add any relevant space. For the powerpc, it already leaves
>>CYGARC_PPC_STACK_FRAME_SIZE which is a whole 56 bytes (which looking
>>at the eABI I saw, looks like overkill).
>
>
> If I recall correctly the EABI needs 7 words -- 4 argument save
> locations, return link, frame pointer, TOC pointer. I chose to allow
> twice that just to give us a safety buffer at the top of the stack.
That plus some of them in the ABI I saw says are optional:
http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF77852569970071B0D6/$file/eabi_app.pdf
Sorry about the long link.
>>However I also note that area
>>isn't initialized to anything. But then we'd see it without the stack
>>frame checking enabled either.
>
>
> In the absence of stack checking these locations will mostly be zero,
> so GDB terminates. I guess that at least the frame pointer and return
> link need to be zeroed.
Well the stack checking shouldn't reach that far in general - it only
fills stuff round the edges of the stack. But let's see...
Christoph, can you try the attached patch with the stack checking
re-enabled to see if it fixes the problem?
Well, actually it only fixes _a_ problem... the stub shouldn't fail like
it did if it gets a bad address _anyway_. GDB's heuristics can fail for
other reasons, e.g. aggressive optimisation.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ppc.splr.init.patch.txt
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20030218/8c7206b6/attachment.txt>
-------------- next part --------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list