Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libunwind Some architectures like SPARC need to appl...
details: https://anonhg.NetBSD.org/src/rev/4797ccbdb1bb
branches: trunk
changeset: 328704:4797ccbdb1bb
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Apr 14 18:15:17 2014 +0000
description:
Some architectures like SPARC need to apply a fixed offset to the return
address. Introduce such a constant.
diffstat:
sys/lib/libunwind/DwarfInstructions.hpp | 2 +-
sys/lib/libunwind/Registers.hpp | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
diffs (71 lines):
diff -r c158742a3b13 -r 4797ccbdb1bb sys/lib/libunwind/DwarfInstructions.hpp
--- a/sys/lib/libunwind/DwarfInstructions.hpp Mon Apr 14 15:05:19 2014 +0000
+++ b/sys/lib/libunwind/DwarfInstructions.hpp Mon Apr 14 18:15:17 2014 +0000
@@ -156,7 +156,7 @@
// The CFA is defined as the stack pointer at the call site.
// Therefore the SP is restored by setting it to the CFA.
newRegisters.setSP(cfa);
- newRegisters.setIP(returnAddress);
+ newRegisters.setIP(returnAddress + R::RETURN_OFFSET);
// Now replace register set with the working copy.
registers = newRegisters;
diff -r c158742a3b13 -r 4797ccbdb1bb sys/lib/libunwind/Registers.hpp
--- a/sys/lib/libunwind/Registers.hpp Mon Apr 14 15:05:19 2014 +0000
+++ b/sys/lib/libunwind/Registers.hpp Mon Apr 14 18:15:17 2014 +0000
@@ -35,6 +35,7 @@
LAST_REGISTER = REGNO_X86_EIP,
LAST_RESTORE_REG = REGNO_X86_EIP,
RETURN_REG = REGNO_X86_EIP,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_x86();
@@ -100,6 +101,7 @@
LAST_REGISTER = REGNO_X86_64_RIP,
LAST_RESTORE_REG = REGNO_X86_64_RIP,
RETURN_REG = REGNO_X86_64_RIP,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_x86_64();
@@ -168,6 +170,7 @@
LAST_REGISTER = REGNO_PPC32_V31,
LAST_RESTORE_REG = REGNO_PPC32_V31,
RETURN_REG = REGNO_PPC32_LR,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_ppc32();
@@ -256,6 +259,7 @@
LAST_REGISTER = REGNO_ARM32_D31,
LAST_RESTORE_REG = REGNO_ARM32_SPSR,
RETURN_REG = REGNO_ARM32_SPSR,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_arm32();
@@ -325,6 +329,7 @@
LAST_REGISTER = REGNO_VAX_PSW,
LAST_RESTORE_REG = REGNO_VAX_PSW,
RETURN_REG = REGNO_VAX_R15,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_vax();
@@ -396,6 +401,7 @@
LAST_REGISTER = REGNO_M68K_FP7,
LAST_RESTORE_REG = REGNO_M68K_FP7,
RETURN_REG = REGNO_M68K_PC,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_M68K();
@@ -472,6 +478,7 @@
LAST_REGISTER = REGNO_SH3_PR,
LAST_RESTORE_REG = REGNO_SH3_PR,
RETURN_REG = REGNO_SH3_PR,
+ RETURN_OFFSET = 0,
};
__dso_hidden Registers_SH3();
Home |
Main Index |
Thread Index |
Old Index