[Lldb-commits] [lldb] r165756 - /lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp

Greg Clayton gclayton at apple.com
Thu Oct 11 15:05:13 PDT 2012


Author: gclayton
Date: Thu Oct 11 17:05:13 2012
New Revision: 165756

URL: http://llvm.org/viewvc/llvm-project?rev=165756&view=rev
Log:
<rdar://problem/12042500>

Fixed an issue where we would try to launch an application twice and the second failure would cover up the first.


Modified:
    lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp?rev=165756&r1=165755&r2=165756&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.cpp Thu Oct 11 17:05:13 2012
@@ -1533,11 +1533,13 @@
     case eLaunchFlavorSpringBoard:
         {
             const char *app_ext = strstr(path, ".app");
-            if (app_ext != NULL)
+            if (app_ext && (app_ext[4] == '\0' || app_ext[4] == '/'))
             {
                 std::string app_bundle_path(path, app_ext + strlen(".app"));
                 if (SBLaunchForDebug (app_bundle_path.c_str(), argv, envp, no_stdio, launch_err) != 0)
                     return m_pid; // A successful SBLaunchForDebug() returns and assigns a non-zero m_pid.
+                else
+                    break; // We tried a springboard launch, but didn't succeed lets get out
             }
         }
         // In case the executable name has a ".app" fragment which confuses our debugserver,





More information about the lldb-commits mailing list