Hooked up ability to look up data symbols so they show up in disassembly
if the address comes from a data section.
Fixed an issue that could occur when looking up a symbol that has a zero
byte size where no match would be returned even if there was an exact symbol
match.
Cleaned up the section dump output and added the section type into the output.
llvm-svn: 116017
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp
index f4e8800..3dae577 100644
--- a/lldb/source/Core/Section.cpp
+++ b/lldb/source/Core/Section.cpp
@@ -222,11 +222,11 @@
void
-Section::Dump(Stream *s, Target *target) const
+Section::Dump (Stream *s, Target *target) const
{
- s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
+// s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
s->Indent();
- s->Printf("0x%8.8x ", GetID());
+ s->Printf("0x%8.8x %-14s ", GetID(), GetSectionTypeAsCString (m_type));
bool resolved = true;
addr_t addr = LLDB_INVALID_ADDRESS;
@@ -672,16 +672,16 @@
{
if (show_header && !m_sections.empty())
{
- s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
+// s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
+// s->Indent();
+// s->PutCString( "SectionList\n");
+// s->IndentMore();
+// s->Printf("%*s", 2*(sizeof(void *) + 2), "");
s->Indent();
- s->PutCString( "SectionList\n");
- s->IndentMore();
- s->Printf("%*s", 2*(sizeof(void *) + 2), "");
+ s->Printf("SectID Type %s Address File Off. File Size Flags Section Name\n", (target && target->GetSectionLoadList().IsEmpty() == false) ? "Load" : "File");
+// s->Printf("%*s", 2*(sizeof(void *) + 2), "");
s->Indent();
- s->Printf("SectID %s Address File Off. File Size Flags Section Name\n", (target && target->GetSectionLoadList().IsEmpty() == false) ? "Load" : "File");
- s->Printf("%*s", 2*(sizeof(void *) + 2), "");
- s->Indent();
- s->PutCString("---------- --------------------------------------- ---------- ---------- ---------- ----------------------------\n");
+ s->PutCString("---------- -------------- --------------------------------------- ---------- ---------- ---------- ----------------------------\n");
}