[Lldb-commits] [lldb] r202723 - Fix Windows build using portable types for formatting the log outputs

Deepak Panickal deepak at codeplay.com
Mon Mar 3 07:39:48 PST 2014


Author: panickal
Date: Mon Mar  3 09:39:47 2014
New Revision: 202723

URL: http://llvm.org/viewvc/llvm-project?rev=202723&view=rev
Log:
Fix Windows build using portable types for formatting the log outputs

Modified:
    lldb/trunk/source/API/SBData.cpp
    lldb/trunk/source/API/SBHostOS.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/Commands/CommandObjectArgs.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectRegister.cpp
    lldb/trunk/source/Commands/CommandObjectTarget.cpp
    lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
    lldb/trunk/source/Core/DataBufferMemoryMap.cpp
    lldb/trunk/source/Core/DataExtractor.cpp
    lldb/trunk/source/Core/Scalar.cpp
    lldb/trunk/source/Core/SearchFilter.cpp
    lldb/trunk/source/Core/Stream.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/DataFormatters/LibCxx.cpp
    lldb/trunk/source/DataFormatters/LibCxxList.cpp
    lldb/trunk/source/DataFormatters/LibCxxMap.cpp
    lldb/trunk/source/DataFormatters/LibCxxUnorderedMap.cpp
    lldb/trunk/source/DataFormatters/LibStdcpp.cpp
    lldb/trunk/source/DataFormatters/NSArray.cpp
    lldb/trunk/source/DataFormatters/NSDictionary.cpp
    lldb/trunk/source/DataFormatters/NSSet.cpp
    lldb/trunk/source/Expression/ClangFunction.cpp
    lldb/trunk/source/Expression/DWARFExpression.cpp
    lldb/trunk/source/Expression/IRForTarget.cpp
    lldb/trunk/source/Host/windows/EditLineWin.cpp
    lldb/trunk/source/Interpreter/CommandHistory.cpp
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
    lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Symbol/Symtab.cpp
    lldb/trunk/source/Target/Target.cpp
    lldb/trunk/source/Target/ThreadPlanStepRange.cpp
    lldb/trunk/tools/driver/Driver.cpp
    lldb/trunk/tools/driver/Platform.cpp
    lldb/trunk/tools/driver/Platform.h

Modified: lldb/trunk/source/API/SBData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBData.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/API/SBData.cpp (original)
+++ lldb/trunk/source/API/SBData.cpp Mon Mar  3 09:39:47 2014
@@ -122,7 +122,7 @@ SBData::GetByteSize ()
         value = m_opaque_sp->GetByteSize();
     if (log)
         log->Printf ("SBData::GetByteSize () => "
-                     "(%zu)", value);
+                     "( %" PRId64 " )", value);
     return value;
 }
 
@@ -479,7 +479,7 @@ SBData::ReadRawData (lldb::SBError& erro
             error.SetErrorString("unable to read data");
     }
     if (log)
-        log->Printf ("SBData::ReadRawData (error=%p,offset=%" PRIu64 ",buf=%p,size=%zu) => "
+        log->Printf("SBData::ReadRawData (error=%p,offset=%" PRIu64 ",buf=%p,size=%" PRId64 ") => "
                      "(%p)", error.get(), offset, buf, size, ok);
     return ok ? size : 0;
 }
@@ -497,7 +497,7 @@ SBData::SetData (lldb::SBError& error,
     else
         m_opaque_sp->SetData(buf, size, endian);
     if (log)
-        log->Printf ("SBData::SetData (error=%p,buf=%p,size=%zu,endian=%d,addr_size=%c) => "
+        log->Printf("SBData::SetData (error=%p,buf=%p,size=%" PRId64 ",endian=%d,addr_size=%c) => "
                      "(%p)", error.get(), buf, size, endian, addr_size, m_opaque_sp.get());
 }
 
@@ -647,7 +647,7 @@ SBData::SetDataFromUInt64Array (uint64_t
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromUInt64Array (array=%p, array_len = %zu) => "
+            log->Printf("SBData::SetDataFromUInt64Array (array=%p, array_len = %" PRId64 ") => "
                          "false", array, array_len);
         return false;
     }
@@ -662,7 +662,7 @@ SBData::SetDataFromUInt64Array (uint64_t
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromUInt64Array (array=%p, array_len = %zu) => "
+        log->Printf("SBData::SetDataFromUInt64Array (array=%p, array_len = %" PRId64 ") => "
                      "true", array, array_len);
     
     return true;
@@ -676,7 +676,7 @@ SBData::SetDataFromUInt32Array (uint32_t
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromUInt32Array (array=%p, array_len = %zu) => "
+            log->Printf("SBData::SetDataFromUInt32Array (array=%p, array_len = %" PRId64 ") => "
                          "false", array, array_len);
         return false;
     }
@@ -691,7 +691,7 @@ SBData::SetDataFromUInt32Array (uint32_t
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromUInt32Array (array=%p, array_len = %zu) => "
+        log->Printf("SBData::SetDataFromUInt32Array (array=%p, array_len = %" PRId64 ") => "
                      "true", array, array_len);
     
     return true;
@@ -705,7 +705,7 @@ SBData::SetDataFromSInt64Array (int64_t*
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromSInt64Array (array=%p, array_len = %zu) => "
+            log->Printf("SBData::SetDataFromSInt64Array (array=%p, array_len = %" PRId64 ") => "
                          "false", array, array_len);
         return false;
     }
@@ -720,7 +720,7 @@ SBData::SetDataFromSInt64Array (int64_t*
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromSInt64Array (array=%p, array_len = %zu) => "
+        log->Printf("SBData::SetDataFromSInt64Array (array=%p, array_len = %" PRId64 ") => "
                      "true", array, array_len);
     
     return true;
@@ -734,7 +734,7 @@ SBData::SetDataFromSInt32Array (int32_t*
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromSInt32Array (array=%p, array_len = %zu) => "
+            log->Printf("SBData::SetDataFromSInt32Array (array=%p, array_len = %" PRId64 ") => "
                          "false", array, array_len);
         return false;
     }
@@ -749,7 +749,7 @@ SBData::SetDataFromSInt32Array (int32_t*
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromSInt32Array (array=%p, array_len = %zu) => "
+        log->Printf("SBData::SetDataFromSInt32Array (array=%p, array_len = %" PRId64 ") => "
                      "true", array, array_len);
     
     return true;
@@ -763,7 +763,7 @@ SBData::SetDataFromDoubleArray (double*
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromDoubleArray (array=%p, array_len = %zu) => "
+            log->Printf("SBData::SetDataFromDoubleArray (array=%p, array_len = %" PRId64 ") => "
                          "false", array, array_len);
         return false;
     }
@@ -778,7 +778,7 @@ SBData::SetDataFromDoubleArray (double*
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromDoubleArray (array=%p, array_len = %zu) => "
+        log->Printf("SBData::SetDataFromDoubleArray (array=%p, array_len = %" PRId64 ") => "
                      "true", array, array_len);
     
     return true;

Modified: lldb/trunk/source/API/SBHostOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBHostOS.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/API/SBHostOS.cpp (original)
+++ lldb/trunk/source/API/SBHostOS.cpp Mon Mar  3 09:39:47 2014
@@ -42,7 +42,7 @@ lldb::thread_t
 SBHostOS::ThreadCreate
 (
     const char *name,
-    thread_func_t thread_function,
+    lldb::thread_func_t thread_function,
     void *thread_arg,
     SBError *error_ptr
 )
@@ -77,7 +77,7 @@ SBHostOS::ThreadDetach (lldb::thread_t t
 }
 
 bool
-SBHostOS::ThreadJoin (lldb::thread_t thread, thread_result_t *result, SBError *error_ptr)
+SBHostOS::ThreadJoin (lldb::thread_t thread, lldb::thread_result_t *result, SBError *error_ptr)
 {
     return Host::ThreadJoin (thread, result, error_ptr ? error_ptr->get() : NULL);
 }

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Mon Mar  3 09:39:47 2014
@@ -338,7 +338,7 @@ SBProcess::PutSTDIN (const char *src, si
     }
     
     if (log)
-        log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %zu", 
+        log->Printf("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %" PRId64,
                      process_sp.get(), 
                      src, 
                      (uint32_t) src_len, 

Modified: lldb/trunk/source/Commands/CommandObjectArgs.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectArgs.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectArgs.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectArgs.cpp Mon Mar  3 09:39:47 2014
@@ -255,7 +255,7 @@ CommandObjectArgs::DoExecute (Args& args
 
     for (arg_index = 0; arg_index < num_args; ++arg_index)
     {
-        result.GetOutputStream ().Printf ("%zu (%s): ", arg_index, args.GetArgumentAtIndex (arg_index));
+        result.GetOutputStream ().Printf ("%" PRIu64 " (%s): ", (uint64_t)arg_index, args.GetArgumentAtIndex (arg_index));
         value_list.GetValueAtIndex (arg_index)->Dump (&result.GetOutputStream ());
         result.GetOutputStream ().Printf("\n");
     }

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Mon Mar  3 09:39:47 2014
@@ -1078,7 +1078,7 @@ protected:
         {
             // No breakpoint selected; enable all currently set breakpoints.
             target->EnableAllBreakpoints ();
-            result.AppendMessageWithFormat ("All breakpoints enabled. (%zu breakpoints)\n", num_breakpoints);
+            result.AppendMessageWithFormat ("All breakpoints enabled. (%" PRId64 " breakpoints)\n", num_breakpoints);
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -1197,7 +1197,7 @@ protected:
         {
             // No breakpoint selected; disable all currently set breakpoints.
             target->DisableAllBreakpoints ();
-            result.AppendMessageWithFormat ("All breakpoints disabled. (%zu breakpoints)\n", num_breakpoints);
+            result.AppendMessageWithFormat ("All breakpoints disabled. (%" PRId64 " breakpoints)\n", num_breakpoints);
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -1699,7 +1699,7 @@ protected:
             else
             {
                 target->RemoveAllBreakpoints ();
-                result.AppendMessageWithFormat ("All breakpoints removed. (%zu %s)\n", num_breakpoints, num_breakpoints > 1 ? "breakpoints" : "breakpoint");
+                result.AppendMessageWithFormat ("All breakpoints removed. (%" PRId64 " %s)\n", num_breakpoints, num_breakpoints > 1 ? "breakpoints" : "breakpoint");
             }
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Mon Mar  3 09:39:47 2014
@@ -651,7 +651,7 @@ protected:
             }
             else if (m_format_options.GetCountValue().OptionWasSet())
             {
-                result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %zu), not both.\n", end_addr, item_count);
+                result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %" PRId64 "), not both.\n", end_addr, item_count);
                 result.SetStatus(eReturnStatusFailed);
                 return false;
             }
@@ -708,7 +708,7 @@ protected:
             }
             
             if (bytes_read < total_byte_size)
-                result.AppendWarningWithFormat("Not all bytes (%zu/%zu) were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
+                result.AppendWarningWithFormat("Not all bytes (%" PRId64 "/%" PRId64 ") were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
         }
         else
         {
@@ -878,7 +878,7 @@ protected:
                 // here we passed a count, and it was not 1
                 // so we have a byte_size and a count
                 // we could well multiply those, but instead let's just fail
-                result.AppendErrorWithFormat("reading memory as characters of size %zu is not supported", item_byte_size);
+                result.AppendErrorWithFormat("reading memory as characters of size %" PRId64 " is not supported", item_byte_size);
                 result.SetStatus(eReturnStatusFailed);
                 return false;
             }
@@ -1536,7 +1536,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat("Value 0x%" PRIx64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1564,7 +1564,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat("Value 0x%" PRIx64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1604,7 +1604,7 @@ protected:
                 }
                 else if (!SIntValueIsValidForSize (sval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %zu byte signed integer value.\n", sval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %" PRId64 " byte signed integer value.\n", sval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1621,7 +1621,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1638,7 +1638,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %" PRId64 " byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }

Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Mon Mar  3 09:39:47 2014
@@ -202,7 +202,7 @@ protected:
                     }
                     else
                     {
-                        result.AppendErrorWithFormat ("invalid register set index: %zu\n", set_idx);
+                        result.AppendErrorWithFormat("invalid register set index: %" PRIu64 "\n", (uint64_t)set_idx);
                         result.SetStatus (eReturnStatusFailed);
                         break;
                     }

Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Mon Mar  3 09:39:47 2014
@@ -1763,7 +1763,7 @@ LookupFunctionInModule (CommandInterpret
         if (num_matches)
         {
             strm.Indent ();
-            strm.Printf("%zu match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+            strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches, num_matches > 1 ? "es" : "");
             DumpFullpath (strm, &module->GetFileSpec(), 0);
             strm.PutCString(":\n");
             DumpSymbolContextList (interpreter.GetExecutionContext().GetBestExecutionContextScope(), strm, sc_list, verbose);
@@ -1794,7 +1794,7 @@ LookupTypeInModule (CommandInterpreter &
         if (num_matches)
         {
             strm.Indent ();
-            strm.Printf("%zu match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+            strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches, num_matches > 1 ? "es" : "");
             DumpFullpath (strm, &module->GetFileSpec(), 0);
             strm.PutCString(":\n");
             for (TypeSP type_sp : type_list.Types())
@@ -2200,7 +2200,7 @@ protected:
                 const size_t num_modules = target->GetImages().GetSize();
                 if (num_modules > 0)
                 {
-                    result.GetOutputStream().Printf("Dumping symbol table for %zu modules.\n", num_modules);
+                    result.GetOutputStream().Printf("Dumping symbol table for %" PRIu64 " modules.\n", (uint64_t)num_modules);
                     for (size_t image_idx = 0; image_idx<num_modules; ++image_idx)
                     {
                         if (num_dumped > 0)
@@ -2333,7 +2333,7 @@ protected:
                 const size_t num_modules = target->GetImages().GetSize();
                 if (num_modules > 0)
                 {
-                    result.GetOutputStream().Printf("Dumping sections for %zu modules.\n", num_modules);
+                    result.GetOutputStream().Printf("Dumping sections for %" PRIu64 " modules.\n", (uint64_t)num_modules);
                     for (size_t image_idx = 0;  image_idx<num_modules; ++image_idx)
                     {
                         num_dumped++;
@@ -2441,7 +2441,7 @@ protected:
                 const size_t num_modules = target_modules.GetSize();
                 if (num_modules > 0)
                 {
-                    result.GetOutputStream().Printf("Dumping debug symbols for %zu modules.\n", num_modules);
+                    result.GetOutputStream().Printf("Dumping debug symbols for %" PRIu64 " modules.\n", (uint64_t)num_modules);
                     for (uint32_t image_idx = 0;  image_idx<num_modules; ++image_idx)
                     {
                         if (DumpModuleSymbolVendor (result.GetOutputStream(), target_modules.GetModulePointerAtIndexUnlocked(image_idx)))
@@ -3402,9 +3402,9 @@ protected:
                             ref_count = module_sp.use_count() - 1;
                         }
                         if (width)
-                            strm.Printf("{%*zu}", width, ref_count);
+                            strm.Printf("{%*" PRIu64 "}", width, ref_count);
                         else
-                            strm.Printf("{%zu}", ref_count);
+                            strm.Printf("{%" PRIu64 "}", (uint64_t)ref_count);
                     }
                     break;
 

Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Mon Mar  3 09:39:47 2014
@@ -397,7 +397,7 @@ protected:
         {
             // No watchpoint selected; enable all currently set watchpoints.
             target->EnableAllWatchpoints();
-            result.AppendMessageWithFormat("All watchpoints enabled. (%zu watchpoints)\n", num_watchpoints);
+            result.AppendMessageWithFormat("All watchpoints enabled. (%" PRId64 " watchpoints)\n", num_watchpoints);
             result.SetStatus(eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -476,7 +476,7 @@ protected:
             // No watchpoint selected; disable all currently set watchpoints.
             if (target->DisableAllWatchpoints())
             {
-                result.AppendMessageWithFormat("All watchpoints disabled. (%zu watchpoints)\n", num_watchpoints);
+                result.AppendMessageWithFormat("All watchpoints disabled. (%" PRId64 " watchpoints)\n", num_watchpoints);
                 result.SetStatus(eReturnStatusSuccessFinishNoResult);
             }
             else
@@ -564,7 +564,7 @@ protected:
             else
             {
                 target->RemoveAllWatchpoints();
-                result.AppendMessageWithFormat("All watchpoints removed. (%zu watchpoints)\n", num_watchpoints);
+                result.AppendMessageWithFormat("All watchpoints removed. (%" PRId64 " watchpoints)\n", num_watchpoints);
             }
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
@@ -706,7 +706,7 @@ protected:
         if (command.GetArgumentCount() == 0)
         {
             target->IgnoreAllWatchpoints(m_options.m_ignore_count);
-            result.AppendMessageWithFormat("All watchpoints ignored. (%zu watchpoints)\n", num_watchpoints);
+            result.AppendMessageWithFormat("All watchpoints ignored. (%" PRId64 " watchpoints)\n", num_watchpoints);
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -1099,7 +1099,7 @@ protected:
         }
         else
         {
-            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%zu, variable expression='%s').\n",
+            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRId64 ", variable expression='%s').\n",
                                          addr, size, command.GetArgumentAtIndex(0));
             if (error.AsCString(NULL))
                 result.AppendError(error.AsCString());
@@ -1308,7 +1308,7 @@ protected:
         }
         else
         {
-            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%zu).\n",
+            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%" PRId64 ").\n",
                                          addr, size);
             if (error.AsCString(NULL))
                 result.AppendError(error.AsCString());

Modified: lldb/trunk/source/Core/DataBufferMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataBufferMemoryMap.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataBufferMemoryMap.cpp (original)
+++ lldb/trunk/source/Core/DataBufferMemoryMap.cpp Mon Mar  3 09:39:47 2014
@@ -89,7 +89,7 @@ DataBufferMemoryMap::Clear()
     {
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP));
         if (log)
-            log->Printf("DataBufferMemoryMap::Clear() m_mmap_addr = %p, m_mmap_size = %zu", m_mmap_addr, m_mmap_size);
+            log->Printf("DataBufferMemoryMap::Clear() m_mmap_addr = %p, m_mmap_size = %" PRIu64 "", m_mmap_addr, (uint64_t)m_mmap_size);
 #ifdef _WIN32
         UnmapViewOfFile(m_mmap_addr);
 #else
@@ -311,8 +311,8 @@ DataBufferMemoryMap::MemoryMapFromFileDe
                     
                     if (log)
                     {
-                        log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec() m_mmap_addr = %p, m_mmap_size = %zu, error = %s",
-                                    m_mmap_addr, m_mmap_size, error.AsCString());
+                        log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec() m_mmap_addr = %p, m_mmap_size = %" PRIu64 ", error = %s",
+                                    m_mmap_addr, (uint64_t)m_mmap_size, error.AsCString());
                     }
                 }
             }

Modified: lldb/trunk/source/Core/DataExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataExtractor.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataExtractor.cpp (original)
+++ lldb/trunk/source/Core/DataExtractor.cpp Mon Mar  3 09:39:47 2014
@@ -1516,7 +1516,7 @@ DataExtractor::Dump (Stream *s,
                 s->Printf ("%s", GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, item_bit_offset) ? "true" : "false");
             else
             {
-                s->Printf("error: unsupported byte size (%zu) for boolean format", item_byte_size);
+                s->Printf("error: unsupported byte size (%" PRIu64 ") for boolean format", (uint64_t)item_byte_size);
                 return offset;
             }
             break;
@@ -1725,7 +1725,7 @@ DataExtractor::Dump (Stream *s,
                 }
                 else
                 {
-                    s->Printf("error: unsupported byte size (%zu) for complex integer format", item_byte_size);
+                    s->Printf("error: unsupported byte size (%" PRIu64 ") for complex integer format", (uint64_t)item_byte_size);
                     return offset;
                 }
             }
@@ -1757,7 +1757,7 @@ DataExtractor::Dump (Stream *s,
             }
             else
             {
-                s->Printf("error: unsupported byte size (%zu) for complex float format", item_byte_size);
+                s->Printf("error: unsupported byte size (%" PRIu64 ") for complex float format", (uint64_t)item_byte_size);
                 return offset;
             }
             break;
@@ -1909,7 +1909,7 @@ DataExtractor::Dump (Stream *s,
                     }
                     else
                     {
-                        s->Printf("error: unsupported byte size (%zu) for float format", item_byte_size);
+                        s->Printf("error: unsupported byte size (%" PRIu64 ") for float format", (uint64_t)item_byte_size);
                         return offset;
                     }
                     ss.flush();
@@ -1973,7 +1973,7 @@ DataExtractor::Dump (Stream *s,
             }
             else
             {
-                s->Printf("error: unsupported byte size (%zu) for hex float format", item_byte_size);
+                s->Printf("error: unsupported byte size (%" PRIu64 ") for hex float format", (uint64_t)item_byte_size);
                 return offset;
             }
             break;

Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Mon Mar  3 09:39:47 2014
@@ -1794,7 +1794,7 @@ Scalar::SetValueFromCString (const char
             if (!success)
                 error.SetErrorStringWithFormat ("'%s' is not a valid unsigned integer string value", value_str);
             else if (!UIntValueIsValidForSize (uval64, byte_size))
-                error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %zu byte unsigned integer value", uval64, byte_size);
+                error.SetErrorStringWithFormat("value 0x%" PRIx64 " is too large to fit in a %" PRIu64 " byte unsigned integer value", uval64, (uint64_t)byte_size);
             else
             {
                 m_type = Scalar::GetValueTypeForUnsignedIntegerWithByteSize (byte_size);
@@ -1804,14 +1804,14 @@ Scalar::SetValueFromCString (const char
                 case e_ulong:       m_data.ulong = (ulong_t)uval64;         break;
                 case e_ulonglong:   m_data.ulonglong = (ulonglong_t)uval64; break;
                 default:
-                    error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %zu", byte_size);
+                    error.SetErrorStringWithFormat("unsupported unsigned integer byte size: %" PRIu64 "", (uint64_t)byte_size);
                     break;
                 }
             }
         }
         else
         {
-            error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %zu", byte_size);
+            error.SetErrorStringWithFormat("unsupported unsigned integer byte size: %" PRIu64 "", (uint64_t)byte_size);
             return error;
         }
         break;
@@ -1823,7 +1823,7 @@ Scalar::SetValueFromCString (const char
             if (!success)
                 error.SetErrorStringWithFormat ("'%s' is not a valid signed integer string value", value_str);
             else if (!SIntValueIsValidForSize (sval64, byte_size))
-                error.SetErrorStringWithFormat ("value 0x%" PRIx64 " is too large to fit in a %zu byte signed integer value", sval64, byte_size);
+                error.SetErrorStringWithFormat("value 0x%" PRIx64 " is too large to fit in a %" PRIu64 " byte signed integer value", sval64, (uint64_t)byte_size);
             else
             {
                 m_type = Scalar::GetValueTypeForSignedIntegerWithByteSize (byte_size);
@@ -1833,14 +1833,14 @@ Scalar::SetValueFromCString (const char
                 case e_slong:       m_data.slong = (slong_t)sval64;         break;
                 case e_slonglong:   m_data.slonglong = (slonglong_t)sval64; break;
                 default:
-                    error.SetErrorStringWithFormat ("unsupported signed integer byte size: %zu", byte_size);
+                    error.SetErrorStringWithFormat("unsupported signed integer byte size: %" PRIu64 "", (uint64_t)byte_size);
                     break;
                 }
             }
         }
         else
         {
-            error.SetErrorStringWithFormat ("unsupported signed integer byte size: %zu", byte_size);
+            error.SetErrorStringWithFormat("unsupported signed integer byte size: %" PRIu64 "", (uint64_t)byte_size);
             return error;
         }
         break;
@@ -1869,7 +1869,7 @@ Scalar::SetValueFromCString (const char
         }
         else
         {
-            error.SetErrorStringWithFormat ("unsupported float byte size: %zu", byte_size);
+            error.SetErrorStringWithFormat("unsupported float byte size: %" PRIu64 "", (uint64_t)byte_size);
             return error;
         }
         break;
@@ -1908,7 +1908,7 @@ Scalar::SetValueFromData (DataExtractor
             case 4: operator=((uint32_t)data.GetU32(&offset)); break;
             case 8: operator=((uint64_t)data.GetU64(&offset)); break;
             default:
-                error.SetErrorStringWithFormat ("unsupported unsigned integer byte size: %zu", byte_size);
+                error.SetErrorStringWithFormat("unsupported unsigned integer byte size: %" PRIu64 "", (uint64_t)byte_size);
                 break;
             }
         }
@@ -1924,7 +1924,7 @@ Scalar::SetValueFromData (DataExtractor
             case 4: operator=((int32_t)data.GetU32(&offset)); break;
             case 8: operator=((int64_t)data.GetU64(&offset)); break;
             default:
-                error.SetErrorStringWithFormat ("unsupported signed integer byte size: %zu", byte_size);
+                error.SetErrorStringWithFormat("unsupported signed integer byte size: %" PRIu64 "", (uint64_t)byte_size);
                 break;
             }
         }
@@ -1940,7 +1940,7 @@ Scalar::SetValueFromData (DataExtractor
             else if (byte_size == sizeof (long double))
                 operator=((long double)data.GetLongDouble(&offset));
             else
-                error.SetErrorStringWithFormat ("unsupported float byte size: %zu", byte_size);
+                error.SetErrorStringWithFormat("unsupported float byte size: %" PRIu64 "", (uint64_t)byte_size);
         }
         break;
     }

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Mon Mar  3 09:39:47 2014
@@ -592,7 +592,7 @@ SearchFilterByModuleList::GetDescription
     }
     else
     {
-        s->Printf (", modules(%zu) = ", num_modules);
+        s->Printf(", modules(%" PRIu64 ") = ", (uint64_t)num_modules);
         for (size_t i = 0; i < num_modules; i++)
         {
             if (s->GetVerbose())

Modified: lldb/trunk/source/Core/Stream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Stream.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Core/Stream.cpp (original)
+++ lldb/trunk/source/Core/Stream.cpp Mon Mar  3 09:39:47 2014
@@ -479,7 +479,7 @@ Stream::PrintfAsRawHex8 (const char *for
     va_list args;
     va_list args_copy;
     va_start (args, format);
-    va_copy (args, args_copy); // Copy this so we
+    va_copy (args_copy,args); // Copy this so we
 
     char str[1024];
     size_t bytes_written = 0;

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon Mar  3 09:39:47 2014
@@ -1708,7 +1708,7 @@ ValueObject::DumpPrintableRepresentation
                 break;
                 
             case eValueObjectRepresentationStyleChildrenCount:
-                strm.Printf("%zu", GetNumChildren());
+                strm.Printf("%" PRIu64 "", (uint64_t)GetNumChildren());
                 cstr = strm.GetString().c_str();
                 break;
                 
@@ -2064,7 +2064,7 @@ ValueObject::GetSyntheticArrayMemberFrom
     if (IsPointerType ())
     {
         char index_str[64];
-        snprintf(index_str, sizeof(index_str), "[%zu]", index);
+        snprintf(index_str, sizeof(index_str), "[%" PRIu64 "]", (uint64_t)index);
         ConstString index_const_str(index_str);
         // Check if we have already created a synthetic array member in this
         // valid object. If we have we will re-use it.
@@ -2107,7 +2107,7 @@ ValueObject::GetSyntheticArrayMemberFrom
     if (IsArrayType ())
     {
         char index_str[64];
-        snprintf(index_str, sizeof(index_str), "[%zu]", index);
+        snprintf(index_str, sizeof(index_str), "[%" PRIu64 "]", (uint64_t)index);
         ConstString index_const_str(index_str);
         // Check if we have already created a synthetic array member in this
         // valid object. If we have we will re-use it.

Modified: lldb/trunk/source/DataFormatters/LibCxx.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxx.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxx.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxx.cpp Mon Mar  3 09:39:47 2014
@@ -143,9 +143,7 @@ lldb_private::formatters::LibcxxVectorBo
     DataBufferSP buffer_sp(new DataBufferHeap(m_bool_type.GetByteSize(),0));
     if (bit_set && buffer_sp && buffer_sp->GetBytes())
         *(buffer_sp->GetBytes()) = 1; // regardless of endianness, anything non-zero is true
-    StreamString name; name.Printf("[%zu]",idx);
-    DataExtractor data(buffer_sp, process_sp->GetByteOrder(), process_sp->GetAddressByteSize());
-    retval_sp = ValueObject::CreateValueObjectFromData(name.GetData(), data, m_exe_ctx_ref, m_bool_type);
+    StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     if (retval_sp)
         m_children[idx] = retval_sp;
     return retval_sp;
@@ -499,7 +497,7 @@ lldb_private::formatters::LibcxxStdVecto
     uint64_t offset = idx * m_element_size;
     offset = offset + m_start->GetValueAsUnsigned(0);
     StreamString name;
-    name.Printf("[%zu]",idx);
+    name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     ValueObjectSP child_sp = ValueObject::CreateValueObjectFromAddress(name.GetData(), offset, m_backend.GetExecutionContextRef(), m_element_type);
     m_children[idx] = child_sp;
     return child_sp;

Modified: lldb/trunk/source/DataFormatters/LibCxxList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxxList.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxxList.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxxList.cpp Mon Mar  3 09:39:47 2014
@@ -263,7 +263,7 @@ lldb_private::formatters::LibcxxStdListS
         return lldb::ValueObjectSP();
     
     StreamString name;
-    name.Printf("[%zu]",idx);
+    name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     return (m_children[idx] = ValueObject::CreateValueObjectFromData(name.GetData(), data, m_backend.GetExecutionContextRef(), m_element_type));
 }
 

Modified: lldb/trunk/source/DataFormatters/LibCxxMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxxMap.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxxMap.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxxMap.cpp Mon Mar  3 09:39:47 2014
@@ -374,7 +374,7 @@ lldb_private::formatters::LibcxxStdMapSy
         return lldb::ValueObjectSP();
     }
     StreamString name;
-    name.Printf("[%zu]",idx);
+    name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     return (m_children[idx] = ValueObject::CreateValueObjectFromData(name.GetData(), data, m_backend.GetExecutionContextRef(), m_element_type));
 }
 

Modified: lldb/trunk/source/DataFormatters/LibCxxUnorderedMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxxUnorderedMap.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxxUnorderedMap.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxxUnorderedMap.cpp Mon Mar  3 09:39:47 2014
@@ -81,7 +81,7 @@ lldb_private::formatters::LibcxxStdUnord
     if (!val_hash.first)
         return lldb::ValueObjectSP();
     StreamString stream;
-    stream.Printf("[%zu]",idx);
+    stream.Printf("[%" PRIu64 "]", (uint64_t)idx);
     DataExtractor data;
     Error error;
     val_hash.first->GetData(data, error);

Modified: lldb/trunk/source/DataFormatters/LibStdcpp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibStdcpp.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibStdcpp.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibStdcpp.cpp Mon Mar  3 09:39:47 2014
@@ -93,7 +93,7 @@ lldb_private::formatters::LibstdcppVecto
         target.EvaluateExpression("(bool)true", NULL, retval_sp);
     else
         target.EvaluateExpression("(bool)false", NULL, retval_sp);
-    StreamString name; name.Printf("[%zu]",idx);
+    StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     if (retval_sp)
         retval_sp->SetName(ConstString(name.GetData()));
     return retval_sp;

Modified: lldb/trunk/source/DataFormatters/NSArray.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/NSArray.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/NSArray.cpp (original)
+++ lldb/trunk/source/DataFormatters/NSArray.cpp Mon Mar  3 09:39:47 2014
@@ -128,7 +128,7 @@ lldb_private::formatters::NSArrayMSynthe
         pyhs_idx -= (m_data_32 ? m_data_32->_size : m_data_64->_size);
     object_at_idx += (pyhs_idx * m_ptr_size);
     StreamString idx_name;
-    idx_name.Printf("[%zu]",idx);
+    idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     lldb::ValueObjectSP retval_sp = ValueObject::CreateValueObjectFromAddress(idx_name.GetData(),
                                                                               object_at_idx,
                                                                               m_exe_ctx_ref,
@@ -278,7 +278,7 @@ lldb_private::formatters::NSArrayISynthe
     if (error.Fail())
         return lldb::ValueObjectSP();
     StreamString idx_name;
-    idx_name.Printf("[%zu]",idx);
+    idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     lldb::ValueObjectSP retval_sp = ValueObject::CreateValueObjectFromAddress(idx_name.GetData(), object_at_idx, m_exe_ctx_ref, m_id_type);
     m_children.push_back(retval_sp);
     return retval_sp;
@@ -342,7 +342,7 @@ lldb::ValueObjectSP
 lldb_private::formatters::NSArrayCodeRunningSyntheticFrontEnd::GetChildAtIndex (size_t idx)
 {
     StreamString idx_name;
-    idx_name.Printf("[%zu]",idx);
+    idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     lldb::ValueObjectSP valobj_sp = CallSelectorOnObject(m_backend,"id","objectAtIndex:",idx);
     if (valobj_sp)
         valobj_sp->SetName(ConstString(idx_name.GetData()));

Modified: lldb/trunk/source/DataFormatters/NSDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/NSDictionary.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/NSDictionary.cpp (original)
+++ lldb/trunk/source/DataFormatters/NSDictionary.cpp Mon Mar  3 09:39:47 2014
@@ -210,9 +210,9 @@ lldb::ValueObjectSP
 lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::GetChildAtIndex (size_t idx)
 {
     StreamString idx_name;
-    idx_name.Printf("[%zu]",idx);
+    idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
     StreamString key_fetcher_expr;
-    key_fetcher_expr.Printf("(id)[(NSArray*)[(id)0x%" PRIx64 " allKeys] objectAtIndex:%zu]",m_backend.GetPointerValue(),idx);
+    key_fetcher_expr.Printf("(id)[(NSArray*)[(id)0x%" PRIx64 " allKeys] objectAtIndex:%" PRIu64 "]", m_backend.GetPointerValue(), (uint64_t)idx);
     StreamString value_fetcher_expr;
     value_fetcher_expr.Printf("(id)[(id)0x%" PRIx64 " objectForKey:(%s)]",m_backend.GetPointerValue(),key_fetcher_expr.GetData());
     StreamString object_fetcher_expr;
@@ -403,7 +403,7 @@ lldb_private::formatters::NSDictionaryIS
         }
         
         StreamString idx_name;
-        idx_name.Printf("[%zu]",idx);
+        idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
         DataExtractor data(buffer_sp, m_order, m_ptr_size);
         dict_item.valobj_sp = ValueObject::CreateValueObjectFromData(idx_name.GetData(), data, m_exe_ctx_ref, m_pair_type);
     }
@@ -567,7 +567,7 @@ lldb_private::formatters::NSDictionaryMS
         }
         
         StreamString idx_name;
-        idx_name.Printf("[%zu]",idx);
+        idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
         DataExtractor data(buffer_sp, m_order, m_ptr_size);
         dict_item.valobj_sp = ValueObject::CreateValueObjectFromData(idx_name.GetData(), data, m_exe_ctx_ref, m_pair_type);
     }

Modified: lldb/trunk/source/DataFormatters/NSSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/NSSet.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/NSSet.cpp (original)
+++ lldb/trunk/source/DataFormatters/NSSet.cpp Mon Mar  3 09:39:47 2014
@@ -305,7 +305,7 @@ lldb_private::formatters::NSSetISyntheti
                 assert(false && "pointer size is not 4 nor 8 - get out of here ASAP");
         }
         StreamString idx_name;
-        idx_name.Printf("[%zu]",idx);
+        idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
         
         DataExtractor data(buffer.GetBytes(),
                            buffer.GetByteSize(),
@@ -473,7 +473,7 @@ lldb_private::formatters::NSSetMSyntheti
                 assert(false && "pointer size is not 4 nor 8 - get out of here ASAP");
         }
         StreamString idx_name;
-        idx_name.Printf("[%zu]",idx);
+        idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
         
         DataExtractor data(buffer.GetBytes(),
                            buffer.GetByteSize(),
@@ -519,7 +519,7 @@ lldb_private::formatters::NSOrderedSetSy
             if (retval_sp)
             {
                 StreamString idx_name;
-                idx_name.Printf("[%zu]",idx);
+                idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
                 retval_sp->SetName(ConstString(idx_name.GetData()));
             }
             m_children[idx] = retval_sp;

Modified: lldb/trunk/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangFunction.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangFunction.cpp (original)
+++ lldb/trunk/source/Expression/ClangFunction.cpp Mon Mar  3 09:39:47 2014
@@ -173,7 +173,7 @@ ClangFunction::CompileFunction (Stream &
             }
             else
             {   
-                errors.Printf("Could not determine type of input value %zu.", i);
+                errors.Printf("Could not determine type of input value %" PRId64 ".", i);
                 return 1;
             }
         }
@@ -344,7 +344,7 @@ ClangFunction::WriteFunctionArguments (E
     size_t num_args = arg_values.GetSize();
     if (num_args != m_arg_values.GetSize())
     {
-        errors.Printf ("Wrong number of arguments - was: %zu should be: %zu", num_args, m_arg_values.GetSize());
+        errors.Printf ("Wrong number of arguments - was: %" PRId64 " should be: %" PRId64 "", num_args, m_arg_values.GetSize());
         return false;
     }
     

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Mon Mar  3 09:39:47 2014
@@ -1363,7 +1363,7 @@ DWARFExpression::Evaluate
         if (log && log->GetVerbose())
         {
             size_t count = stack.size();
-            log->Printf("Stack before operation has %zu values:", count);
+            log->Printf("Stack before operation has %" PRId64 " values:", count);
             for (size_t i=0; i<count; ++i)
             {
                 StreamString new_value;
@@ -2832,7 +2832,7 @@ DWARFExpression::Evaluate
     else if (log && log->GetVerbose())
     {
         size_t count = stack.size();
-        log->Printf("Stack after operation has %zu values:", count);
+        log->Printf("Stack after operation has %" PRId64 " values:", count);
         for (size_t i=0; i<count; ++i)
         {
             StreamString new_value;

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Mon Mar  3 09:39:47 2014
@@ -2016,7 +2016,7 @@ IRForTarget::ReplaceStaticLiterals (llvm
                 }
                 ss.flush();
                 
-                log->Printf("Found ConstantFP with size %zu and raw data %s", operand_data_size, s.c_str());
+                log->Printf("Found ConstantFP with size %" PRId64 " and raw data %s", operand_data_size, s.c_str());
             }
             
             lldb_private::DataBufferHeap data(operand_data_size, 0);
@@ -2479,7 +2479,7 @@ IRForTarget::ReplaceVariables (Function
     }
     
     if (log)
-        log->Printf("Total structure [align %" PRId64 ", size %zu]", alignment, size);
+        log->Printf("Total structure [align %" PRId64 ", size %" PRId64 "]", alignment, size);
     
     return true;
 }

Modified: lldb/trunk/source/Host/windows/EditLineWin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/EditLineWin.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/EditLineWin.cpp (original)
+++ lldb/trunk/source/Host/windows/EditLineWin.cpp Mon Mar  3 09:39:47 2014
@@ -317,8 +317,6 @@ el_set (EditLine *el, int code, ...)
             clientData = va_arg(vl, void*);
         }
         break;
-//    default:
-//        assert( !"Not Implemented!" );
     }
     return 0;
 }
@@ -326,7 +324,7 @@ el_set (EditLine *el, int code, ...)
 void
 el_end (EditLine *el)
 {
-    assert( !"Not implemented!" );
+    //assert( !"Not implemented!" );
 }
 
 void
@@ -345,7 +343,6 @@ el_getc (EditLine *, char *)
 void
 el_push (EditLine *, const char *)
 {
-//    assert( !"Not implemented!" );
 }
 
 void
@@ -398,7 +395,6 @@ el_resize (EditLine *)
 const LineInfo *
 el_line (EditLine *el)
 {
-    assert( !"Not implemented!" );
     return 0;
 }
 
@@ -425,14 +421,14 @@ history_init (void)
 void
 history_end (History *)
 {
-    assert( !"Not implemented!" );
+//    assert( !"Not implemented!" );
 }
 
 int
 history (History *, HistEvent *, int op, ...)
 {
-    // perform operation 'op' on the history list with optional argumetns as needed by
-    // the operation.
+    // perform operation 'op' on the history list with
+    // optional arguments as needed by the operation.
     return 0;
 }
 

Modified: lldb/trunk/source/Interpreter/CommandHistory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandHistory.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandHistory.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandHistory.cpp Mon Mar  3 09:39:47 2014
@@ -137,7 +137,7 @@ CommandHistory::Dump (Stream& stream,
         if (!hist_item.empty())
         {
             stream.Indent();
-            stream.Printf ("%4zu: %s\n", counter, hist_item.c_str());
+            stream.Printf("%4" PRId64 ": %s\n", counter, hist_item.c_str());
         }
     }
 }

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Mar  3 09:39:47 2014
@@ -2494,16 +2494,16 @@ CommandInterpreter::HandleCommands (cons
                 error_msg = "<unknown error>.\n";
             if (stop_on_error)
             {
-                result.AppendErrorWithFormat("Aborting reading of commands after command #%zu: '%s' failed with %s",
-                                         idx, cmd, error_msg);
+                result.AppendErrorWithFormat("Aborting reading of commands after command #%" PRIu64 ": '%s' failed with %s",
+                                                (uint64_t)idx, cmd, error_msg);
                 result.SetStatus (eReturnStatusFailed);
                 m_debugger.SetAsyncExecution (old_async_execution);
                 return;
             }
             else if (print_results)
             {
-                result.AppendMessageWithFormat ("Command #%zu '%s' failed with %s",
-                                                idx + 1, 
+                result.AppendMessageWithFormat ("Command #%" PRIu64 " '%s' failed with %s",
+                                                (uint64_t)idx + 1,
                                                 cmd, 
                                                 error_msg);
             }
@@ -2527,10 +2527,10 @@ CommandInterpreter::HandleCommands (cons
                 // status in our real result before returning.  This is an error if the continue was not the
                 // last command in the set of commands to be run.
                 if (idx != num_lines - 1)
-                    result.AppendErrorWithFormat("Aborting reading of commands after command #%zu: '%s' continued the target.\n", 
-                                                 idx + 1, cmd);
+                    result.AppendErrorWithFormat("Aborting reading of commands after command #%" PRIu64 ": '%s' continued the target.\n", 
+                                                 (uint64_t)idx + 1, cmd);
                 else
-                    result.AppendMessageWithFormat ("Command #%zu '%s' continued the target.\n", idx + 1, cmd);
+                    result.AppendMessageWithFormat("Command #%" PRIu64 " '%s' continued the target.\n", (uint64_t)idx + 1, cmd);
                     
                 result.SetStatus(tmp_result.GetStatus());
                 m_debugger.SetAsyncExecution (old_async_execution);

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Mon Mar  3 09:39:47 2014
@@ -204,7 +204,7 @@ __lldb_apple_objc_v2_get_shared_cache_cl
     uint32_t idx = 0;
     DEBUG_PRINTF ("objc_opt_ro_ptr = %p\n", objc_opt_ro_ptr);
     DEBUG_PRINTF ("class_infos_ptr = %p\n", class_infos_ptr);
-    DEBUG_PRINTF ("class_infos_byte_size = %u (%zu class infos)\n", class_infos_byte_size, (size_t)(class_infos_byte_size/sizeof(ClassInfo)));
+    DEBUG_PRINTF ("class_infos_byte_size = %u (%" PRIu64 " class infos)\n", class_infos_byte_size, (size_t)(class_infos_byte_size/sizeof(ClassInfo)));
     if (objc_opt_ro_ptr)
     {
         const objc_opt_t *objc_opt = (objc_opt_t *)objc_opt_ro_ptr;

Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Mon Mar  3 09:39:47 2014
@@ -461,7 +461,7 @@ ObjectContainerBSDArchive::Dump (Stream
     s->Indent();
     const size_t num_archs = GetNumArchitectures();
     const size_t num_objects = GetNumObjects();
-    s->Printf("ObjectContainerBSDArchive, num_archs = %zu, num_objects = %zu", num_archs, num_objects);
+    s->Printf("ObjectContainerBSDArchive, num_archs = %" PRId64 ", num_objects = %" PRId64 "", num_archs, num_objects);
     uint32_t i;
     ArchSpec arch;
     s->IndentMore();

Modified: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp Mon Mar  3 09:39:47 2014
@@ -632,10 +632,10 @@ DynamicRegisterInfo::Dump () const
 {
     StreamFile s(stdout, false);
     const size_t num_regs = m_regs.size();
-    s.Printf("%p: DynamicRegisterInfo contains %zu registers:\n", this, num_regs);
+    s.Printf("%p: DynamicRegisterInfo contains %" PRIu64 " registers:\n", this, (uint64_t)num_regs);
     for (size_t i=0; i<num_regs; ++i)
     {
-        s.Printf("[%3zu] name = %-10s", i, m_regs[i].name);
+        s.Printf("[%3" PRId64 "] name = %-10s", i, m_regs[i].name);
         s.Printf(", size = %2u, offset = %4u, encoding = %u, format = %-10s",
                  m_regs[i].byte_size,
                  m_regs[i].byte_offset,
@@ -673,10 +673,10 @@ DynamicRegisterInfo::Dump () const
     }
     
     const size_t num_sets = m_sets.size();
-    s.Printf("%p: DynamicRegisterInfo contains %zu register sets:\n", this, num_sets);
+    s.Printf("%p: DynamicRegisterInfo contains %" PRIu64 " register sets:\n", this, (uint64_t)num_sets);
     for (size_t i=0; i<num_sets; ++i)
     {
-        s.Printf("set[%zu] name = %s, regs = [", i, m_sets[i].name);
+        s.Printf("set[%" PRIu64 "] name = %s, regs = [", (uint64_t)i, m_sets[i].name);
         for (size_t idx=0; idx<m_sets[i].num_registers; ++idx)
         {
             s.Printf("%s ", m_regs[m_sets[i].registers[idx]].name);

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Mon Mar  3 09:39:47 2014
@@ -910,15 +910,15 @@ SymbolContextSpecifier::GetDescription (
         s->Printf ("File: %s", path_str);
         if (m_type == eLineStartSpecified)
         {
-            s->Printf (" from line %zu", m_start_line);
+            s->Printf (" from line %" PRId64 "", m_start_line);
             if (m_type == eLineEndSpecified)
-                s->Printf ("to line %zu", m_end_line);
+                s->Printf ("to line %" PRId64 "", m_end_line);
             else
                 s->Printf ("to end");
         }
         else if (m_type == eLineEndSpecified)
         {
-            s->Printf (" from start to line %zu", m_end_line);
+            s->Printf (" from start to line %" PRId64 "", m_end_line);
         }
         s->Printf (".\n");
     }
@@ -926,16 +926,16 @@ SymbolContextSpecifier::GetDescription (
     if (m_type == eLineStartSpecified)
     {
         s->Indent();
-        s->Printf ("From line %zu", m_start_line);
+        s->Printf ("From line %" PRId64 "", m_start_line);
         if (m_type == eLineEndSpecified)
-            s->Printf ("to line %zu", m_end_line);
+            s->Printf ("to line %" PRId64 "", m_end_line);
         else
             s->Printf ("to end");
         s->Printf (".\n");
     }
     else if (m_type == eLineEndSpecified)
     {
-        s->Printf ("From start to line %zu.\n", m_end_line);
+        s->Printf ("From start to line %" PRId64 ".\n", m_end_line);
     }
     
     if (m_type == eFunctionSpecified)

Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Mon Mar  3 09:39:47 2014
@@ -90,14 +90,14 @@ Symtab::Dump (Stream *s, Target *target,
         object_name = m_objfile->GetModule()->GetObjectName().GetCString();
 
     if (file_spec)
-        s->Printf("Symtab, file = %s%s%s%s, num_symbols = %zu",
+        s->Printf("Symtab, file = %s%s%s%s, num_symbols = %" PRId64 "",
         file_spec.GetPath().c_str(),
         object_name ? "(" : "",
         object_name ? object_name : "",
         object_name ? ")" : "",
         m_symbols.size());
     else
-        s->Printf("Symtab, num_symbols = %zu", m_symbols.size());
+        s->Printf("Symtab, num_symbols = %" PRId64 "", m_symbols.size());
 
     if (!m_symbols.empty())
     {
@@ -166,7 +166,7 @@ Symtab::Dump(Stream *s, Target *target,
     const size_t num_symbols = GetNumSymbols();
     //s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
     s->Indent();
-    s->Printf("Symtab %zu symbol indexes (%zu symbols total):\n", indexes.size(), m_symbols.size());
+    s->Printf("Symtab %" PRId64 " symbol indexes (%" PRId64 " symbols total):\n", indexes.size(), m_symbols.size());
     s->IndentMore();
 
     if (!indexes.empty())

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Mar  3 09:39:47 2014
@@ -635,7 +635,7 @@ Target::CreateWatchpoint(lldb::addr_t ad
         if (!CheckIfWatchpointsExhausted(this, error))
         {
             if (!OptionGroupWatchpoint::IsWatchSizeSupported(size))
-                error.SetErrorStringWithFormat("watch size of %zu is not supported", size);
+                error.SetErrorStringWithFormat("watch size of %" PRId64 " is not supported", size);
         }
         wp_sp.reset();
     }

Modified: lldb/trunk/source/Target/ThreadPlanStepRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepRange.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepRange.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepRange.cpp Mon Mar  3 09:39:47 2014
@@ -443,8 +443,8 @@ ThreadPlanStepRange::NextRangeBreakpoint
             }
         }
         if (log)
-            log->Printf ("ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit next range breakpoint which has %zu owners - explains stop: %u.",
-                        num_owners,
+            log->Printf ("ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit next range breakpoint which has %" PRIu64 " owners - explains stop: %u.",
+                        (uint64_t)num_owners,
                         explains_stop);
         ClearNextBranchBreakpoint();
         return  explains_stop;

Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Mon Mar  3 09:39:47 2014
@@ -1032,6 +1032,12 @@ sigcont_handler (int signo)
 int
 main (int argc, char const *argv[], const char *envp[])
 {
+#ifdef _MSC_VER
+	// disable buffering on windows
+	setvbuf(stdout, NULL, _IONBF, 0);
+	setvbuf(stdin , NULL, _IONBF, 0);
+#endif
+
     SBDebugger::Initialize();
     
     SBHostOS::ThreadCreated ("<lldb.driver.main-thread>");

Modified: lldb/trunk/tools/driver/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.cpp?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Platform.cpp (original)
+++ lldb/trunk/tools/driver/Platform.cpp Mon Mar  3 09:39:47 2014
@@ -15,10 +15,6 @@
 
 #include "Platform.h"
 
-// index one of the variable arguments
-//  presuming "(EditLine *el, ..." is first in the argument list
-#define GETARG( Y, X ) ( (void* ) *( ( (int**) &(Y) ) + (X) ) )
-
 // the control handler or SIGINT handler
 static sighandler_t _ctrlHandler = NULL;
 
@@ -42,14 +38,16 @@ ioctl (int d, int request, ...)
     // request the console windows size
     case ( TIOCGWINSZ ):
         {
-            // locate the window size structure on stack
-            winsize *ws = (winsize*) GETARG( d, 2 );
+            va_list vl;
+            va_start(vl,request);
+	     // locate the window size structure on stack
+	     winsize *ws = va_arg(vl, winsize*);
             // get screen buffer information
             CONSOLE_SCREEN_BUFFER_INFO info;
-            GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &info );
-            // fill in the columns
-            ws->ws_col = info.dwMaximumWindowSize.X;
-            //
+            if ( GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &info ) == TRUE )
+                // fill in the columns
+                ws->ws_col = info.dwMaximumWindowSize.X;
+            va_end(vl);
             return 0;
         }
         break;
@@ -108,4 +106,4 @@ signal (int sig, sighandler_t sigFunc)
     return 0;
 }
 
-#endif
\ No newline at end of file
+#endif

Modified: lldb/trunk/tools/driver/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.h?rev=202723&r1=202722&r2=202723&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Platform.h (original)
+++ lldb/trunk/tools/driver/Platform.h Mon Mar  3 09:39:47 2014
@@ -10,6 +10,8 @@
 #ifndef lldb_Platform_h_
 #define lldb_Platform_h_
 
+#include "lldb/Host/HostGetOpt.h"
+
 #if defined( _MSC_VER )
 
     // this will stop signal.h being included
@@ -19,7 +21,6 @@
     #include <eh.h>
     #include <inttypes.h>
     #include "lldb/Host/windows/Windows.h"
-    #include "lldb/Host/HostGetOpt.h"
 
     struct timeval
     {
@@ -91,7 +92,6 @@
 
     #include <inttypes.h>
 
-    #include <getopt.h>
     #include <libgen.h>
     #include <sys/ioctl.h>
     #include <termios.h>





More information about the lldb-commits mailing list