Mercurial > flash_v2
changeset 818:c9e9d4163174
* include/hal_arch.h (HAL_THREAD_INIT_CONTEXT): Initialize
what would be FP and LR in the previous stack frame to make
GDB backtraces happy.
| author | jlarmour |
|---|---|
| date | Sat, 08 Mar 2003 03:39:19 +0000 |
| parents | ca97f6817eda |
| children | 36e39d295eea |
| files | packages/hal/powerpc/arch/current/ChangeLog packages/hal/powerpc/arch/current/include/hal_arch.h |
| diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/powerpc/arch/current/ChangeLog +++ b/packages/hal/powerpc/arch/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-08 Jonathan Larmour <jifl@eCosCentric.com> + + * include/hal_arch.h (HAL_THREAD_INIT_CONTEXT): Initialize + what would be FP and LR in the previous stack frame to make + GDB backtraces happy. + 2003-01-03 Gary Thomas <gary@mlbassoc.com> * include/hal_mem.h (CYGARC_MEMDESC_NOCACHE_PA): New macro which
--- a/packages/hal/powerpc/arch/current/include/hal_arch.h +++ b/packages/hal/powerpc/arch/current/include/hal_arch.h @@ -144,6 +144,8 @@ externC void cyg_hal_deliver_exception( - CYGARC_PPC_STACK_FRAME_SIZE; \ register HAL_SavedRegisters *_regs_; \ int _i_; \ + ((CYG_WORD *)_sp_)[0] = 0; /* Zero old FP and LR for EABI */ \ + ((CYG_WORD *)_sp_)[1] = 0; /* to make GDB backtraces sane */ \ _regs_ = (HAL_SavedRegisters *)((_sp_) - sizeof(HAL_SavedRegisters)); \ for( _i_ = 0; _i_ < 32; _i_++ ) (_regs_)->d[_i_] = (_id_)|_i_; \ (_regs_)->d[01] = (CYG_WORD)(_sp_); /* SP = top of stack */ \
