summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-06-25 02:32:56 +0000
committerJim Ingham <jingham@apple.com>2014-06-25 02:32:56 +0000
commit106d02866d4d54b09c08e6a12915dba58e709294 (patch)
treed495af8b9b7f1823c685bc4ff2ce2a9a0289b5b9 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
parentab8d0a0dd514e8313f39e3f09482468577ffe144 (diff)
downloadbcm5719-llvm-106d02866d4d54b09c08e6a12915dba58e709294.tar.gz
bcm5719-llvm-106d02866d4d54b09c08e6a12915dba58e709294.zip
Added an option to turn OFF the "detach on error" behavior that was added
to debugserver when launching processes. <rdar://problem/16216199> llvm-svn: 211658
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index 2fadf3359f5..21f9eda2b87 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -202,6 +202,10 @@ GDBRemoteCommunicationServer::GetPacketAndSendResponse (uint32_t timeout_usec,
packet_result = Handle_QSetDisableASLR (packet);
break;
+ case StringExtractorGDBRemote::eServerPacketType_QSetDetachOnError:
+ packet_result = Handle_QSetDetachOnError (packet);
+ break;
+
case StringExtractorGDBRemote::eServerPacketType_QSetSTDIN:
packet_result = Handle_QSetSTDIN (packet);
break;
@@ -1140,6 +1144,17 @@ GDBRemoteCommunicationServer::Handle_QSetDisableASLR (StringExtractorGDBRemote &
}
GDBRemoteCommunication::PacketResult
+GDBRemoteCommunicationServer::Handle_QSetDetachOnError (StringExtractorGDBRemote &packet)
+{
+ packet.SetFilePos(::strlen ("QSetDetachOnError:"));
+ if (packet.GetU32(0))
+ m_process_launch_info.GetFlags().Set (eLaunchFlagDetachOnError);
+ else
+ m_process_launch_info.GetFlags().Clear (eLaunchFlagDetachOnError);
+ return SendOKResponse ();
+}
+
+GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServer::Handle_QSetWorkingDir (StringExtractorGDBRemote &packet)
{
packet.SetFilePos(::strlen ("QSetWorkingDir:"));
OpenPOWER on IntegriCloud