# HG changeset patch # User jlarmour # Date 1047094759 0 # Node ID c9e9d41631746731ca02b4f8ce46475a6cfa6bc6 # Parent ca97f6817edac9da9e457769468d46ed39c1fd31 * 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. diff --git a/packages/hal/powerpc/arch/current/ChangeLog b/packages/hal/powerpc/arch/current/ChangeLog --- a/packages/hal/powerpc/arch/current/ChangeLog +++ b/packages/hal/powerpc/arch/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-08 Jonathan Larmour + + * 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 * include/hal_mem.h (CYGARC_MEMDESC_NOCACHE_PA): New macro which diff --git a/packages/hal/powerpc/arch/current/include/hal_arch.h b/packages/hal/powerpc/arch/current/include/hal_arch.h --- 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 */ \