summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Hibbits <jrh29@alumni.cwru.edu>2014-11-12 15:14:12 +0000
committerJustin Hibbits <jrh29@alumni.cwru.edu>2014-11-12 15:14:12 +0000
commit62cf35b8a3116517017247b321d9c1dfbd94a401 (patch)
tree9542244f853aef8b01cc3d0576a74dbfee30b1eb
parent89e6f3851efc15ef8b87f19d5e46c54332db684f (diff)
downloadbcm5719-llvm-62cf35b8a3116517017247b321d9c1dfbd94a401.tar.gz
bcm5719-llvm-62cf35b8a3116517017247b321d9c1dfbd94a401.zip
FIx a bug with PC-register handling in a RA register.
The addition of RegisterNumber introduced a bug where if the PC is stored in a return address register, such as on ARM and PowerPC, this register number is retrieved and used, but never checked in the row if it's saved. Correct this by setting the variable that's used to the new register number. Patch by Jason Molenda. llvm-svn: 221790
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 1b479298591..93ef56f022f 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -1190,6 +1190,7 @@ RegisterContextLLDB::SavedLocationForRegister (uint32_t lldb_regnum, lldb_privat
{
return_address_reg.init (m_thread, m_full_unwind_plan_sp->GetRegisterKind(), m_full_unwind_plan_sp->GetReturnAddressRegister());
+ regnum = return_address_reg;
UnwindLogMsg ("requested caller's saved PC but this UnwindPlan uses a RA reg; getting %s (%d) instead",
return_address_reg.GetName(), return_address_reg.GetAsKind (eRegisterKindLLDB));
}
OpenPOWER on IntegriCloud