summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp49
1 files changed, 24 insertions, 25 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index cc2b3ae845b..c1b57090534 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -235,11 +235,11 @@ bool ObjectFilePECOFF::CreateBinary() {
auto binary = llvm::object::createBinary(m_file.GetPath());
if (!binary) {
- if (log)
- log->Printf("ObjectFilePECOFF::CreateBinary() - failed to create binary "
- "for file (%s): %s",
- m_file ? m_file.GetPath().c_str() : "<NULL>",
- errorToErrorCode(binary.takeError()).message().c_str());
+ LLDB_LOGF(log,
+ "ObjectFilePECOFF::CreateBinary() - failed to create binary "
+ "for file (%s): %s",
+ m_file ? m_file.GetPath().c_str() : "<NULL>",
+ errorToErrorCode(binary.takeError()).message().c_str());
return false;
}
@@ -249,15 +249,14 @@ bool ObjectFilePECOFF::CreateBinary() {
return false;
m_owningbin = OWNBINType(std::move(*binary));
- if (log)
- log->Printf("%p ObjectFilePECOFF::CreateBinary() module = %p (%s), file = "
- "%s, binary = %p (Bin = %p)",
- static_cast<void *>(this),
- static_cast<void *>(GetModule().get()),
- GetModule()->GetSpecificationDescription().c_str(),
- m_file ? m_file.GetPath().c_str() : "<NULL>",
- static_cast<void *>(m_owningbin.getPointer()),
- static_cast<void *>(m_owningbin->getBinary()));
+ LLDB_LOGF(log,
+ "%p ObjectFilePECOFF::CreateBinary() module = %p (%s), file = "
+ "%s, binary = %p (Bin = %p)",
+ static_cast<void *>(this), static_cast<void *>(GetModule().get()),
+ GetModule()->GetSpecificationDescription().c_str(),
+ m_file ? m_file.GetPath().c_str() : "<NULL>",
+ static_cast<void *>(m_owningbin.getPointer()),
+ static_cast<void *>(m_owningbin->getBinary()));
return true;
}
@@ -911,13 +910,13 @@ uint32_t ObjectFilePECOFF::ParseDependentModules() {
return 0;
Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
- if (log)
- log->Printf("%p ObjectFilePECOFF::ParseDependentModules() module = %p "
- "(%s), binary = %p (Bin = %p)",
- static_cast<void *>(this), static_cast<void *>(module_sp.get()),
- module_sp->GetSpecificationDescription().c_str(),
- static_cast<void *>(m_owningbin.getPointer()),
- static_cast<void *>(m_owningbin->getBinary()));
+ LLDB_LOGF(log,
+ "%p ObjectFilePECOFF::ParseDependentModules() module = %p "
+ "(%s), binary = %p (Bin = %p)",
+ static_cast<void *>(this), static_cast<void *>(module_sp.get()),
+ module_sp->GetSpecificationDescription().c_str(),
+ static_cast<void *>(m_owningbin.getPointer()),
+ static_cast<void *>(m_owningbin->getBinary()));
auto COFFObj =
llvm::dyn_cast<llvm::object::COFFObjectFile>(m_owningbin->getBinary());
@@ -931,10 +930,10 @@ uint32_t ObjectFilePECOFF::ParseDependentModules() {
auto ec = entry.getName(dll_name);
// Report a bogus entry.
if (ec != std::error_code()) {
- if (log)
- log->Printf("ObjectFilePECOFF::ParseDependentModules() - failed to get "
- "import directory entry name: %s",
- ec.message().c_str());
+ LLDB_LOGF(log,
+ "ObjectFilePECOFF::ParseDependentModules() - failed to get "
+ "import directory entry name: %s",
+ ec.message().c_str());
continue;
}
OpenPOWER on IntegriCloud