summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Block.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-04-29 17:25:54 +0000
committerGreg Clayton <gclayton@apple.com>2013-04-29 17:25:54 +0000
commitb5ad4ec7a31206227b1cd657dd41b21cc6afc98e (patch)
tree68f35ccdff9e1410bca21aeb2e216fa91d45a19f /lldb/source/Symbol/Block.cpp
parentf1f1c626e7fcd3db60641be223308390de288a41 (diff)
downloadbcm5719-llvm-b5ad4ec7a31206227b1cd657dd41b21cc6afc98e.tar.gz
bcm5719-llvm-b5ad4ec7a31206227b1cd657dd41b21cc6afc98e.zip
Cleanup logging to use the new "std::string FileSpec::GetPath()" function. Also added a similar function for modules:
std::string Module::GetSpecificationDescription () const; This returns the module as "/usr/lib/libfoo.dylib" for normal files (calls "std::string FileSpec::GetPath()" on m_file) but it also might include the object name in case the module is for a .o file in a BSD archive ("/usr/lib/libfoo.a(bar.o)"). Cleaned up necessary logging code to use it. llvm-svn: 180717
Diffstat (limited to 'lldb/source/Symbol/Block.cpp')
-rw-r--r--lldb/source/Symbol/Block.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp
index f410bd62de3..4ab86e54bf6 100644
--- a/lldb/source/Symbol/Block.cpp
+++ b/lldb/source/Symbol/Block.cpp
@@ -408,9 +408,8 @@ Block::AddRange (const Range& range)
const Declaration &func_decl = func_type->GetDeclaration();
if (func_decl.GetLine())
{
- log->Printf ("warning: %s/%s:%u block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64 ") which is not contained in parent block {0x%8.8" PRIx64 "} in function {0x%8.8" PRIx64 "} from %s/%s",
- func_decl.GetFile().GetDirectory().GetCString(),
- func_decl.GetFile().GetFilename().GetCString(),
+ log->Printf ("warning: %s:%u block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64 ") which is not contained in parent block {0x%8.8" PRIx64 "} in function {0x%8.8" PRIx64 "} from %s",
+ func_decl.GetFile().GetPath().c_str(),
func_decl.GetLine(),
GetID(),
(uint32_t)m_ranges.GetSize(),
@@ -418,20 +417,18 @@ Block::AddRange (const Range& range)
block_end_addr,
parent_block->GetID(),
function->GetID(),
- module_sp->GetFileSpec().GetDirectory().GetCString(),
- module_sp->GetFileSpec().GetFilename().GetCString());
+ module_sp->GetFileSpec().GetPath().c_str());
}
else
{
- log->Printf ("warning: block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64 ") which is not contained in parent block {0x%8.8" PRIx64 "} in function {0x%8.8" PRIx64 "} from %s/%s",
+ log->Printf ("warning: block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64 ") which is not contained in parent block {0x%8.8" PRIx64 "} in function {0x%8.8" PRIx64 "} from %s",
GetID(),
(uint32_t)m_ranges.GetSize(),
block_start_addr,
block_end_addr,
parent_block->GetID(),
function->GetID(),
- module_sp->GetFileSpec().GetDirectory().GetCString(),
- module_sp->GetFileSpec().GetFilename().GetCString());
+ module_sp->GetFileSpec().GetPath().c_str());
}
}
parent_block->AddRange (range);
OpenPOWER on IntegriCloud