Launch lldb-gdbserver in same process group when launched remotely using lldb-platform - commit on behalf of flackr.
http://reviews.llvm.org/D7211 llvm-svn: 227329
This commit is contained in:
parent
64a74bf1cf
commit
f8ce61c5d8
|
@ -758,9 +758,11 @@ GDBRemoteCommunication::StartDebugserverProcess (const char *hostname,
|
|||
|
||||
// use native registers, not the GDB registers
|
||||
debugserver_args.AppendArgument("--native-regs");
|
||||
// make debugserver run in its own session so signals generated by
|
||||
// special terminal key sequences (^C) don't affect debugserver
|
||||
|
||||
if (launch_info.GetLaunchInSeparateProcessGroup())
|
||||
{
|
||||
debugserver_args.AppendArgument("--setsid");
|
||||
}
|
||||
|
||||
char named_pipe_path[PATH_MAX];
|
||||
named_pipe_path[0] = '\0';
|
||||
|
|
|
@ -1921,6 +1921,9 @@ GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote
|
|||
if (log)
|
||||
log->Printf("Launching debugserver with: %s:%u...\n", hostname.c_str(), port);
|
||||
|
||||
// Do not run in a new session so that it can not linger after the
|
||||
// platform closes.
|
||||
debugserver_launch_info.SetLaunchInSeparateProcessGroup(false);
|
||||
debugserver_launch_info.SetMonitorProcessCallback(ReapDebugserverProcess, this, false);
|
||||
|
||||
std::string platform_scheme;
|
||||
|
|
|
@ -2764,6 +2764,10 @@ ProcessGDBRemote::LaunchAndConnectToDebugserver (const ProcessInfo &process_info
|
|||
static FileSpec g_debugserver_file_spec;
|
||||
|
||||
ProcessLaunchInfo debugserver_launch_info;
|
||||
// Make debugserver run in its own session so signals generated by
|
||||
// special terminal key sequences (^C) don't affect debugserver.
|
||||
debugserver_launch_info.SetLaunchInSeparateProcessGroup(true);
|
||||
|
||||
debugserver_launch_info.SetMonitorProcessCallback (MonitorDebugserverProcess, this, false);
|
||||
debugserver_launch_info.SetUserID(process_info.GetUserID());
|
||||
|
||||
|
|
Loading…
Reference in New Issue