summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/StringExtractorGDBRemote.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-12-08 14:08:19 +0000
committerTamas Berghammer <tberghammer@google.com>2015-12-08 14:08:19 +0000
commitccd6cffba3545bec41864b0c3fa4ca7cc3e854c5 (patch)
tree47ae8040ff8d1ce1485f2789a848bd181403c605 /lldb/source/Utility/StringExtractorGDBRemote.cpp
parent59d092f883a44c35822f3038128a11452801c7a4 (diff)
downloadbcm5719-llvm-ccd6cffba3545bec41864b0c3fa4ca7cc3e854c5.tar.gz
bcm5719-llvm-ccd6cffba3545bec41864b0c3fa4ca7cc3e854c5.zip
Modify "platform connect" to connect to processes as well
The standard remote debugging workflow with gdb is to start the application on the remote host under gdbserver (e.g.: gdbserver :5039 a.out) and then connect to it with gdb. The same workflow is supported by debugserver/lldb-gdbserver with a very similar syntax but to access all features of lldb we need to be connected also to an lldb-platform instance running on the target. Before this change this had to be done manually with starting a separate lldb-platform on the target machine and then connecting to it with lldb before connecting to the process. This change modifies the behavior of "platform connect" with automatically connecting to the process instance if it was started by the remote platform. With this command replacing gdbserver in a gdb based worflow is usually as simple as replacing the command to execute gdbserver with executing lldb-platform. Differential revision: http://reviews.llvm.org/D14952 llvm-svn: 255016
Diffstat (limited to 'lldb/source/Utility/StringExtractorGDBRemote.cpp')
-rw-r--r--lldb/source/Utility/StringExtractorGDBRemote.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp
index 7c09b7a5d04..56df0be21ed 100644
--- a/lldb/source/Utility/StringExtractorGDBRemote.cpp
+++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp
@@ -163,12 +163,12 @@ StringExtractorGDBRemote::GetServerPacketType () const
case 'K':
if (PACKET_STARTS_WITH ("qKillSpawnedProcess")) return eServerPacketType_qKillSpawnedProcess;
break;
-
+
case 'L':
if (PACKET_STARTS_WITH ("qLaunchGDBServer")) return eServerPacketType_qLaunchGDBServer;
if (PACKET_MATCHES ("qLaunchSuccess")) return eServerPacketType_qLaunchSuccess;
break;
-
+
case 'M':
if (PACKET_STARTS_WITH ("qMemoryRegionInfo:")) return eServerPacketType_qMemoryRegionInfo;
if (PACKET_MATCHES ("qMemoryRegionInfo")) return eServerPacketType_qMemoryRegionInfoSupported;
@@ -182,7 +182,11 @@ StringExtractorGDBRemote::GetServerPacketType () const
if (PACKET_STARTS_WITH ("qPlatform_chmod:")) return eServerPacketType_qPlatform_chmod;
if (PACKET_MATCHES ("qProcessInfo")) return eServerPacketType_qProcessInfo;
break;
-
+
+ case 'Q':
+ if (PACKET_MATCHES ("qQueryGDBServer")) return eServerPacketType_qQueryGDBServer;
+ break;
+
case 'R':
if (PACKET_STARTS_WITH ("qRcmd,")) return eServerPacketType_qRcmd;
if (PACKET_STARTS_WITH ("qRegisterInfo")) return eServerPacketType_qRegisterInfo;
OpenPOWER on IntegriCloud