summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote
diff options
context:
space:
mode:
authorAndy Gibbs <andyg1001@hotmail.co.uk>2013-06-19 19:04:53 +0000
committerAndy Gibbs <andyg1001@hotmail.co.uk>2013-06-19 19:04:53 +0000
commita297a97e0910500e2b7bcdaad0529c2fec3acd7d (patch)
tree8e5817ffe12bc3ae70eec378840a9e64a63eab2b /lldb/source/Plugins/Process/gdb-remote
parent00dfec6265dfe622b42a9d08b4c50a1974c4f040 (diff)
downloadbcm5719-llvm-a297a97e0910500e2b7bcdaad0529c2fec3acd7d.tar.gz
bcm5719-llvm-a297a97e0910500e2b7bcdaad0529c2fec3acd7d.zip
Sort out a number of mismatched integer types in order to cut down the number of compiler warnings.
llvm-svn: 184333
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp28
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp4
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp6
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp4
4 files changed, 21 insertions, 21 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 6657c2ca27b..25568f278ea 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1328,7 +1328,7 @@ GDBRemoteCommunicationClient::SendAttach
{
char packet[64];
const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%" PRIx64, pid);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
if (response.IsErrorResponse())
@@ -1359,7 +1359,7 @@ GDBRemoteCommunicationClient::AllocateMemory (size_t size, uint32_t permissions)
permissions & lldb::ePermissionsReadable ? "r" : "",
permissions & lldb::ePermissionsWritable ? "w" : "",
permissions & lldb::ePermissionsExecutable ? "x" : "");
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1382,7 +1382,7 @@ GDBRemoteCommunicationClient::DeallocateMemory (addr_t addr)
m_supports_alloc_dealloc_memory = eLazyBoolYes;
char packet[64];
const int packet_len = ::snprintf(packet, sizeof(packet), "_m%" PRIx64, (uint64_t)addr);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1408,7 +1408,7 @@ GDBRemoteCommunicationClient::Detach (bool keep_stopped)
{
char packet[64];
const int packet_len = ::snprintf(packet, sizeof(packet), "qSupportsDetachAndStayStopped:");
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1453,7 +1453,7 @@ GDBRemoteCommunicationClient::GetMemoryRegionInfo (lldb::addr_t addr,
m_supports_memory_region_info = eLazyBoolYes;
char packet[64];
const int packet_len = ::snprintf(packet, sizeof(packet), "qMemoryRegionInfo:%" PRIx64, (uint64_t)addr);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1556,7 +1556,7 @@ GDBRemoteCommunicationClient::GetWatchpointSupportInfo (uint32_t &num)
{
char packet[64];
const int packet_len = ::snprintf(packet, sizeof(packet), "qWatchpointSupportInfo:");
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1703,7 +1703,7 @@ GDBRemoteCommunicationClient::SetDisableASLR (bool enable)
{
char packet[32];
const int packet_len = ::snprintf (packet, sizeof (packet), "QSetDisableASLR:%i", enable ? 1 : 0);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1786,7 +1786,7 @@ GDBRemoteCommunicationClient::GetProcessInfo (lldb::pid_t pid, ProcessInstanceIn
{
char packet[32];
const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%" PRIu64, pid);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -2001,7 +2001,7 @@ GDBRemoteCommunicationClient::GetUserName (uint32_t uid, std::string &name)
{
char packet[32];
const int packet_len = ::snprintf (packet, sizeof (packet), "qUserName:%i", uid);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -2031,7 +2031,7 @@ GDBRemoteCommunicationClient::GetGroupName (uint32_t gid, std::string &name)
{
char packet[32];
const int packet_len = ::snprintf (packet, sizeof (packet), "qGroupName:%i", gid);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -2165,7 +2165,7 @@ GDBRemoteCommunicationClient::SetCurrentThread (uint64_t tid)
packet_len = ::snprintf (packet, sizeof(packet), "Hg-1");
else
packet_len = ::snprintf (packet, sizeof(packet), "Hg%" PRIx64, tid);
- assert (packet_len + 1 < sizeof(packet));
+ assert (packet_len + 1 < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
@@ -2191,7 +2191,7 @@ GDBRemoteCommunicationClient::SetCurrentThreadForRun (uint64_t tid)
else
packet_len = ::snprintf (packet, sizeof(packet), "Hc%" PRIx64, tid);
- assert (packet_len + 1 < sizeof(packet));
+ assert (packet_len + 1 < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
@@ -2219,7 +2219,7 @@ GDBRemoteCommunicationClient::GetThreadStopInfo (lldb::tid_t tid, StringExtracto
{
char packet[256];
int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%" PRIx64, tid);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
if (response.IsNormalResponse())
@@ -2259,7 +2259,7 @@ GDBRemoteCommunicationClient::SendGDBStoppointTypePacket (GDBStoppointType type,
addr,
length);
- assert (packet_len + 1 < sizeof(packet));
+ assert (packet_len + 1 < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse(packet, packet_len, response, true))
{
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index 7f7361522a4..3a14e9fe759 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -186,7 +186,7 @@ GDBRemoteCommunicationServer::SendErrorResponse (uint8_t err)
{
char packet[16];
int packet_len = ::snprintf (packet, sizeof(packet), "E%2.2x", err);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
return SendPacketNoLock (packet, packet_len);
}
@@ -713,7 +713,7 @@ GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote
uint16_t port = (intptr_t)accept_thread_result;
char response[256];
const int response_len = ::snprintf (response, sizeof(response), "pid:%" PRIu64 ";port:%u;", debugserver_pid, port);
- assert (response_len < sizeof(response));
+ assert (response_len < (int)sizeof(response));
//m_port_to_pid_map[port] = debugserver_launch_info.GetProcessID();
success = SendPacketNoLock (response, response_len) > 0;
}
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index b17a6af4cc9..b1612a5f3c2 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -158,7 +158,7 @@ GDBRemoteRegisterContext::GetPrimordialRegister(const lldb_private::RegisterInfo
packet_len = ::snprintf (packet, sizeof(packet), "p%x;thread:%4.4" PRIx64 ";", reg, m_thread.GetProtocolID());
else
packet_len = ::snprintf (packet, sizeof(packet), "p%x", reg);
- assert (packet_len < (sizeof(packet) - 1));
+ assert (packet_len < ((int)sizeof(packet) - 1));
if (gdb_comm.SendPacketAndWaitForResponse(packet, response, false))
return PrivateSetRegisterValue (reg, response);
@@ -199,7 +199,7 @@ GDBRemoteRegisterContext::ReadRegisterBytes (const RegisterInfo *reg_info, DataE
packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4" PRIx64 ";", m_thread.GetProtocolID());
else
packet_len = ::snprintf (packet, sizeof(packet), "g");
- assert (packet_len < (sizeof(packet) - 1));
+ assert (packet_len < ((int)sizeof(packet) - 1));
if (gdb_comm.SendPacketAndWaitForResponse(packet, response, false))
{
if (response.IsNormalResponse())
@@ -515,7 +515,7 @@ GDBRemoteRegisterContext::ReadAllRegisterValues (lldb::DataBufferSP &data_sp)
packet_len = ::snprintf (packet, sizeof(packet), "g;thread:%4.4" PRIx64, m_thread.GetProtocolID());
else
packet_len = ::snprintf (packet, sizeof(packet), "g");
- assert (packet_len < (sizeof(packet) - 1));
+ assert (packet_len < ((int)sizeof(packet) - 1));
if (gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index fab0e6569d0..3754c366780 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -260,7 +260,7 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force)
++reg_num)
{
const int packet_len = ::snprintf (packet, sizeof(packet), "qRegisterInfo%x", reg_num);
- assert (packet_len < sizeof(packet));
+ assert (packet_len < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
@@ -1942,7 +1942,7 @@ ProcessGDBRemote::DoReadMemory (addr_t addr, void *buf, size_t size, Error &erro
char packet[64];
const int packet_len = ::snprintf (packet, sizeof(packet), "m%" PRIx64 ",%" PRIx64, (uint64_t)addr, (uint64_t)size);
- assert (packet_len + 1 < sizeof(packet));
+ assert (packet_len + 1 < (int)sizeof(packet));
StringExtractorGDBRemote response;
if (m_gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, true))
{
OpenPOWER on IntegriCloud