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;
 }
diff --git a/source/Breakpoint/Breakpoint.cpp b/source/Breakpoint/Breakpoint.cpp
index 095924f..e158258 100644
--- a/source/Breakpoint/Breakpoint.cpp
+++ b/source/Breakpoint/Breakpoint.cpp
@@ -525,9 +525,9 @@
     case lldb::eDescriptionLevelFull:
         if (num_locations > 0)
         {
-            s->Printf(", locations = %zu", num_locations);
+            s->Printf(", locations = %llu", (uint64_t)num_locations);
             if (num_resolved_locations > 0)
-                s->Printf(", resolved = %zu", num_resolved_locations);
+                s->Printf(", resolved = %llu", (uint64_t)num_resolved_locations);
         }
         else
         {
diff --git a/source/Breakpoint/BreakpointLocationList.cpp b/source/Breakpoint/BreakpointLocationList.cpp
index 8329912..908ed87 100644
--- a/source/Breakpoint/BreakpointLocationList.cpp
+++ b/source/Breakpoint/BreakpointLocationList.cpp
@@ -128,7 +128,7 @@
     s->Printf("%p: ", this);
     //s->Indent();
     Mutex::Locker locker (m_mutex);
-    s->Printf("BreakpointLocationList with %zu BreakpointLocations:\n", m_locations.size());
+    s->Printf("BreakpointLocationList with %llu BreakpointLocations:\n", (uint64_t)m_locations.size());
     s->IndentMore();
     collection::const_iterator pos, end = m_locations.end();
     for (pos = m_locations.begin(); pos != end; ++pos)
diff --git a/source/Breakpoint/WatchpointList.cpp b/source/Breakpoint/WatchpointList.cpp
index bfd0b4c..637cdca 100644
--- a/source/Breakpoint/WatchpointList.cpp
+++ b/source/Breakpoint/WatchpointList.cpp
@@ -51,8 +51,8 @@
     Mutex::Locker locker (m_mutex);
     s->Printf("%p: ", this);
     //s->Indent();
-    s->Printf("WatchpointList with %zu Watchpoints:\n",
-              m_watchpoints.size());
+    s->Printf("WatchpointList with %llu Watchpoints:\n",
+              (uint64_t)m_watchpoints.size());
     s->IndentMore();
     wp_collection::const_iterator pos, end = m_watchpoints.end();
     for (pos = m_watchpoints.begin(); pos != end; ++pos)
diff --git a/source/Commands/CommandObjectMemory.cpp b/source/Commands/CommandObjectMemory.cpp
index ef1709f..7c14dce 100644
--- a/source/Commands/CommandObjectMemory.cpp
+++ b/source/Commands/CommandObjectMemory.cpp
@@ -703,7 +703,7 @@
                     }
                     else 
                     {
-                        result.AppendErrorWithFormat("Failed to write %zu bytes to '%s'.\n", bytes_read, path);
+                        result.AppendErrorWithFormat("Failed to write %llu bytes to '%s'.\n", (uint64_t)bytes_read, path);
                         result.SetStatus(eReturnStatusFailed);
                         return false;
                     }
@@ -1042,13 +1042,13 @@
                     if (bytes_written == length)
                     {
                         // All bytes written
-                        result.GetOutputStream().Printf("%zu bytes were written to 0x%llx\n", bytes_written, addr);
+                        result.GetOutputStream().Printf("%llu bytes were written to 0x%llx\n", (uint64_t)bytes_written, addr);
                         result.SetStatus(eReturnStatusSuccessFinishResult);
                     }
                     else if (bytes_written > 0)
                     {
                         // Some byte written
-                        result.GetOutputStream().Printf("%zu bytes of %zu requested were written to 0x%llx\n", bytes_written, length, addr);
+                        result.GetOutputStream().Printf("%llu bytes of %llu requested were written to 0x%llx\n", (uint64_t)bytes_written, (uint64_t)length, addr);
                         result.SetStatus(eReturnStatusSuccessFinishResult);
                     }
                     else 
diff --git a/source/Core/Communication.cpp b/source/Core/Communication.cpp
index 35af644..64cc2f9 100644
--- a/source/Core/Communication.cpp
+++ b/source/Core/Communication.cpp
@@ -136,10 +136,10 @@
 Communication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status, Error *error_ptr)
 {
     lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
-                                         "%p Communication::Read (dst = %p, dst_len = %zu, timeout = %u usec) connection = %p",
+                                         "%p Communication::Read (dst = %p, dst_len = %llu, timeout = %u usec) connection = %p",
                                          this, 
                                          dst, 
-                                         dst_len, 
+                                         (uint64_t)dst_len,
                                          timeout_usec, 
                                          m_connection_sp.get());
 
@@ -210,10 +210,10 @@
 
     Mutex::Locker (m_write_mutex);
     lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
-                                         "%p Communication::Write (src = %p, src_len = %zu) connection = %p",
+                                         "%p Communication::Write (src = %p, src_len = %llu) connection = %p",
                                          this, 
                                          src, 
-                                         src_len, 
+                                         (uint64_t)src_len,
                                          connection_sp.get());
 
     if (connection_sp.get())
@@ -295,8 +295,8 @@
 Communication::AppendBytesToCache (const uint8_t * bytes, size_t len, bool broadcast, ConnectionStatus status)
 {
     lldb_private::LogIfAnyCategoriesSet (LIBLLDB_LOG_COMMUNICATION,
-                                 "%p Communication::AppendBytesToCache (src = %p, src_len = %zu, broadcast = %i)",
-                                 this, bytes, len, broadcast);
+                                 "%p Communication::AppendBytesToCache (src = %p, src_len = %llu, broadcast = %i)",
+                                 this, bytes, (uint64_t)len, broadcast);
     if ((bytes == NULL || len == 0)
         && (status != lldb::eConnectionStatusEndOfFile))
         return;
diff --git a/source/Core/ConnectionFileDescriptor.cpp b/source/Core/ConnectionFileDescriptor.cpp
index e950be2..238daab 100644
--- a/source/Core/ConnectionFileDescriptor.cpp
+++ b/source/Core/ConnectionFileDescriptor.cpp
@@ -362,8 +362,8 @@
 {
     LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
     if (log)
-        log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %zu)...",
-                     this, m_fd_recv, dst, dst_len);
+        log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu)...",
+                     this, m_fd_recv, dst, (uint64_t)dst_len);
 
     Mutex::Locker locker;
     bool got_lock = locker.TryLock (m_mutex);
@@ -411,12 +411,12 @@
     }
 
     if (log)
-        log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %zu) => %zi, error = %s",
+        log->Printf ("%p ConnectionFileDescriptor::Read () ::read (fd = %i, dst = %p, dst_len = %llu) => %lli, error = %s",
                      this, 
                      m_fd_recv, 
                      dst, 
-                     dst_len, 
-                     bytes_read, 
+                     (uint64_t)dst_len,
+                     (int64_t)bytes_read,
                      error.AsCString());
 
     if (error_ptr)
@@ -475,7 +475,7 @@
 {
     LogSP log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_CONNECTION));
     if (log)
-        log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %zu)", this, src, src_len);
+        log->Printf ("%p ConnectionFileDescriptor::Write (src = %p, src_len = %llu)", this, src, (uint64_t)src_len);
 
     if (!IsConnected ())
     {
@@ -530,32 +530,32 @@
         switch (m_fd_send_type)
         {
             case eFDTypeFile:       // Other FD requireing read/write
-                log->Printf ("%p ConnectionFileDescriptor::Write()  ::write (fd = %i, src = %p, src_len = %zu) => %zi (error = %s)",
+                log->Printf ("%p ConnectionFileDescriptor::Write()  ::write (fd = %i, src = %p, src_len = %llu) => %lli (error = %s)",
                              this, 
                              m_fd_send, 
                              src, 
-                             src_len, 
-                             bytes_sent, 
+                             (uint64_t)src_len,
+                             (int64_t)bytes_sent,
                              error.AsCString());
                 break;
                 
             case eFDTypeSocket:     // Socket requiring send/recv
-                log->Printf ("%p ConnectionFileDescriptor::Write()  ::send (socket = %i, src = %p, src_len = %zu, flags = 0) => %zi (error = %s)",
+                log->Printf ("%p ConnectionFileDescriptor::Write()  ::send (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
                              this, 
                              m_fd_send, 
                              src, 
-                             src_len, 
-                             bytes_sent, 
+                             (uint64_t)src_len,
+                             (int64_t)bytes_sent,
                              error.AsCString());
                 break;
                 
             case eFDTypeSocketUDP:  // Unconnected UDP socket requiring sendto/recvfrom
-                log->Printf ("%p ConnectionFileDescriptor::Write()  ::sendto (socket = %i, src = %p, src_len = %zu, flags = 0) => %zi (error = %s)",
+                log->Printf ("%p ConnectionFileDescriptor::Write()  ::sendto (socket = %i, src = %p, src_len = %llu, flags = 0) => %lli (error = %s)",
                              this, 
                              m_fd_send, 
                              src, 
-                             src_len, 
-                             bytes_sent, 
+                             (uint64_t)src_len,
+                             (int64_t)bytes_sent, 
                              error.AsCString());
                 break;
         }
diff --git a/source/Core/ConstString.cpp b/source/Core/ConstString.cpp
index d82bc61..572b481 100644
--- a/source/Core/ConstString.cpp
+++ b/source/Core/ConstString.cpp
@@ -291,7 +291,7 @@
     size_t cstr_len = GetLength();
     // Only print the parens if we have a non-NULL string
     const char *parens = cstr ? "\"" : "";
-    s->Printf("%*p: ConstString, string = %s%s%s, length = %zu", (int)sizeof(void*) * 2, this, parens, cstr, parens, cstr_len);
+    s->Printf("%*p: ConstString, string = %s%s%s, length = %llu", (int)sizeof(void*) * 2, this, parens, cstr, parens, (uint64_t)cstr_len);
 }
 
 void
diff --git a/source/Core/EmulateInstruction.cpp b/source/Core/EmulateInstruction.cpp
index f179247..0e94e67 100644
--- a/source/Core/EmulateInstruction.cpp
+++ b/source/Core/EmulateInstruction.cpp
@@ -361,7 +361,7 @@
                                        size_t length)
 {
     StreamFile strm (stdout, false);
-    strm.Printf ("    Read from Memory (address = 0x%llx, length = %zu, context = ", addr, length);
+    strm.Printf ("    Read from Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
     context.Dump (strm, instruction);    
     strm.EOL();
     *((uint64_t *) dst) = 0xdeadbeef;
@@ -377,7 +377,7 @@
                                         size_t length)
 {
     StreamFile strm (stdout, false);
-    strm.Printf ("    Write to Memory (address = 0x%llx, length = %zu, context = ", addr, length);
+    strm.Printf ("    Write to Memory (address = 0x%llx, length = %llu, context = ", addr, (uint64_t)length);
     context.Dump (strm, instruction);    
     strm.EOL();
     return length;
diff --git a/source/Core/Module.cpp b/source/Core/Module.cpp
index 15ad72c..7ef05d9 100644
--- a/source/Core/Module.cpp
+++ b/source/Core/Module.cpp
@@ -99,7 +99,7 @@
         Mutex::Locker locker (Module::GetAllocationModuleCollectionMutex());
         ModuleCollection &modules = GetModuleCollection();
         const size_t count = modules.size();
-        printf ("%s: %zu modules:\n", __PRETTY_FUNCTION__, count);
+        printf ("%s: %llu modules:\n", __PRETTY_FUNCTION__, (uint64_t)count);
         for (size_t i=0; i<count; ++i)
         {
             
diff --git a/source/Expression/ClangFunction.cpp b/source/Expression/ClangFunction.cpp
index 54c0d4a..62e4e8a 100644
--- a/source/Expression/ClangFunction.cpp
+++ b/source/Expression/ClangFunction.cpp
@@ -186,7 +186,7 @@
         char arg_buf[32];
         args_buffer.append ("    ");
         args_buffer.append (type_name);
-        snprintf(arg_buf, 31, "arg_%zd", i);
+        snprintf(arg_buf, 31, "arg_%llu", (uint64_t)i);
         args_buffer.push_back (' ');
         args_buffer.append (arg_buf);
         args_buffer.append (";\n");
diff --git a/source/Expression/DWARFExpression.cpp b/source/Expression/DWARFExpression.cpp
index d1b65a5..b044143 100644
--- a/source/Expression/DWARFExpression.cpp
+++ b/source/Expression/DWARFExpression.cpp
@@ -1345,7 +1345,7 @@
             for (size_t i=0; i<count; ++i)
             {
                 StreamString new_value;
-                new_value.Printf("[%zu]", i);
+                new_value.Printf("[%llu]", (uint64_t)i);
                 stack[i].Dump(&new_value);
                 log->Printf("  %s", new_value.GetData());
             }
@@ -3186,7 +3186,7 @@
         for (size_t i=0; i<count; ++i)
         {
             StreamString new_value;
-            new_value.Printf("[%zu]", i);
+            new_value.Printf("[%llu]", (uint64_t)i);
             stack[i].Dump(&new_value);
             log->Printf("  %s", new_value.GetData());
         }
diff --git a/source/Host/macosx/Host.mm b/source/Host/macosx/Host.mm
index 9d6a1da..8748184 100644
--- a/source/Host/macosx/Host.mm
+++ b/source/Host/macosx/Host.mm
@@ -1531,7 +1531,7 @@
         size_t ocount = 0;
         error.SetError( ::posix_spawnattr_setbinpref_np (&attr, 1, &cpu, &ocount), eErrorTypePOSIX);
         if (error.Fail() || log)
-            error.PutToLog(log.get(), "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %zu )", cpu, ocount);
+            error.PutToLog(log.get(), "::posix_spawnattr_setbinpref_np ( &attr, 1, cpu_type = 0x%8.8x, count => %llu )", cpu, (uint64_t)ocount);
         
         if (error.Fail() || ocount != 1)
             return error;
diff --git a/source/Interpreter/Args.cpp b/source/Interpreter/Args.cpp
index bb9ed8d..1518968 100644
--- a/source/Interpreter/Args.cpp
+++ b/source/Interpreter/Args.cpp
@@ -91,15 +91,6 @@
 void
 Args::Dump (Stream *s)
 {
-//    int argc = GetArgumentCount();
-//
-//    arg_sstr_collection::const_iterator pos, begin = m_args.begin(), end = m_args.end();
-//    for (pos = m_args.begin(); pos != end; ++pos)
-//    {
-//        s->Indent();
-//        s->Printf("args[%zu]=%s\n", std::distance(begin, pos), pos->c_str());
-//    }
-//    s->EOL();
     const int argc = m_argv.size();
     for (int i=0; i<argc; ++i)
     {
diff --git a/source/Interpreter/OptionValueArray.cpp b/source/Interpreter/OptionValueArray.cpp
index fbddd7b..1776b83 100644
--- a/source/Interpreter/OptionValueArray.cpp
+++ b/source/Interpreter/OptionValueArray.cpp
@@ -126,9 +126,9 @@
                     if (array_count == 0)
                         error.SetErrorStringWithFormat("index %i is not valid for an empty array", idx);
                     else if (idx > 0)
-                        error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %zu", idx, array_count - 1);
+                        error.SetErrorStringWithFormat("index %i out of range, valid values are 0 through %llu", idx, (uint64_t)(array_count - 1));
                     else
-                        error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%zu", idx, array_count);
+                        error.SetErrorStringWithFormat("negative index %i out of range, valid values are -1 through -%llu", idx, (uint64_t)array_count);
                 }
             }
         }
diff --git a/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 0b49f1f..506dae0 100644
--- a/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -145,7 +145,7 @@
             return true;
         
         if (log)
-            log->Printf ("error: failed to send packet entire packet %zu of %zu bytes sent", bytes_written, packet_size);
+            log->Printf ("error: failed to send packet entire packet %llu of %llu bytes sent", (uint64_t)bytes_written, (uint64_t)packet_size);
     }
     return false;
 }
@@ -189,12 +189,12 @@
         size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error);
         
         if (log)
-            log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %zu",
+            log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
                          __PRETTY_FUNCTION__,
                          timeout_usec, 
                          Communication::ConnectionStatusAsCString (status),
                          error.AsCString(), 
-                         bytes_read);
+                         (uint64_t)bytes_read);
 
         if (bytes_read > 0)
         {
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 0712ed4..d1102b7 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -298,12 +298,12 @@
         size_t bytes_read = Read (buffer, sizeof(buffer), timeout_usec, status, &error);
         
         if (log)
-            log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %zu",
+            log->Printf ("%s: Read (buffer, (sizeof(buffer), timeout_usec = 0x%x, status = %s, error = %s) => bytes_read = %llu",
                          __PRETTY_FUNCTION__,
                          timeout_usec, 
                          Communication::ConnectionStatusAsCString (status),
                          error.AsCString(), 
-                         bytes_read);
+                         (uint64_t)bytes_read);
 
         if (bytes_read > 0)
         {
diff --git a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 8225e69..ddb3181 100644
--- a/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -1215,7 +1215,8 @@
     {
         m_supports_alloc_dealloc_memory = eLazyBoolYes;
         char packet[64];
-        const int packet_len = ::snprintf (packet, sizeof(packet), "_M%zx,%s%s%s", size,
+        const int packet_len = ::snprintf (packet, sizeof(packet), "_M%llx,%s%s%s",
+                                           (uint64_t)size,
                                            permissions & lldb::ePermissionsReadable ? "r" : "",
                                            permissions & lldb::ePermissionsWritable ? "w" : "",
                                            permissions & lldb::ePermissionsExecutable ? "x" : "");
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index ce9d71b..ee2da0b 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1893,7 +1893,7 @@
     }
 
     char packet[64];
-    const int packet_len = ::snprintf (packet, sizeof(packet), "m%llx,%zx", (uint64_t)addr, size);
+    const int packet_len = ::snprintf (packet, sizeof(packet), "m%llx,%llx", (uint64_t)addr, (uint64_t)size);
     assert (packet_len + 1 < sizeof(packet));
     StringExtractorGDBRemote response;
     if (m_gdb_comm.SendPacketAndWaitForResponse(packet, packet_len, response, true))
@@ -1929,7 +1929,7 @@
     }
 
     StreamString packet;
-    packet.Printf("M%llx,%zx:", addr, size);
+    packet.Printf("M%llx,%llx:", addr, (uint64_t)size);
     packet.PutBytesAsRawHex8(buf, size, lldb::endian::InlHostByteOrder(), lldb::endian::InlHostByteOrder());
     StringExtractorGDBRemote response;
     if (m_gdb_comm.SendPacketAndWaitForResponse(packet.GetData(), packet.GetSize(), response, true))
@@ -1986,7 +1986,7 @@
     }
     
     if (allocated_addr == LLDB_INVALID_ADDRESS)
-        error.SetErrorStringWithFormat("unable to allocate %zu bytes of memory with permissions %s", size, GetPermissionsAsCString (permissions));
+        error.SetErrorStringWithFormat("unable to allocate %llu bytes of memory with permissions %s", (uint64_t)size, GetPermissionsAsCString (permissions));
     else
         error.Clear();
     return allocated_addr;
diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index ab2f9c4..41a3d86 100644
--- a/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -142,7 +142,7 @@
     if (log)
     {
         orig_arange_size = m_aranges.GetSize();
-        log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %zu entries", minimize, orig_arange_size);
+        log->Printf ("DWARFDebugAranges::Sort(minimize = %u) with %llu entries", minimize, (uint64_t)orig_arange_size);
     }
 
     m_aranges.Sort();
@@ -154,8 +154,10 @@
         {
             const size_t new_arange_size = m_aranges.GetSize();
             const size_t delta = orig_arange_size - new_arange_size;
-            log->Printf ("DWARFDebugAranges::Sort() %zu entries after minimizing (%zu entries combined for %zu bytes saved)", 
-                         new_arange_size, delta, delta * sizeof(Range));
+            log->Printf ("DWARFDebugAranges::Sort() %llu entries after minimizing (%llu entries combined for %llu bytes saved)", 
+                         (uint64_t)new_arange_size,
+                         (uint64_t)delta,
+                         (uint64_t)delta * sizeof(Range));
         }
         Dump (log.get());
     }
diff --git a/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
index 79f36d2..7dfbc64 100644
--- a/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
+++ b/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
@@ -32,11 +32,11 @@
 DWARFDebugPubnames::Extract(const DataExtractor& data)
 {
     Timer scoped_timer (__PRETTY_FUNCTION__,
-                        "DWARFDebugPubnames::Extract (byte_size = %zu)",
-                        data.GetByteSize());
+                        "DWARFDebugPubnames::Extract (byte_size = %llu)",
+                        (uint64_t)data.GetByteSize());
     LogSP log (LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_PUBNAMES));
     if (log)
-        log->Printf("DWARFDebugPubnames::Extract (byte_size = %zu)", data.GetByteSize());
+        log->Printf("DWARFDebugPubnames::Extract (byte_size = %llu)", (uint64_t)data.GetByteSize());
 
     if (data.ValidOffset(0))
     {
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 954f13b..52e262e 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -126,15 +126,15 @@
     {
         StreamString log_strm;
         const size_t n = m_dies.size();
-        log_strm.Printf("DIEStack[%zu]:\n", n);
+        log_strm.Printf("DIEStack[%llu]:\n", (uint64_t)n);
         for (size_t i=0; i<n; i++)
         {
             DWARFCompileUnit *cu = m_dies[i].cu;
             const DWARFDebugInfoEntry *die = m_dies[i].die;
             std::string qualified_name;
             die->GetQualifiedName(dwarf, cu, qualified_name);
-            log_strm.Printf ("[%zu] 0x%8.8x: %s name='%s'\n", 
-                             i,
+            log_strm.Printf ("[%llu] 0x%8.8x: %s name='%s'\n", 
+                             (uint64_t)i,
                              die->GetOffset(), 
                              DW_TAG_value_to_name(die->Tag()), 
                              qualified_name.c_str());
diff --git a/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp b/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
index 1a17647..7cadcd1 100644
--- a/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
+++ b/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
@@ -344,10 +344,10 @@
     if (log && log->GetVerbose ())
     {
         StreamString strm;
-        strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory    (addr = 0x%16.16llx, dst = %p, dst_len = %zu, context = ", 
+        strm.Printf ("UnwindAssemblyInstEmulation::ReadMemory    (addr = 0x%16.16llx, dst = %p, dst_len = %llu, context = ", 
                      addr,
                      dst,
-                     dst_len);
+                     (uint64_t)dst_len);
         context.Dump(strm, instruction);
         log->PutCString (strm.GetData ());
     }
diff --git a/source/Symbol/ClangASTContext.cpp b/source/Symbol/ClangASTContext.cpp
index 13ae29d..9c8e24e 100644
--- a/source/Symbol/ClangASTContext.cpp
+++ b/source/Symbol/ClangASTContext.cpp
@@ -4497,8 +4497,6 @@
                                  named_decl_pos != path->Decls.second && parent_record_decl;
                                  ++named_decl_pos)
                             {
-                                //printf ("path[%zu] = %s\n", child_indexes.size(), (*named_decl_pos)->getNameAsCString());
-
                                 child_idx = GetIndexForRecordChild (parent_record_decl, *named_decl_pos, omit_empty_base_classes);
                                 if (child_idx == UINT32_MAX)
                                 {
diff --git a/source/Target/Memory.cpp b/source/Target/Memory.cpp
index 16fcdca..a011bd2 100644
--- a/source/Target/Memory.cpp
+++ b/source/Target/Memory.cpp
@@ -68,14 +68,11 @@
     else
         num_cache_lines = (UINT64_MAX - first_cache_line_addr + 1)/cache_line_byte_size;
 
-    //printf ("MemoryCache::Flush (0x%16.16llx, %zu (0x%zx))\n", addr, size, size);
-
     uint32_t cache_idx = 0;
     for (addr_t curr_addr = first_cache_line_addr;
          cache_idx < num_cache_lines;
          curr_addr += cache_line_byte_size, ++cache_idx)
     {
-        //printf ("flushing: 0x%16.16llx\n", curr_addr); /// REMOVE THIS PRIOR TO CHECKIN!!!!
         BlockMap::iterator pos = m_cache.find (curr_addr);
         if (pos != m_cache.end())
             m_cache.erase(pos);
diff --git a/source/Target/Process.cpp b/source/Target/Process.cpp
index 88d08cf..4ad52a2 100644
--- a/source/Target/Process.cpp
+++ b/source/Target/Process.cpp
@@ -3920,7 +3920,7 @@
     {
         LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
         if (log)
-            log->Printf ("Process::GetSTDOUT (buf = %p, size = %zu)", buf, buf_size);
+            log->Printf ("Process::GetSTDOUT (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
         if (bytes_available > buf_size)
         {
             memcpy(buf, m_stdout_data.c_str(), buf_size);
@@ -3946,7 +3946,7 @@
     {
         LogSP log (lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
         if (log)
-            log->Printf ("Process::GetSTDERR (buf = %p, size = %zu)", buf, buf_size);
+            log->Printf ("Process::GetSTDERR (buf = %p, size = %llu)", buf, (uint64_t)buf_size);
         if (bytes_available > buf_size)
         {
             memcpy(buf, m_stderr_data.c_str(), buf_size);
diff --git a/source/Target/Target.cpp b/source/Target/Target.cpp
index ab50e34..9fbf08b 100644
--- a/source/Target/Target.cpp
+++ b/source/Target/Target.cpp
@@ -527,8 +527,8 @@
 {
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_WATCHPOINTS));
     if (log)
-        log->Printf("Target::%s (addr = 0x%8.8llx size = %zu type = %u)\n",
-                    __FUNCTION__, addr, size, type);
+        log->Printf("Target::%s (addr = 0x%8.8llx size = %llu type = %u)\n",
+                    __FUNCTION__, addr, (uint64_t)size, type);
 
     WatchpointSP wp_sp;
     if (!ProcessIsValid())
@@ -1235,7 +1235,7 @@
                     if (bytes_read == 0)
                         error.SetErrorStringWithFormat("read memory from 0x%llx failed", load_addr);
                     else
-                        error.SetErrorStringWithFormat("only %zu of %zu bytes were read from memory at 0x%llx", bytes_read, dst_len, load_addr);
+                        error.SetErrorStringWithFormat("only %llu of %llu bytes were read from memory at 0x%llx", (uint64_t)bytes_read, (uint64_t)dst_len, load_addr);
                 }
             }
             if (bytes_read)
diff --git a/source/Target/ThreadList.cpp b/source/Target/ThreadList.cpp
index 0420c49..8d97c93 100644
--- a/source/Target/ThreadList.cpp
+++ b/source/Target/ThreadList.cpp
@@ -189,7 +189,7 @@
     if (log)
     {
         log->PutCString("");
-        log->Printf ("ThreadList::%s: %zu threads", __FUNCTION__, m_threads.size());
+        log->Printf ("ThreadList::%s: %llu threads", __FUNCTION__, (uint64_t)m_threads.size());
     }
 
     for (pos = m_threads.begin(); pos != end; ++pos)
@@ -228,7 +228,7 @@
     LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
 
     if (log)
-        log->Printf ("ThreadList::%s %zu threads", __FUNCTION__, m_threads.size());
+        log->Printf ("ThreadList::%s %llu threads", __FUNCTION__, (uint64_t)m_threads.size());
 
     // Run through the threads and ask whether we should report this event.
     // For stopping, a YES vote wins over everything.  A NO vote wins over NO opinion.