diff options
author | Jameson Nash <vtjnash@gmail.com> | 2020-12-16 13:43:10 -0500 |
---|---|---|
committer | Dave Watson <dade.watson@gmail.com> | 2021-02-17 09:13:17 -0800 |
commit | cfb3a7824285048dca0ce40e3a1687751b26fc1c (patch) | |
tree | a9e991175f65ce86872c218e6428fab582cb5aa5 | |
parent | d21f565432686032b3d534e5ccaac56a3a454eef (diff) | |
download | libunwind-cfb3a7824285048dca0ce40e3a1687751b26fc1c.tar.gz |
stop lying about the ARM PC location
I am not sure why it should lie about the PC register and use a
different random value (LR), when the actual value is also easily
available. The rate of passing tests seems to be the same.
-rw-r--r-- | include/libunwind-arm.h | 2 | ||||
-rw-r--r-- | src/arm/Gresume.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/libunwind-arm.h b/include/libunwind-arm.h index 80f87c07..0bea7958 100644 --- a/include/libunwind-arm.h +++ b/include/libunwind-arm.h @@ -244,7 +244,7 @@ typedef enum UNW_TDEP_LAST_REG = UNW_ARM_D31, - UNW_TDEP_IP = UNW_ARM_R14, /* A little white lie. */ + UNW_TDEP_IP = UNW_ARM_R15, UNW_TDEP_SP = UNW_ARM_R13, UNW_TDEP_EH = UNW_ARM_R0 /* FIXME. */ } diff --git a/src/arm/Gresume.c b/src/arm/Gresume.c index 3b9dfb33..ed284e72 100644 --- a/src/arm/Gresume.c +++ b/src/arm/Gresume.c @@ -50,7 +50,7 @@ arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) regs[6] = uc->regs[10]; regs[7] = uc->regs[11]; /* FP */ regs[8] = uc->regs[13]; /* SP */ - regs[9] = uc->regs[14]; /* LR */ + regs[9] = uc->regs[15]; /* PC */ struct regs_overlay { char x[sizeof(regs)]; |