Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164148 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBBreakpoint.cpp b/source/API/SBBreakpoint.cpp
index 6fc4cd9..d9a92d4 100644
--- a/source/API/SBBreakpoint.cpp
+++ b/source/API/SBBreakpoint.cpp
@@ -440,7 +440,7 @@
     }
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %zu", m_opaque_sp.get(), num_resolved);
+        log->Printf ("SBBreakpoint(%p)::GetNumResolvedLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_resolved);
     return num_resolved;
 }
 
@@ -455,7 +455,7 @@
     }
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %zu", m_opaque_sp.get(), num_locs);
+        log->Printf ("SBBreakpoint(%p)::GetNumLocations () => %llu", m_opaque_sp.get(), (uint64_t)num_locs);
     return num_locs;
 }
 
@@ -469,7 +469,7 @@
         m_opaque_sp->GetResolverDescription (s.get());
         m_opaque_sp->GetFilterDescription (s.get());
         const size_t num_locations = m_opaque_sp->GetNumLocations ();
-        s.Printf(", locations = %zu", num_locations);
+        s.Printf(", locations = %llu", (uint64_t)num_locations);
         return true;
     }
     s.Printf ("No value");
diff --git a/source/API/SBCommunication.cpp b/source/API/SBCommunication.cpp
index bf3a49e..80f557c 100644
--- a/source/API/SBCommunication.cpp
+++ b/source/API/SBCommunication.cpp
@@ -139,8 +139,11 @@
 {
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status)...", 
-                     m_opaque, dst, dst_len, timeout_usec);
+        log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%llu, timeout_usec=%u, &status)...", 
+                     m_opaque,
+                     dst,
+                     (uint64_t)dst_len,
+                     timeout_usec);
     size_t bytes_read = 0;
     if (m_opaque)
         bytes_read = m_opaque->Read (dst, dst_len, timeout_usec, status, NULL);
@@ -148,9 +151,13 @@
         status = eConnectionStatusNoConnection;
 
     if (log)
-        log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status=%s) => %zu", 
-                     m_opaque, dst, dst_len, timeout_usec, Communication::ConnectionStatusAsCString (status),
-                     bytes_read);
+        log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%llu, timeout_usec=%u, &status=%s) => %llu", 
+                     m_opaque,
+                     dst,
+                     (uint64_t)dst_len,
+                     timeout_usec,
+                     Communication::ConnectionStatusAsCString (status),
+                     (uint64_t)bytes_read);
     return bytes_read;
 }
 
@@ -166,8 +173,8 @@
 
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%zu, &status=%s) => %zu", 
-                     m_opaque, src, src_len, Communication::ConnectionStatusAsCString (status), bytes_written);
+        log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%llu, &status=%s) => %llu", 
+                     m_opaque, src, (uint64_t)src_len, Communication::ConnectionStatusAsCString (status), (uint64_t)bytes_written);
 
     return 0;
 }
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index 194e48c..ca39d2a 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -805,8 +805,11 @@
     LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
 
     if (log)
-        log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%zu)", m_opaque_sp.get(),
-                     (int) data_len, (const char *) data, data_len);
+        log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\", size_t=%llu)",
+                     m_opaque_sp.get(),
+                     (int) data_len,
+                     (const char *) data,
+                     (uint64_t)data_len);
 
     if (m_opaque_sp)
         m_opaque_sp->DispatchInput ((const char *) data, data_len);
diff --git a/source/API/SBFileSpec.cpp b/source/API/SBFileSpec.cpp
index a6c753c..d494846 100644
--- a/source/API/SBFileSpec.cpp
+++ b/source/API/SBFileSpec.cpp
@@ -154,8 +154,8 @@
         result = m_opaque_ap->GetPath (dst_path, dst_len);
 
     if (log)
-        log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%zu) => %u", 
-                     m_opaque_ap.get(), result, dst_path, dst_len, result);
+        log->Printf ("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%llu) => %u", 
+                     m_opaque_ap.get(), result, dst_path, (uint64_t)dst_len, result);
 
     if (result == 0 && dst_path && dst_len > 0)
         *dst_path = '\0';
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 7130e33..f2613dd 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -310,8 +310,12 @@
     
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%zu) => %zu", 
-                     process_sp.get(), (int) bytes_read, dst, dst_len, bytes_read);
+        log->Printf ("SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%llu) => %llu", 
+                     process_sp.get(),
+                     (int) bytes_read,
+                     dst,
+                     (uint64_t)dst_len,
+                     (uint64_t)bytes_read);
 
     return bytes_read;
 }
@@ -329,8 +333,12 @@
 
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
     if (log)
-        log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%zu) => %zu",
-                     process_sp.get(), (int) bytes_read, dst, dst_len, bytes_read);
+        log->Printf ("SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%llu) => %llu",
+                     process_sp.get(),
+                     (int) bytes_read,
+                     dst,
+                     (uint64_t)dst_len,
+                     (uint64_t)bytes_read);
 
     return bytes_read;
 }
@@ -850,11 +858,11 @@
 
     if (log)
     {
-        log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%zu, SBError (%p))...",
+        log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%llu, SBError (%p))...",
                      process_sp.get(), 
                      addr, 
                      dst, 
-                     dst_len, 
+                     (uint64_t)dst_len,
                      sb_error.get());
     }
     
@@ -882,14 +890,14 @@
     {
         SBStream sstr;
         sb_error.GetDescription (sstr);
-        log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%zu, SBError (%p): %s) => %zu", 
+        log->Printf ("SBProcess(%p)::ReadMemory (addr=0x%llx, dst=%p, dst_len=%llu, SBError (%p): %s) => %llu", 
                      process_sp.get(), 
                      addr, 
                      dst, 
-                     dst_len, 
+                     (uint64_t)dst_len,
                      sb_error.get(), 
                      sstr.GetData(),
-                     bytes_read);
+                     (uint64_t)bytes_read);
     }
 
     return bytes_read;
@@ -990,11 +998,11 @@
 
     if (log)
     {
-        log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, dst_len=%zu, SBError (%p))...",
+        log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, src_len=%llu, SBError (%p))...",
                      process_sp.get(), 
                      addr, 
                      src, 
-                     src_len, 
+                     (uint64_t)src_len,
                      sb_error.get());
     }
 
@@ -1018,14 +1026,14 @@
     {
         SBStream sstr;
         sb_error.GetDescription (sstr);
-        log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, dst_len=%zu, SBError (%p): %s) => %zu", 
+        log->Printf ("SBProcess(%p)::WriteMemory (addr=0x%llx, src=%p, src_len=%llu, SBError (%p): %s) => %llu",
                      process_sp.get(), 
                      addr, 
                      src, 
-                     src_len, 
+                     (uint64_t)src_len, 
                      sb_error.get(), 
                      sstr.GetData(),
-                     bytes_written);
+                     (uint64_t)bytes_written);
     }
 
     return bytes_written;
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index 46f5e07..3f2a379 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -206,7 +206,7 @@
     }
 
     if (log)
-        log->Printf ("SBValue(%p)::GetByteSize () => %zu", value_sp.get(), result);
+        log->Printf ("SBValue(%p)::GetByteSize () => %llu", value_sp.get(), (uint64_t)result);
 
     return result;
 }