[Lldb-commits] [lldb] r221790 - FIx a bug with PC-register handling in a RA register.

Justin Hibbits jrh29 at alumni.cwru.edu
Wed Nov 12 07:14:12 PST 2014

Author: jhibbits
Date: Wed Nov 12 09:14:12 2014
New Revision: 221790

URL: http://llvm.org/viewvc/llvm-project?rev=221790&view=rev
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.


Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=221790&r1=221789&r2=221790&view=diff
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Wed Nov 12 09:14:12 2014
@@ -1190,6 +1190,7 @@ RegisterContextLLDB::SavedLocationForReg
                 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));

More information about the lldb-commits mailing list