[Lldb-commits] [lldb] r188954 - Introducing a temporary work-around for a register mapping problem with 32-bit Linux targets.

Andrew Kaylor andrew.kaylor at intel.com
Wed Aug 21 15:46:02 PDT 2013


Author: akaylor
Date: Wed Aug 21 17:46:02 2013
New Revision: 188954

URL: http://llvm.org/viewvc/llvm-project?rev=188954&view=rev
Log:
Introducing a temporary work-around for a register mapping problem with 32-bit Linux targets.

Modified:
    lldb/trunk/source/Target/RegisterContext.cpp

Modified: lldb/trunk/source/Target/RegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/RegisterContext.cpp?rev=188954&r1=188953&r2=188954&view=diff
==============================================================================
--- lldb/trunk/source/Target/RegisterContext.cpp (original)
+++ lldb/trunk/source/Target/RegisterContext.cpp Wed Aug 21 17:46:02 2013
@@ -456,6 +456,15 @@ RegisterContext::CalculateExecutionConte
 bool
 RegisterContext::ConvertBetweenRegisterKinds (int source_rk, uint32_t source_regnum, int target_rk, uint32_t& target_regnum)
 {
+    // FIXME: This works around a problem with 32-bit register mapping on Linux.
+    // A more general fix is needed.
+    if (target_rk == eRegisterKindLLDB)
+    {
+        target_regnum = ConvertRegisterKindToRegisterNumber(source_rk, source_regnum);
+        if (target_regnum != LLDB_INVALID_REGNUM)
+            return true;
+    }
+
     const uint32_t num_registers = GetRegisterCount();
     for (uint32_t reg = 0; reg < num_registers; ++reg)
     {





More information about the lldb-commits mailing list