diff options
author | Greg Clayton <gclayton@apple.com> | 2010-09-30 21:49:03 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-09-30 21:49:03 +0000 |
commit | 4957bf69e572ea216b4040f27ea62e548698c829 (patch) | |
tree | b6038b8e69677d089b5cb54e7b4b2a6c4611271d /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 86103ea237caf915485061fe2172134637f81e2c (diff) | |
download | bcm5719-llvm-4957bf69e572ea216b4040f27ea62e548698c829.tar.gz bcm5719-llvm-4957bf69e572ea216b4040f27ea62e548698c829.zip |
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.
llvm-svn: 115213
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index f0c33f68fab..d84fedd9b48 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -366,6 +366,7 @@ ProcessGDBRemote::WillLaunchOrAttach () return error; } +//#define LAUNCH_WITH_LAUNCH_SERVICES 1 //---------------------------------------------------------------------- // Process Control //---------------------------------------------------------------------- @@ -381,10 +382,18 @@ ProcessGDBRemote::DoLaunch 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 @@ ProcessGDBRemote::DoLaunch 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 @@ ProcessGDBRemote::DidLaunchOrAttach () 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 |