Cleaned up a unused member variable in Debugger.

Added the start of Host specific launch services, though it currently isn't
hookup up to anything. We want to be able to launch a process and use the
native launch services to launch an app like it would be launched by the
user double clicking on the app. We also eventually want to be able to run
a command line app in a newly spawned terminal to avoid terminal sharing.

Fixed an issue with the new DWARF forward type declaration stuff. A crasher
was found that was happening when trying to properly expand the forward
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115213 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index f0c33f6..d84fedd 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -366,6 +366,7 @@
     return error;
 }
 
+//#define LAUNCH_WITH_LAUNCH_SERVICES 1
 //----------------------------------------------------------------------
 // Process Control
 //----------------------------------------------------------------------
@@ -381,10 +382,18 @@
     const char *stderr_path
 )
 {
+    Error error;
+#if defined (LAUNCH_WITH_LAUNCH_SERVICES)
+    FileSpec app_file_spec (argv[0]);
+    pid_t pid = Host::LaunchApplication (app_file_spec);
+    if (pid != LLDB_INVALID_PROCESS_ID)
+        error = DoAttachToProcessWithID (pid);
+    else
+        error.SetErrorString("failed");
+#else
     //  ::LogSetBitMask (GDBR_LOG_DEFAULT);
     //  ::LogSetOptions (LLDB_LOG_OPTION_THREADSAFE | LLDB_LOG_OPTION_PREPEND_TIMESTAMP | LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD);
     //  ::LogSetLogFile ("/dev/stdout");
-    Error error;
 
     ObjectFile * object_file = module->GetObjectFile();
     if (object_file)
@@ -497,9 +506,9 @@
         SetID(LLDB_INVALID_PROCESS_ID);
         error.SetErrorStringWithFormat("Failed to get object file from '%s' for arch %s.\n", module->GetFileSpec().GetFilename().AsCString(), module->GetArchitecture().AsCString());
     }
-
-    // Return the process ID we have
+#endif
     return error;
+
 }
 
 
@@ -621,9 +630,13 @@
 void
 ProcessGDBRemote::DidLaunch ()
 {
+#if defined (LAUNCH_WITH_LAUNCH_SERVICES)
+    DidAttach ();
+#else
     DidLaunchOrAttach ();
     if (m_dynamic_loader_ap.get())
         m_dynamic_loader_ap->DidLaunch();
+#endif
 }
 
 Error