summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-05-08 04:53:50 +0000
committerGreg Clayton <gclayton@apple.com>2011-05-08 04:53:50 +0000
commitc4103b3c2fe3e38b6a93ce37fca6e8d7d95b2469 (patch)
treeb089504562bb71cb554d9c28a58a0dd7443284f0 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parentd9ca42aa4f6a714fb2f04c06e50f721037b5e055 (diff)
downloadbcm5719-llvm-c4103b3c2fe3e38b6a93ce37fca6e8d7d95b2469.tar.gz
bcm5719-llvm-c4103b3c2fe3e38b6a93ce37fca6e8d7d95b2469.zip
Fixed not being able to launch the i386 slice of a universal binary by adding
a new "QLaunchArch:<arch-name>" where <arch-name> is the architecture name. This allows us to remotely launch a debugserver and then set the architecture for the binary we will launch. llvm-svn: 131064
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index d4f6592f5bd..f8eb8de7bb8 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -705,6 +705,26 @@ GDBRemoteCommunicationClient::SendEnvironmentPacket (char const *name_equal_valu
return -1;
}
+int
+GDBRemoteCommunicationClient::SendLaunchArchPacket (char const *arch)
+{
+ if (arch && arch[0])
+ {
+ StreamString packet;
+ packet.Printf("QLaunchArch:%s", arch);
+ StringExtractorGDBRemote response;
+ if (SendPacketAndWaitForResponse (packet.GetData(), packet.GetSize(), response, false))
+ {
+ if (response.IsOKResponse())
+ return 0;
+ uint8_t error = response.GetError();
+ if (error)
+ return error;
+ }
+ }
+ return -1;
+}
+
bool
GDBRemoteCommunicationClient::GetOSVersion (uint32_t &major,
uint32_t &minor,
OpenPOWER on IntegriCloud