<rdar://problem/12042500>

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

llvm-svn: 165756
This commit is contained in:
Greg Clayton 2012-10-11 22:05:13 +00:00
parent 1698be7352
commit 3e672345bc
1 changed files with 3 additions and 1 deletions

View File

@ -1533,11 +1533,13 @@ MachProcess::LaunchForDebug
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,