diff options
| author | Jason Molenda <jmolenda@apple.com> | 2017-06-29 03:02:24 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2017-06-29 03:02:24 +0000 |
| commit | 7f5bd34b18e014030a7020f04c9717c2071f0667 (patch) | |
| tree | 0607542fedd935c50e6dfc109d4ad305c8a48a25 /lldb/source/Plugins/Process/Utility | |
| parent | 43294c9f48760eae68aa8976bf0ac5e9eaa448d8 (diff) | |
| download | bcm5719-llvm-7f5bd34b18e014030a7020f04c9717c2071f0667.tar.gz bcm5719-llvm-7f5bd34b18e014030a7020f04c9717c2071f0667.zip | |
Fix two places in RegisterContextLLDB::InitializeNonZerothFrame where
I'm not running the saved pc through FixCodeAddress as soon as I should.
<rdar://problem/30686307>
llvm-svn: 306634
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp index bce77d7e0a3..bd73a29e087 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp @@ -297,6 +297,14 @@ void RegisterContextLLDB::InitializeNonZerothFrame() { return; } + ExecutionContext exe_ctx(m_thread.shared_from_this()); + Process *process = exe_ctx.GetProcessPtr(); + // Let ABIs fixup code addresses to make sure they are valid. In ARM ABIs + // this will strip bit zero in case we read a PC from memory or from the LR. + ABI *abi = process->GetABI().get(); + if (abi) + pc = abi->FixCodeAddress(pc); + if (log) { UnwindLogMsg("pc = 0x%" PRIx64, pc); addr_t reg_val; @@ -321,14 +329,6 @@ void RegisterContextLLDB::InitializeNonZerothFrame() { } } - ExecutionContext exe_ctx(m_thread.shared_from_this()); - Process *process = exe_ctx.GetProcessPtr(); - // Let ABIs fixup code addresses to make sure they are valid. In ARM ABIs - // this will strip bit zero in case we read a PC from memory or from the LR. - ABI *abi = process->GetABI().get(); - if (abi) - pc = abi->FixCodeAddress(pc); - const bool allow_section_end = true; m_current_pc.SetLoadAddress(pc, &process->GetTarget(), allow_section_end); @@ -2054,11 +2054,6 @@ bool RegisterContextLLDB::ReadPC(addr_t &pc) { // unwind past that frame to help // find the bug. - if (m_all_registers_available == false && above_trap_handler == false && - (pc == 0 || pc == 1)) { - return false; - } - ProcessSP process_sp (m_thread.GetProcess()); if (process_sp) { @@ -2066,6 +2061,12 @@ bool RegisterContextLLDB::ReadPC(addr_t &pc) { if (abi) pc = abi->FixCodeAddress(pc); } + + if (m_all_registers_available == false && above_trap_handler == false && + (pc == 0 || pc == 1)) { + return false; + } + return true; } else { return false; |

