[Lldb-commits] [lldb] r244886 - Removing redundant check from r244875

Ravitheja Addepally via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 13 04:53:24 PDT 2015


Author: ravitheja
Date: Thu Aug 13 06:53:23 2015
New Revision: 244886

URL: http://llvm.org/viewvc/llvm-project?rev=244886&view=rev
Log:
Removing redundant check from r244875

Modified:
    lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp?rev=244886&r1=244885&r2=244886&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp Thu Aug 13 06:53:23 2015
@@ -712,20 +712,14 @@ NativeRegisterContextLinux_x86_64::ReadA
      *  decrement of the instruction pointer which was causing the SIGILL
      *  exception.
      * **/
-    llvm::Triple t_triple = GetRegisterInfoInterface().GetTargetArchitecture().GetTriple();
 
-        if (t_triple.getOS() == llvm::Triple::Linux &&
-           (t_triple.getArch() == llvm::Triple::x86 ||
-            t_triple.getArch() == llvm::Triple::x86_64))
-        {
-            RegisterValue value((uint64_t) -1);
-            const RegisterInfo *reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_eax");
-            if (reg_info == nullptr)
-                reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_rax");
+    RegisterValue value((uint64_t) -1);
+    const RegisterInfo *reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_eax");
+    if (reg_info == nullptr)
+        reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_rax");
 
-            if (reg_info != nullptr)
-                return DoWriteRegisterValue(reg_info->byte_offset,reg_info->name,value);
-        }
+    if (reg_info != nullptr)
+        return DoWriteRegisterValue(reg_info->byte_offset,reg_info->name,value);
 
     return error;
 }




More information about the lldb-commits mailing list