Modified all Process::Launch() calls to use a ProcessLaunchInfo structure

on internal only (public API hasn't changed) to simplify the paramter list
to the launch calls down into just one argument. Also all of the argument,
envronment and stdio things are now handled in a much more centralized fashion.

llvm-svn: 143656
This commit is contained in:
Greg Clayton
2011-11-03 21:22:33 +00:00
parent 9f01a0db7d
commit 982c9762a2
13 changed files with 424 additions and 317 deletions

View File

@@ -126,7 +126,21 @@ SBProcess::RemoteLaunch (char const **argv,
Mutex::Locker api_locker (m_opaque_sp->GetTarget().GetAPIMutex());
if (m_opaque_sp->GetState() == eStateConnected)
{
error.SetError (m_opaque_sp->Launch (argv, envp, launch_flags, stdin_path, stdout_path, stderr_path, working_directory));
if (stop_at_entry)
launch_flags |= eLaunchFlagStopAtEntry;
ProcessLaunchInfo launch_info (stdin_path,
stdout_path,
stderr_path,
working_directory,
launch_flags);
Module *exe_module = m_opaque_sp->GetTarget().GetExecutableModulePointer();
if (exe_module)
launch_info.SetExecutableFile(exe_module->GetFileSpec(), true);
if (argv)
launch_info.GetArguments().AppendArguments (argv);
if (envp)
launch_info.GetEnvironmentEntries ().SetArguments (envp);
error.SetError (m_opaque_sp->Launch (launch_info));
}
else
{