Author: jmolenda
Date: Fri Aug 14 21:59:42 2015
New Revision: 245151

URL: http://llvm.org/viewvc/llvm-project?rev=245151&view=rev
Log:
Update DynamicRegisterInfo::SetRegisterInfo to accept eh_frame register
numbers in the key name "ehframe" or "eh_frame" in addition to the deprecated
"gcc" name (e.g. from a plugin.process.gdb-remote.target-definition-file
python file).

Modified:
    lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp

Modified: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp?rev=245151&r1=245150&r2=245151&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp Fri Aug 
14 21:59:42 2015
@@ -326,7 +326,13 @@ DynamicRegisterInfo::SetRegisterInfo(con
         // Fill in the register numbers
         reg_info.kinds[lldb::eRegisterKindLLDB] = i;
         reg_info.kinds[lldb::eRegisterKindStabs] = i;
-        reg_info_dict->GetValueForKeyAsInteger("gcc", 
reg_info.kinds[lldb::eRegisterKindEHFrame], LLDB_INVALID_REGNUM);
+        uint32_t eh_frame_regno = LLDB_INVALID_REGNUM;
+        reg_info_dict->GetValueForKeyAsInteger("gcc", eh_frame_regno, 
LLDB_INVALID_REGNUM);
+        if (eh_frame_regno == LLDB_INVALID_REGNUM);
+            reg_info_dict->GetValueForKeyAsInteger("ehframe", eh_frame_regno, 
LLDB_INVALID_REGNUM);
+        if (eh_frame_regno == LLDB_INVALID_REGNUM);
+            reg_info_dict->GetValueForKeyAsInteger("eh_frame", eh_frame_regno, 
LLDB_INVALID_REGNUM);
+        reg_info.kinds[lldb::eRegisterKindEHFrame] = eh_frame_regno;
         reg_info_dict->GetValueForKeyAsInteger("dwarf", 
reg_info.kinds[lldb::eRegisterKindDWARF], LLDB_INVALID_REGNUM);
         std::string generic_str;
         if (reg_info_dict->GetValueForKeyAsString("generic", generic_str))


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to