summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2013-02-23 02:04:45 +0000
committerJason Molenda <jmolenda@apple.com>2013-02-23 02:04:45 +0000
commite9ca4af4c8b30854b54330257d7e4b3bba3ded9b (patch)
tree7d98c428f6c6079f405f114b315f8daf32a192ec /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent2b3a0c4bcf54b6dd9ff962babfee688e300039b6 (diff)
downloadbcm5719-llvm-e9ca4af4c8b30854b54330257d7e4b3bba3ded9b.tar.gz
bcm5719-llvm-e9ca4af4c8b30854b54330257d7e4b3bba3ded9b.zip
Fix a handful of remaining assumptions that thread IDs were 32-bits
in the gdb-remote Process plugin files. llvm-svn: 175947
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 80fa316a583..df89058d6a6 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -2115,17 +2115,17 @@ GDBRemoteCommunicationClient::LaunchGDBserverAndGetPort ()
}
bool
-GDBRemoteCommunicationClient::SetCurrentThread (int tid)
+GDBRemoteCommunicationClient::SetCurrentThread (uint64_t tid)
{
if (m_curr_tid == tid)
return true;
-
+
char packet[32];
int packet_len;
- if (tid <= 0)
- packet_len = ::snprintf (packet, sizeof(packet), "Hg%i", tid);
+ if (tid == UINT64_MAX)
+ packet_len = ::snprintf (packet, sizeof(packet), "Hg-1");
else
- packet_len = ::snprintf (packet, sizeof(packet), "Hg%x", tid);
+ packet_len = ::snprintf (packet, sizeof(packet), "Hg%" PRIx64, tid);
assert (packet_len + 1 < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
@@ -2140,18 +2140,18 @@ GDBRemoteCommunicationClient::SetCurrentThread (int tid)
}
bool
-GDBRemoteCommunicationClient::SetCurrentThreadForRun (int tid)
+GDBRemoteCommunicationClient::SetCurrentThreadForRun (uint64_t tid)
{
if (m_curr_tid_run == tid)
return true;
-
+
char packet[32];
int packet_len;
- if (tid <= 0)
- packet_len = ::snprintf (packet, sizeof(packet), "Hc%i", tid);
+ if (tid == UINT64_MAX)
+ packet_len = ::snprintf (packet, sizeof(packet), "Hc-1");
else
- packet_len = ::snprintf (packet, sizeof(packet), "Hc%x", tid);
-
+ packet_len = ::snprintf (packet, sizeof(packet), "Hc%" PRIx64, tid);
+
assert (packet_len + 1 < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
@@ -2267,7 +2267,7 @@ GDBRemoteCommunicationClient::GetCurrentThreadIDs (std::vector<lldb::tid_t> &thr
{
do
{
- tid_t tid = response.GetHexMaxU32(false, LLDB_INVALID_THREAD_ID);
+ tid_t tid = response.GetHexMaxU64(false, LLDB_INVALID_THREAD_ID);
if (tid != LLDB_INVALID_THREAD_ID)
{
OpenPOWER on IntegriCloud