[Lldb-commits] [lldb] r183140 - Fix various build warnings.

Matt Kopec Matt.Kopec at intel.com
Mon Jun 3 11:00:08 PDT 2013


Author: mkopec
Date: Mon Jun  3 13:00:07 2013
New Revision: 183140

URL: http://llvm.org/viewvc/llvm-project?rev=183140&view=rev
Log:
Fix various build warnings.

Modified:
    lldb/trunk/include/lldb/Expression/Materializer.h
    lldb/trunk/source/Core/Value.cpp
    lldb/trunk/source/Core/ValueObjectVariable.cpp
    lldb/trunk/source/DataFormatters/CF.cpp
    lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
    lldb/trunk/source/DataFormatters/Cocoa.cpp
    lldb/trunk/source/DataFormatters/LibCxx.cpp
    lldb/trunk/source/DataFormatters/LibCxxList.cpp
    lldb/trunk/source/DataFormatters/LibCxxMap.cpp
    lldb/trunk/source/Expression/IRInterpreter.cpp
    lldb/trunk/source/Expression/IRMemoryMap.cpp
    lldb/trunk/source/Expression/Materializer.cpp
    lldb/trunk/source/Host/common/Mutex.cpp
    lldb/trunk/source/Interpreter/PythonDataObjects.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
    lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
    lldb/trunk/source/Target/Platform.cpp
    lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/include/lldb/Expression/Materializer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/Materializer.h?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/Materializer.h (original)
+++ lldb/trunk/include/lldb/Expression/Materializer.h Mon Jun  3 13:00:07 2013
@@ -155,7 +155,6 @@ private:
     typedef std::unique_ptr<Entity>  EntityUP;
     typedef std::vector<EntityUP>   EntityVector;
     
-    unsigned                        m_result_index;
     DematerializerWP                m_dematerializer_wp;
     EntityVector                    m_entities;
     Entity                         *m_result_entity;

Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Mon Jun  3 13:00:07 2013
@@ -339,10 +339,6 @@ Value::GetValueAsData (ExecutionContext
     Address file_so_addr;
     switch (m_value_type)
     {
-    default:
-        error.SetErrorStringWithFormat("invalid value type %i", m_value_type);
-        break;
-            
     case eValueTypeVector:
         if (m_context_type == eContextTypeClangType && ast_context)
         {

Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Mon Jun  3 13:00:07 2013
@@ -186,10 +186,6 @@ ValueObjectVariable::UpdateValue ()
 
             switch (value_type)
             {
-            default:
-                m_error.SetErrorStringWithFormat("Variable %s has an expression result value %d which is currently unhandled",variable->GetName().GetCString(),value_type);
-                break;
-                    
             case Value::eValueTypeVector:
                     // fall through
             case Value::eValueTypeScalar:

Modified: lldb/trunk/source/DataFormatters/CF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CF.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/CF.cpp (original)
+++ lldb/trunk/source/DataFormatters/CF.cpp Mon Jun  3 13:00:07 2013
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/lldb-python.h"
+
 #include "lldb/DataFormatters/CXXFormatterFunctions.h"
 
 #include "lldb/Core/DataBufferHeap.h"

Modified: lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp Mon Jun  3 13:00:07 2013
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/lldb-python.h"
+
 #include "lldb/DataFormatters/CXXFormatterFunctions.h"
 
 #include "llvm/Support/ConvertUTF.h"

Modified: lldb/trunk/source/DataFormatters/Cocoa.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/Cocoa.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/Cocoa.cpp (original)
+++ lldb/trunk/source/DataFormatters/Cocoa.cpp Mon Jun  3 13:00:07 2013
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/lldb-python.h"
+
 #include "lldb/DataFormatters/CXXFormatterFunctions.h"
 
 #include "lldb/Core/DataBufferHeap.h"
@@ -284,7 +286,7 @@ lldb_private::formatters::NSIndexSetSumm
                 return false;
         }
     }  while (false);
-    stream.Printf("%llu index%s",
+    stream.Printf("%" PRIu64 " index%s",
                   count,
                   (count == 1 ? "" : "es"));
     return true;

Modified: lldb/trunk/source/DataFormatters/LibCxx.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxx.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxx.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxx.cpp Mon Jun  3 13:00:07 2013
@@ -514,7 +514,7 @@ lldb_private::formatters::LibcxxContaine
         uint64_t value = valobj.GetValueAsUnsigned(0);
         if (!value)
             return false;
-        stream.Printf("0x%016llx ", value);
+        stream.Printf("0x%016" PRIx64 " ", value);
     }
     return Debugger::FormatPrompt("size=${svar%#}", NULL, NULL, NULL, stream, &valobj);
 }

Modified: lldb/trunk/source/DataFormatters/LibCxxList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxxList.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxxList.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxxList.cpp Mon Jun  3 13:00:07 2013
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/lldb-python.h"
+
 #include "lldb/DataFormatters/CXXFormatterFunctions.h"
 
 #include "lldb/Core/DataBufferHeap.h"

Modified: lldb/trunk/source/DataFormatters/LibCxxMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/LibCxxMap.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/LibCxxMap.cpp (original)
+++ lldb/trunk/source/DataFormatters/LibCxxMap.cpp Mon Jun  3 13:00:07 2013
@@ -7,6 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/lldb-python.h"
+
 #include "lldb/DataFormatters/CXXFormatterFunctions.h"
 
 #include "lldb/Core/DataBufferHeap.h"
@@ -378,7 +380,7 @@ lldb_private::formatters::LibcxxStdMapSy
     m_children.clear();
     m_tree = m_backend.GetChildMemberWithName(ConstString("__tree_"), true).get();
     if (!m_tree)
-        return NULL;
+        return false;
     m_root_node = m_tree->GetChildMemberWithName(ConstString("__begin_node_"), true).get();
     return false;
 }

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Mon Jun  3 13:00:07 2013
@@ -786,8 +786,8 @@ IRInterpreter::Interpret (llvm::Module &
                 if (log)
                 {
                     log->Printf("Interpreted an AllocaInst");
-                    log->Printf("  R : 0x%llx", R);
-                    log->Printf("  P : 0x%llx", P);
+                    log->Printf("  R : 0x%" PRIx64, R);
+                    log->Printf("  P : 0x%" PRIx64, P);
                 }
             }
                 break;
@@ -1211,9 +1211,9 @@ IRInterpreter::Interpret (llvm::Module &
                 if (log)
                 {
                     log->Printf("Interpreted a LoadInst");
-                    log->Printf("  P : 0x%llx", P);
-                    log->Printf("  R : 0x%llx", R);
-                    log->Printf("  D : 0x%llx", D);
+                    log->Printf("  P : 0x%" PRIx64, P);
+                    log->Printf("  R : 0x%" PRIx64, R);
+                    log->Printf("  D : 0x%" PRIx64, D);
                 }
             }
                 break;
@@ -1311,9 +1311,9 @@ IRInterpreter::Interpret (llvm::Module &
                 if (log)
                 {
                     log->Printf("Interpreted a StoreInst");
-                    log->Printf("  D : 0x%llx", D);
-                    log->Printf("  P : 0x%llx", P);
-                    log->Printf("  R : 0x%llx", R);
+                    log->Printf("  D : 0x%" PRIx64, D);
+                    log->Printf("  P : 0x%" PRIx64, P);
+                    log->Printf("  R : 0x%" PRIx64, R);
                 }
             }
                 break;

Modified: lldb/trunk/source/Expression/IRMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRMemoryMap.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRMemoryMap.cpp (original)
+++ lldb/trunk/source/Expression/IRMemoryMap.cpp Mon Jun  3 13:00:07 2013
@@ -360,7 +360,7 @@ IRMemoryMap::Malloc (size_t size, uint8_
             break;
         }
         
-        log->Printf("IRMemoryMap::Malloc (%llu, 0x%llx, 0x%llx, %s) -> 0x%llx",
+        log->Printf("IRMemoryMap::Malloc (%" PRIu64 ", 0x%" PRIx64 ", 0x%" PRIx64 ", %s) -> 0x%" PRIx64,
                     (uint64_t)allocation_size,
                     (uint64_t)alignment,
                     (uint64_t)permissions,
@@ -433,7 +433,7 @@ IRMemoryMap::Free (lldb::addr_t process_
     
     if (lldb_private::Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS))
     {        
-        log->Printf("IRMemoryMap::Free (0x%llx) freed [0x%llx..0x%llx)",
+        log->Printf("IRMemoryMap::Free (0x%" PRIx64 ") freed [0x%" PRIx64 "..0x%" PRIx64 ")",
                     (uint64_t)process_address,
                     iter->second.m_process_start,
                     iter->second.m_process_start + iter->second.m_size);
@@ -514,7 +514,7 @@ IRMemoryMap::WriteMemory (lldb::addr_t p
     
     if (lldb_private::Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS))
     {        
-        log->Printf("IRMemoryMap::WriteMemory (0x%llx, 0x%llx, 0x%lld) went to [0x%llx..0x%llx)",
+        log->Printf("IRMemoryMap::WriteMemory (0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRId64 ") went to [0x%" PRIx64 "..0x%" PRIx64 ")",
                     (uint64_t)process_address,
                     (uint64_t)bytes,
                     (uint64_t)size,
@@ -647,7 +647,7 @@ IRMemoryMap::ReadMemory (uint8_t *bytes,
     
     if (lldb_private::Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS))
     {
-        log->Printf("IRMemoryMap::ReadMemory (0x%llx, 0x%llx, 0x%lld) came from [0x%llx..0x%llx)",
+        log->Printf("IRMemoryMap::ReadMemory (0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRId64 ") came from [0x%" PRIx64 "..0x%" PRIx64 ")",
                     (uint64_t)process_address,
                     (uint64_t)bytes,
                     (uint64_t)size,
@@ -677,7 +677,7 @@ IRMemoryMap::ReadScalarFromMemory (Scala
         {
         default:
             error.SetErrorToGenericError();
-            error.SetErrorStringWithFormat("Couldn't read scalar: unsupported size %lld", (unsigned long long)size);
+            error.SetErrorStringWithFormat("Couldn't read scalar: unsupported size %" PRId64, size);
             return;
         case 1: scalar = extractor.GetU8(&offset);  break;
         case 2: scalar = extractor.GetU16(&offset); break;
@@ -721,7 +721,7 @@ IRMemoryMap::GetMemoryData (DataExtracto
         if (iter == m_allocations.end())
         {
             error.SetErrorToGenericError();
-            error.SetErrorStringWithFormat("Couldn't find an allocation containing [0x%llx..0x%llx)", (unsigned long long)process_address, (unsigned long long)(process_address + size));
+            error.SetErrorStringWithFormat("Couldn't find an allocation containing [0x%" PRIx64 "..0x%" PRIx64 ")", process_address, process_address + size);
             return;
         }
         

Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Mon Jun  3 13:00:07 2013
@@ -152,7 +152,7 @@ public:
 
         if (log)
         {
-            log->Printf("EntityPersistentVariable::Materialize [process_address = 0x%llx, m_name = %s, m_flags = 0x%hx]",
+            log->Printf("EntityPersistentVariable::Materialize [process_address = 0x%" PRIx64 ", m_name = %s, m_flags = 0x%hx]",
                         (uint64_t)process_address,
                         m_persistent_variable_sp->GetName().AsCString(),
                         m_persistent_variable_sp->m_flags);
@@ -196,7 +196,7 @@ public:
         
         if (log)
         {
-            log->Printf("EntityPersistentVariable::Dematerialize [process_address = 0x%llx, m_name = %s, m_flags = 0x%hx]",
+            log->Printf("EntityPersistentVariable::Dematerialize [process_address = 0x%" PRIx64 ", m_name = %s, m_flags = 0x%hx]",
                         (uint64_t)process_address,
                         m_persistent_variable_sp->GetName().AsCString(),
                         m_persistent_variable_sp->m_flags);
@@ -318,7 +318,7 @@ public:
         
         Error err;
         
-        dump_stream.Printf("0x%llx: EntityPersistentVariable (%s)\n", (unsigned long long)process_address + m_offset, m_persistent_variable_sp->GetName().AsCString());
+        dump_stream.Printf("0x%" PRIx64 ": EntityPersistentVariable (%s)\n", process_address + m_offset, m_persistent_variable_sp->GetName().AsCString());
         
         {
             dump_stream.Printf("Pointer:\n");
@@ -415,7 +415,7 @@ public:
         
         if (log)
         {
-            log->Printf("EntityVariable::Materialize [process_address = 0x%llx, m_variable_sp = %s]",
+            log->Printf("EntityVariable::Materialize [process_address = 0x%" PRIx64 ", m_variable_sp = %s]",
                         (uint64_t)process_address,
                         m_variable_sp->GetName().AsCString());
         }
@@ -536,7 +536,7 @@ public:
 
         if (log)
         {
-            log->Printf("EntityVariable::Dematerialize [process_address = 0x%llx, m_variable_sp = %s]",
+            log->Printf("EntityVariable::Dematerialize [process_address = 0x%" PRIx64 ", m_variable_sp = %s]",
                         (uint64_t)process_address,
                         m_variable_sp->GetName().AsCString());
         }
@@ -597,7 +597,7 @@ public:
     {
         StreamString dump_stream;
         
-        dump_stream.Printf("0x%llx: EntityVariable\n", (unsigned long long)process_address + m_offset);
+        dump_stream.Printf("0x%" PRIx64 ": EntityVariable\n", process_address + m_offset);
         
         Error err;
                 
@@ -854,7 +854,7 @@ public:
     {
         StreamString dump_stream;
                 
-        dump_stream.Printf("0x%llx: EntityResultVariable\n", (unsigned long long)process_address + m_offset);
+        dump_stream.Printf("0x%" PRIx64 ": EntityResultVariable\n", process_address + m_offset);
         
         Error err;
         
@@ -971,7 +971,7 @@ public:
 
         if (log)
         {
-            log->Printf("EntitySymbol::Materialize [process_address = 0x%llx, m_symbol = %s]",
+            log->Printf("EntitySymbol::Materialize [process_address = 0x%" PRIx64 ", m_symbol = %s]",
                         (uint64_t)process_address,
                         m_symbol.GetName().AsCString());
         }
@@ -1014,7 +1014,7 @@ public:
 
         if (log)
         {
-            log->Printf("EntitySymbol::Dematerialize [process_address = 0x%llx, m_symbol = %s]",
+            log->Printf("EntitySymbol::Dematerialize [process_address = 0x%" PRIx64 ", m_symbol = %s]",
                         (uint64_t)process_address,
                         m_symbol.GetName().AsCString());
         }
@@ -1028,7 +1028,7 @@ public:
         
         Error err;
         
-        dump_stream.Printf("0x%llx: EntitySymbol (%s)\n", (unsigned long long)process_address + m_offset, m_symbol.GetName().AsCString());
+        dump_stream.Printf("0x%" PRIx64 ": EntitySymbol (%s)\n", process_address + m_offset, m_symbol.GetName().AsCString());
         
         {
             dump_stream.Printf("Pointer:\n");
@@ -1089,7 +1089,7 @@ public:
         
         if (log)
         {
-            log->Printf("EntityRegister::Materialize [process_address = 0x%llx, m_register_info = %s]",
+            log->Printf("EntityRegister::Materialize [process_address = 0x%" PRIx64 ", m_register_info = %s]",
                         (uint64_t)process_address,
                         m_register_info.name);
         }
@@ -1142,7 +1142,7 @@ public:
         
         if (log)
         {
-            log->Printf("EntityRegister::Dematerialize [process_address = 0x%llx, m_register_info = %s]",
+            log->Printf("EntityRegister::Dematerialize [process_address = 0x%" PRIx64 ", m_register_info = %s]",
                         (uint64_t)process_address,
                         m_register_info.name);
         }
@@ -1182,7 +1182,7 @@ public:
         
         Error err;
         
-        dump_stream.Printf("0x%llx: EntityRegister (%s)\n", (unsigned long long)process_address + m_offset, m_register_info.name);
+        dump_stream.Printf("0x%" PRIx64 ": EntityRegister (%s)\n", process_address + m_offset, m_register_info.name);
         
         {
             dump_stream.Printf("Value:\n");
@@ -1275,7 +1275,7 @@ Materializer::Materialize (lldb::StackFr
     
     if (Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS))
     {
-        log->Printf("Materializer::Materialize (frame_sp = %p, process_address = 0x%llx) materialized:", frame_sp.get(), process_address);
+        log->Printf("Materializer::Materialize (frame_sp = %p, process_address = 0x%" PRIx64 ") materialized:", frame_sp.get(), process_address);
         for (EntityUP &entity_up : m_entities)
             entity_up->DumpToLog(map, process_address, log);
     }
@@ -1307,7 +1307,7 @@ Materializer::Dematerializer::Dematerial
     {
         if (Log *log =lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS))
         {
-            log->Printf("Materializer::Dematerialize (frame_sp = %p, process_address = 0x%llx) about to dematerialize:", frame_sp.get(), m_process_address);
+            log->Printf("Materializer::Dematerialize (frame_sp = %p, process_address = 0x%" PRIx64 ") about to dematerialize:", frame_sp.get(), m_process_address);
             for (EntityUP &entity_up : m_materializer->m_entities)
                 entity_up->DumpToLog(*m_map, m_process_address, log);
         }

Modified: lldb/trunk/source/Host/common/Mutex.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Mutex.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Mutex.cpp (original)
+++ lldb/trunk/source/Host/common/Mutex.cpp Mon Jun  3 13:00:07 2013
@@ -239,6 +239,7 @@ Mutex::Mutex (Mutex::Type type) :
 Mutex::~Mutex()
 {
     int err = ::pthread_mutex_destroy (&m_mutex);
+    assert(err == 0);
 #if ENABLE_MUTEX_ERROR_CHECKING
     if (err == 0)
         error_check_mutex (&m_mutex, eMutexActionDestroyed);

Modified: lldb/trunk/source/Interpreter/PythonDataObjects.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/PythonDataObjects.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/PythonDataObjects.cpp (original)
+++ lldb/trunk/source/Interpreter/PythonDataObjects.cpp Mon Jun  3 13:00:07 2013
@@ -15,13 +15,14 @@
 
 #else
 
-#include <stdio.h>
-
 #if defined (__APPLE__)
 #include <Python/Python.h>
 #else
 #include <Python.h>
 #endif
+
+#include <stdio.h>
+
 #include "lldb/Core/Stream.h"
 #include "lldb/Host/File.h"
 #include "lldb/Interpreter/PythonDataObjects.h"

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=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Mon Jun  3 13:00:07 2013
@@ -2599,7 +2599,7 @@ AppleObjCRuntimeV2::TaggedPointerVendorR
         Error error;
         uintptr_t slot_data = process->ReadPointerFromMemory(slot_ptr, error);
         if (error.Fail() || slot_data == 0 || slot_data == LLDB_INVALID_ADDRESS)
-            return false;
+            return nullptr;
         actual_class_descriptor_sp = m_runtime.GetClassDescriptor(slot_data);
         if (!actual_class_descriptor_sp)
             return ObjCLanguageRuntime::ClassDescriptorSP();

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ELFHeader.cpp Mon Jun  3 13:00:07 2013
@@ -305,7 +305,7 @@ ELFSymbol::Dump (lldb_private::Stream *s
                  const lldb_private::DataExtractor *strtab_data,
                  const lldb_private::SectionList *section_list)
 {
-    s->Printf("[%3u] 0x%16.16llx 0x%16.16llx 0x%8.8x 0x%2.2x (%-10s %-13s) 0x%2.2x 0x%4.4x (%-10s) %s\n",
+    s->Printf("[%3u] 0x%16.16" PRIx64 " 0x%16.16" PRIx64 " 0x%8.8x 0x%2.2x (%-10s %-13s) 0x%2.2x 0x%4.4x (%-10s) %s\n",
               idx,
               st_value,
               st_size,

Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Mon Jun  3 13:00:07 2013
@@ -1562,7 +1562,7 @@ ProcessMonitor::MonitorSignal(ProcessMon
     if (info->si_code == SI_TKILL || info->si_code == SI_USER)
     {
         if (log)
-            log->Printf ("ProcessMonitor::%s() received signal %s with code %s, pid = %" PRIu64,
+            log->Printf ("ProcessMonitor::%s() received signal %s with code %s, pid = %d",
                             __FUNCTION__,
                             monitor->m_process->GetUnixSignals().GetSignalAsCString (signo),
                             (info->si_code == SI_TKILL ? "SI_TKILL" : "SI_USER"),
@@ -1667,7 +1667,7 @@ ProcessMonitor::StopThread(lldb::tid_t t
 
         // Handle events from other threads
         if (log)
-            log->Printf ("ProcessMonitor::%s(bp) handling event, tid == %d", __FUNCTION__, wait_pid);
+            log->Printf ("ProcessMonitor::%s(bp) handling event, tid == %" PRIu64, __FUNCTION__, wait_pid);
 
         ProcessMessage message;
         if (info.si_signo == SIGTRAP)

Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Mon Jun  3 13:00:07 2013
@@ -118,7 +118,7 @@ Platform::FindPlugin (Process *process,
     {
         for (uint32_t idx = 0; (create_callback = PluginManager::GetPlatformCreateCallbackAtIndex(idx)) != NULL; ++idx)
         {
-            std::unique_ptr<Platform> instance_ap(create_callback(process, false));
+            std::unique_ptr<Platform> instance_ap(create_callback(process, nullptr));
             if (instance_ap.get())
                 return instance_ap.release();
         }

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=183140&r1=183139&r2=183140&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Mon Jun  3 13:00:07 2013
@@ -444,7 +444,7 @@ Thread::SetStopInfo (const lldb::StopInf
         m_stop_info_stop_id = UINT32_MAX;
     Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_THREAD));
     if (log)
-        log->Printf("%p: tid = 0x%llx: stop info = %s (stop_id = %u)\n", this, GetID(), stop_info_sp ? stop_info_sp->GetDescription() : "<NULL>", m_stop_info_stop_id);
+        log->Printf("%p: tid = 0x%" PRIx64 ": stop info = %s (stop_id = %u)\n", this, GetID(), stop_info_sp ? stop_info_sp->GetDescription() : "<NULL>", m_stop_info_stop_id);
 }
 
 void





More information about the lldb-commits mailing list