summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-06-20 20:13:04 +0000
committerPavel Labath <labath@google.com>2018-06-20 20:13:04 +0000
commitfbb142852c73bdba238e05ec32fa27e06cfdd868 (patch)
treedf6f85dc62e7e4209c76442a93d55d90d42ae5a5 /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
parent6021424c102621097302215b8be4b49d5abbda08 (diff)
downloadbcm5719-llvm-fbb142852c73bdba238e05ec32fa27e06cfdd868.tar.gz
bcm5719-llvm-fbb142852c73bdba238e05ec32fa27e06cfdd868.zip
Remove some instances of manual UUID pretty-printing
Identical functionality is already offered by the UUID::getAsString method. llvm-svn: 335163
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r--lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 6d114d9a892..c1e6809d1ff 100644
--- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -1403,30 +1403,12 @@ bool DynamicLoaderDarwinKernel::ReadAllKextSummaries() {
// Dump an image info structure to the file handle provided.
//----------------------------------------------------------------------
void DynamicLoaderDarwinKernel::KextImageInfo::PutToLog(Log *log) const {
- if (log == NULL)
- return;
- const uint8_t *u = static_cast<const uint8_t *>(m_uuid.GetBytes());
-
if (m_load_address == LLDB_INVALID_ADDRESS) {
- if (u) {
- log->Printf("\tuuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2."
- "2X-%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\" (UNLOADED)",
- u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], u[9],
- u[10], u[11], u[12], u[13], u[14], u[15], m_name.c_str());
- } else
- log->Printf("\tname=\"%s\" (UNLOADED)", m_name.c_str());
+ LLDB_LOG(log, "uuid={0} name=\"{1}\" (UNLOADED)", m_uuid.GetAsString(),
+ m_name);
} else {
- if (u) {
- log->Printf("\taddr=0x%16.16" PRIx64 " size=0x%16.16" PRIx64
- " uuid=%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-"
- "%2.2X%2.2X%2.2X%2.2X%2.2X%2.2X name=\"%s\"",
- m_load_address, m_size, u[0], u[1], u[2], u[3], u[4], u[5],
- u[6], u[7], u[8], u[9], u[10], u[11], u[12], u[13], u[14],
- u[15], m_name.c_str());
- } else {
- log->Printf("\t[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ") name=\"%s\"",
- m_load_address, m_load_address + m_size, m_name.c_str());
- }
+ LLDB_LOG(log, "addr={0:x+16} size={1:x+16} uuid={2} name=\"{3}\"",
+ m_load_address, m_size, m_uuid.GetAsString(), m_name);
}
}
OpenPOWER on IntegriCloud