summaryrefslogtreecommitdiff
path: root/libunwindstack/RegsArm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libunwindstack/RegsArm.cpp')
-rw-r--r--libunwindstack/RegsArm.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/libunwindstack/RegsArm.cpp b/libunwindstack/RegsArm.cpp
index 1b1f7ebbc..1aaa08f56 100644
--- a/libunwindstack/RegsArm.cpp
+++ b/libunwindstack/RegsArm.cpp
@@ -51,37 +51,6 @@ void RegsArm::set_sp(uint64_t sp) {
regs_[ARM_REG_SP] = sp;
}
-uint64_t RegsArm::GetPcAdjustment(uint64_t rel_pc, Elf* elf) {
- if (!elf->valid()) {
- return 2;
- }
-
- uint64_t load_bias = elf->GetLoadBias();
- if (rel_pc < load_bias) {
- if (rel_pc < 2) {
- return 0;
- }
- return 2;
- }
- uint64_t adjusted_rel_pc = rel_pc - load_bias;
- if (adjusted_rel_pc < 5) {
- if (adjusted_rel_pc < 2) {
- return 0;
- }
- return 2;
- }
-
- if (adjusted_rel_pc & 1) {
- // This is a thumb instruction, it could be 2 or 4 bytes.
- uint32_t value;
- if (!elf->memory()->ReadFully(adjusted_rel_pc - 5, &value, sizeof(value)) ||
- (value & 0xe000f000) != 0xe000f000) {
- return 2;
- }
- }
- return 4;
-}
-
bool RegsArm::SetPcFromReturnAddress(Memory*) {
uint32_t lr = regs_[ARM_REG_LR];
if (regs_[ARM_REG_PC] == lr) {