From 521d32dd969bd799582877c8f5bbaf0a5e2e7c28 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Tue, 11 Sep 2012 06:35:15 +0000 Subject: [PATCH] Remove LLDB_DISABLE_PYTHON ifndef around FormatManager::LoadObjCFormatters() prototype, it is unconditionally present now. ObjectContainerBSDArchive::CreateInstance %z8.8x is not a valid printf arg specifier, %8.8zx would work for size_t arg but this arg is addr_t. use %8.8llx and cast up to uint64_t. ObjectFile::FindPlugin ditto. DynamicRegisterInfo::SetRegisterInfo ifdef this function out if LLDB_DISABLE_PYTHON. llvm-svn: 163599 --- lldb/include/lldb/Core/FormatManager.h | 2 -- .../BSD-Archive/ObjectContainerBSDArchive.cpp | 4 ++-- lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp | 5 +++++ lldb/source/Symbol/ObjectFile.cpp | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lldb/include/lldb/Core/FormatManager.h b/lldb/include/lldb/Core/FormatManager.h index 0ff0befea22e..faa64e18fc70 100644 --- a/lldb/include/lldb/Core/FormatManager.h +++ b/lldb/include/lldb/Core/FormatManager.h @@ -767,10 +767,8 @@ private: void LoadSystemFormatters(); -#ifndef LLDB_DISABLE_PYTHON void LoadObjCFormatters(); -#endif }; } // namespace lldb_private diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index db4e25146de9..f1c34bb0d009 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -273,10 +273,10 @@ ObjectContainerBSDArchive::CreateInstance if (file && data_sp && ObjectContainerBSDArchive::MagicBytesMatch(data)) { Timer scoped_timer (__PRETTY_FUNCTION__, - "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%z8.8x, file_size = 0x%z8.8x)", + "ObjectContainerBSDArchive::CreateInstance (module = %s/%s, file = %p, file_offset = 0x%8.8llx, file_size = 0x%8.8llx)", module_sp->GetFileSpec().GetDirectory().AsCString(), module_sp->GetFileSpec().GetFilename().AsCString(), - file, offset, length); + file, (uint64_t) offset, (uint64_t) length); Archive::shared_ptr archive_sp (Archive::FindCachedArchive (*file, module_sp->GetArchitecture(), module_sp->GetModificationTime())); diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp index ede2c5a3bbcd..c27c301c46b5 100644 --- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -14,7 +14,10 @@ // Other libraries and framework includes // Project includes #include "lldb/Interpreter/Args.h" + +#ifndef LLDB_DISABLE_PYTHON #include "lldb/Interpreter/PythonDataObjects.h" +#endif using namespace lldb; using namespace lldb_private; @@ -46,6 +49,7 @@ DynamicRegisterInfo::~DynamicRegisterInfo () size_t DynamicRegisterInfo::SetRegisterInfo (const lldb_private::PythonDataDictionary &dict) { +#ifndef LLDB_DISABLE_PYTHON PythonDataArray sets (dict.GetItemForKey("sets").GetArrayObject()); if (sets) { @@ -159,6 +163,7 @@ DynamicRegisterInfo::SetRegisterInfo (const lldb_private::PythonDataDictionary & } Finalize (); } +#endif return 0; } diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp index a26ddceb9a6b..b4418cb7c381 100644 --- a/lldb/source/Symbol/ObjectFile.cpp +++ b/lldb/source/Symbol/ObjectFile.cpp @@ -34,10 +34,10 @@ ObjectFile::FindPlugin (const lldb::ModuleSP &module_sp, const FileSpec* file, a if (module_sp) { Timer scoped_timer (__PRETTY_FUNCTION__, - "ObjectFile::FindPlugin (module = %s/%s, file = %p, file_offset = 0x%z8.8x, file_size = 0x%z8.8x)", + "ObjectFile::FindPlugin (module = %s/%s, file = %p, file_offset = 0x%8.8llx, file_size = 0x%8.8llx)", module_sp->GetFileSpec().GetDirectory().AsCString(), module_sp->GetFileSpec().GetFilename().AsCString(), - file, file_offset, file_size); + file, (uint64_t) file_offset, (uint64_t) file_size); if (file) { // Memory map the entire file contents