cm3_fault_unwind: Adjust stack pointer after reading registers.

This commit is contained in:
Gareth McMullin 2011-02-23 18:14:44 +13:00
parent c9774944de
commit c43e392f8c
1 changed files with 2 additions and 1 deletions

View File

@ -276,7 +276,8 @@ static int cm3_fault_unwind(struct target_s *target)
/* Read registers for post-exception stack pointer */ /* Read registers for post-exception stack pointer */
ap_regs_read(target, regs); ap_regs_read(target, regs);
/* Read stack for pre-exception registers */ /* Read stack for pre-exception registers */
target_mem_read_words(target, stack, regs[13], 8 << 2); target_mem_read_words(target, stack, regs[13], sizeof(stack));
regs[13] += sizeof(stack); /* Adjust SP for pop */
regs[0] = stack[0]; regs[0] = stack[0];
regs[1] = stack[1]; regs[1] = stack[1];
regs[2] = stack[2]; regs[2] = stack[2];