[Lldb-commits] [lldb] r142688 - in /lldb/trunk/source/Plugins/Process: MacOSX-Kernel/ProcessKDP.cpp gdb-remote/ProcessGDBRemote.cpp

Greg Clayton gclayton at apple.com
Fri Oct 21 14:41:45 PDT 2011


Author: gclayton
Date: Fri Oct 21 16:41:45 2011
New Revision: 142688

URL: http://llvm.org/viewvc/llvm-project?rev=142688&view=rev
Log:
If a process plug-in was specified by name, always let the plug-in get used.


Modified:
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=142688&r1=142687&r2=142688&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Fri Oct 21 16:41:45 2011
@@ -58,6 +58,9 @@
 bool
 ProcessKDP::CanDebug(Target &target, bool plugin_specified_by_name)
 {
+    if (plugin_specified_by_name)
+        return true;
+
     // For now we are just making sure the file exists for a given module
     Module *exe_module = target.GetExecutableModulePointer();
     if (exe_module)
@@ -71,10 +74,8 @@
                 exe_objfile->GetStrata() == ObjectFile::eStrataKernel)
                 return true;
         }
-        return false;
     }
-    // No target executable, assume we can debug if our plug-in was specified by name
-    return plugin_specified_by_name;
+    return false;
 }
 
 //----------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=142688&r1=142687&r2=142688&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Oct 21 16:41:45 2011
@@ -103,6 +103,9 @@
 bool
 ProcessGDBRemote::CanDebug (Target &target, bool plugin_specified_by_name)
 {
+    if (plugin_specified_by_name)
+        return true;
+
     // For now we are just making sure the file exists for a given module
     Module *exe_module = target.GetExecutableModulePointer();
     if (exe_module)





More information about the lldb-commits mailing list