Cleaned up the output of "image lookup --address <ADDR>" which involved
cleaning up the output of many GetDescription objects that are part of a
symbol context. This fixes an issue where no ranges were being printed out
for functions, blocks and symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113571 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/Block.cpp b/source/Symbol/Block.cpp
index a1de78a..a6e7f8f 100644
--- a/source/Symbol/Block.cpp
+++ b/source/Symbol/Block.cpp
@@ -38,6 +38,8 @@
void
Block::GetDescription(Stream *s, Function *function, lldb::DescriptionLevel level, Process *process) const
{
+ *s << "id = " << ((const UserID&)*this);
+
size_t num_ranges = m_ranges.size();
if (num_ranges)
{
@@ -48,12 +50,11 @@
if (base_addr == LLDB_INVALID_ADDRESS)
base_addr = function->GetAddressRange().GetBaseAddress().GetFileAddress();
- s->Printf("range%s = ", num_ranges > 1 ? "s" : "");
+ s->Printf(", range%s = ", num_ranges > 1 ? "s" : "");
std::vector<VMRange>::const_iterator pos, end = m_ranges.end();
for (pos = m_ranges.begin(); pos != end; ++pos)
pos->Dump(s, base_addr, 4);
}
- *s << ", id = " << ((const UserID&)*this);
if (m_inlineInfoSP.get() != NULL)
m_inlineInfoSP->Dump(s);