Differential D56233 Diff 194380 source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Changeset View
Changeset View
Standalone View
Standalone View
source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Show First 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | Status GDBRemoteCommunicationServerLLGS::LaunchProcess() { | ||||
const bool should_forward_stdio = | const bool should_forward_stdio = | ||||
m_process_launch_info.GetFileActionForFD(STDIN_FILENO) == nullptr || | m_process_launch_info.GetFileActionForFD(STDIN_FILENO) == nullptr || | ||||
m_process_launch_info.GetFileActionForFD(STDOUT_FILENO) == nullptr || | m_process_launch_info.GetFileActionForFD(STDOUT_FILENO) == nullptr || | ||||
m_process_launch_info.GetFileActionForFD(STDERR_FILENO) == nullptr; | m_process_launch_info.GetFileActionForFD(STDERR_FILENO) == nullptr; | ||||
m_process_launch_info.SetLaunchInSeparateProcessGroup(true); | m_process_launch_info.SetLaunchInSeparateProcessGroup(true); | ||||
m_process_launch_info.GetFlags().Set(eLaunchFlagDebug); | m_process_launch_info.GetFlags().Set(eLaunchFlagDebug); | ||||
if (should_forward_stdio) { | if (should_forward_stdio) { | ||||
// No pty support on Windows so far that means neither O* or I* | |||||
// notification packets will be generated about the inferior. However | |||||
// in most cases the missing notifications do not affect the major | |||||
// use of the lldb-server. So here temporarily relax the following | |||||
// for Windows. | |||||
#if !defined(_WIN32) | |||||
if (llvm::Error Err = m_process_launch_info.SetUpPtyRedirection()) | if (llvm::Error Err = m_process_launch_info.SetUpPtyRedirection()) | ||||
return Status(std::move(Err)); | return Status(std::move(Err)); | ||||
#endif | |||||
} | } | ||||
{ | { | ||||
std::lock_guard<std::recursive_mutex> guard(m_debugged_process_mutex); | std::lock_guard<std::recursive_mutex> guard(m_debugged_process_mutex); | ||||
assert(!m_debugged_process_up && "lldb-server creating debugged " | assert(!m_debugged_process_up && "lldb-server creating debugged " | ||||
"process but one already exists"); | "process but one already exists"); | ||||
auto process_or = | auto process_or = | ||||
m_process_factory.Launch(m_process_launch_info, *this, m_mainloop); | m_process_factory.Launch(m_process_launch_info, *this, m_mainloop); | ||||
▲ Show 20 Lines • Show All 2,996 Lines • Show Last 20 Lines |