fjricci updated this revision to Diff 59637.
fjricci added a comment.

Refactor to remove unnecessary object file type checking


http://reviews.llvm.org/D20990

Files:
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4875,11 +4875,9 @@
                     found = true;
             }
 
-            if (!found)
+            if (!found && loaded_module.get() != 
target.GetExecutableModulePointer())
             {
-                lldb_private::ObjectFile * obj = loaded_module->GetObjectFile 
();
-                if (obj && obj->GetType () != 
ObjectFile::Type::eTypeExecutable)
-                    removed_modules.Append (loaded_module);
+                removed_modules.Append (loaded_module);
             }
         }
 


Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4875,11 +4875,9 @@
                     found = true;
             }
 
-            if (!found)
+            if (!found && loaded_module.get() != target.GetExecutableModulePointer())
             {
-                lldb_private::ObjectFile * obj = loaded_module->GetObjectFile ();
-                if (obj && obj->GetType () != ObjectFile::Type::eTypeExecutable)
-                    removed_modules.Append (loaded_module);
+                removed_modules.Append (loaded_module);
             }
         }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to