This revision was automatically updated to reflect the committed changes.
Closed by commit rL271899: Don't remove PIE executables when using svr4 packets 
(authored by fjricci).

Changed prior to commit:
  http://reviews.llvm.org/D20990?vs=59637&id=59723#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20990

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

Index: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4875,11 +4875,10 @@
                     found = true;
             }
 
-            if (!found)
+            // The main executable will never be included in libraries-svr4, 
don't remove it
+            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: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4875,11 +4875,10 @@
                     found = true;
             }
 
-            if (!found)
+            // The main executable will never be included in libraries-svr4, don't remove it
+            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