summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2012-11-29 21:49:15 +0000
committerDaniel Malea <daniel.malea@intel.com>2012-11-29 21:49:15 +0000
commitd01b2953fac73977de3bc97e72ea04ad1ec6600f (patch)
tree1883eeb5c13d5a2aa557d50eb40a0e08f43a8ec1 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
parent05d3bf77a1af49e8f6513729e4ccce780ffae4bb (diff)
downloadbcm5719-llvm-d01b2953fac73977de3bc97e72ea04ad1ec6600f.tar.gz
bcm5719-llvm-d01b2953fac73977de3bc97e72ea04ad1ec6600f.zip
Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index e9f1abc85c3..42bf768b17b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1198,7 +1198,7 @@ GDBRemoteCommunicationClient::SendAttach
if (pid != LLDB_INVALID_PROCESS_ID)
{
char packet[64];
- const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%llx", pid);
+ const int packet_len = ::snprintf (packet, sizeof(packet), "vAttach;%" PRIx64, pid);
assert (packet_len < sizeof(packet));
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
{
@@ -1225,7 +1225,7 @@ GDBRemoteCommunicationClient::AllocateMemory (size_t size, uint32_t permissions)
{
m_supports_alloc_dealloc_memory = eLazyBoolYes;
char packet[64];
- const int packet_len = ::snprintf (packet, sizeof(packet), "_M%llx,%s%s%s",
+ const int packet_len = ::snprintf (packet, sizeof(packet), "_M%" PRIx64 ",%s%s%s",
(uint64_t)size,
permissions & lldb::ePermissionsReadable ? "r" : "",
permissions & lldb::ePermissionsWritable ? "w" : "",
@@ -1252,7 +1252,7 @@ GDBRemoteCommunicationClient::DeallocateMemory (addr_t addr)
{
m_supports_alloc_dealloc_memory = eLazyBoolYes;
char packet[64];
- const int packet_len = ::snprintf(packet, sizeof(packet), "_m%llx", (uint64_t)addr);
+ const int packet_len = ::snprintf(packet, sizeof(packet), "_m%" PRIx64, (uint64_t)addr);
assert (packet_len < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1285,7 +1285,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:%llx", (uint64_t)addr);
+ const int packet_len = ::snprintf(packet, sizeof(packet), "qMemoryRegionInfo:%" PRIx64, (uint64_t)addr);
assert (packet_len < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1618,7 +1618,7 @@ GDBRemoteCommunicationClient::GetProcessInfo (lldb::pid_t pid, ProcessInstanceIn
if (m_supports_qProcessInfoPID)
{
char packet[32];
- const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%llu", pid);
+ const int packet_len = ::snprintf (packet, sizeof (packet), "qProcessInfoPID:%" PRIu64, pid);
assert (packet_len < sizeof(packet));
StringExtractorGDBRemote response;
if (SendPacketAndWaitForResponse (packet, packet_len, response, false))
@@ -1688,9 +1688,9 @@ GDBRemoteCommunicationClient::FindProcesses (const ProcessInstanceInfoMatch &mat
}
if (match_info.GetProcessInfo().ProcessIDIsValid())
- packet.Printf("pid:%llu;",match_info.GetProcessInfo().GetProcessID());
+ packet.Printf("pid:%" PRIu64 ";",match_info.GetProcessInfo().GetProcessID());
if (match_info.GetProcessInfo().ParentProcessIDIsValid())
- packet.Printf("parent_pid:%llu;",match_info.GetProcessInfo().GetParentProcessID());
+ packet.Printf("parent_pid:%" PRIu64 ";",match_info.GetProcessInfo().GetParentProcessID());
if (match_info.GetProcessInfo().UserIDIsValid())
packet.Printf("uid:%u;",match_info.GetProcessInfo().GetUserID());
if (match_info.GetProcessInfo().GroupIDIsValid())
@@ -1813,7 +1813,7 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets)
end_time = TimeValue::Now();
total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970();
packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecPerSec;
- printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %llu.%9.9llu sec for %f packets/sec.\n",
+ printf ("%u qSpeedTest(send=%-5u, recv=%-5u) in %" PRIu64 ".%9.9" PRIu64 " sec for %f packets/sec.\n",
num_packets,
send_size,
recv_size,
@@ -1837,7 +1837,7 @@ GDBRemoteCommunicationClient::TestPacketSpeed (const uint32_t num_packets)
end_time = TimeValue::Now();
total_time_nsec = end_time.GetAsNanoSecondsSinceJan1_1970() - start_time.GetAsNanoSecondsSinceJan1_1970();
packets_per_second = (((float)num_packets)/(float)total_time_nsec) * (float)TimeValue::NanoSecPerSec;
- printf ("%u 'qC' packets packets in 0x%llu%9.9llu sec for %f packets/sec.\n",
+ printf ("%u 'qC' packets packets in 0x%" PRIu64 "%9.9" PRIu64 " sec for %f packets/sec.\n",
num_packets,
total_time_nsec / TimeValue::NanoSecPerSec,
total_time_nsec % TimeValue::NanoSecPerSec,
@@ -1957,7 +1957,7 @@ GDBRemoteCommunicationClient::GetThreadStopInfo (lldb::tid_t tid, StringExtracto
if (m_supports_qThreadStopInfo)
{
char packet[256];
- int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%llx", tid);
+ int packet_len = ::snprintf(packet, sizeof(packet), "qThreadStopInfo%" PRIx64, tid);
assert (packet_len < sizeof(packet));
if (SendPacketAndWaitForResponse(packet, packet_len, response, false))
{
@@ -1993,7 +1993,7 @@ GDBRemoteCommunicationClient::SendGDBStoppointTypePacket (GDBStoppointType type,
char packet[64];
const int packet_len = ::snprintf (packet,
sizeof(packet),
- "%c%i,%llx,%x",
+ "%c%i,%" PRIx64 ",%x",
insert ? 'Z' : 'z',
type,
addr,
OpenPOWER on IntegriCloud