diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-10-11 22:05:13 +0000 | 
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-10-11 22:05:13 +0000 | 
| commit | 3e672345bc54ca04df60a64644e489909c668b9a (patch) | |
| tree | 712e703806bffa7a2f101249e852a70b80e7cb67 | |
| parent | 1698be73521595bcf4726eb8a887604f52916ec1 (diff) | |
| download | bcm5719-llvm-3e672345bc54ca04df60a64644e489909c668b9a.tar.gz bcm5719-llvm-3e672345bc54ca04df60a64644e489909c668b9a.zip  | |
<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
| -rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachProcess.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp index f9f28dea2b5..c20be15be7d 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp @@ -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,  | 

