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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116017 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/lldb.cpp b/source/lldb.cpp
index fdc649b..0f85c57 100644
--- a/source/lldb.cpp
+++ b/source/lldb.cpp
@@ -156,3 +156,42 @@
     return "invalid";
 }
 
+
+const char *
+lldb_private::GetSectionTypeAsCString (lldb::SectionType sect_type)
+{
+    switch (sect_type)
+    {
+    case eSectionTypeInvalid: return "invalid";
+    case eSectionTypeCode: return "code";
+    case eSectionTypeContainer: return "container";
+    case eSectionTypeData: return "data";
+    case eSectionTypeDataCString: return "data-cstr";
+    case eSectionTypeDataCStringPointers: return "data-cstr-ptr";
+    case eSectionTypeDataSymbolAddress: return "data-symbol-addr";
+    case eSectionTypeData4: return "data-4-byte";
+    case eSectionTypeData8: return "data-8-byte";
+    case eSectionTypeData16: return "data-16-byte";
+    case eSectionTypeDataPointers: return "data-ptrs";
+    case eSectionTypeDebug: return "debug";
+    case eSectionTypeZeroFill: return "zero-fill";
+    case eSectionTypeDataObjCMessageRefs: return "objc-message-refs";
+    case eSectionTypeDataObjCCFStrings: return "objc-cfstrings";
+    case eSectionTypeDWARFDebugAbbrev: return "dwarf-abbrev";
+    case eSectionTypeDWARFDebugAranges: return "dwarf-aranges";
+    case eSectionTypeDWARFDebugFrame: return "dwarf-frame";
+    case eSectionTypeDWARFDebugInfo: return "dwarf-info";
+    case eSectionTypeDWARFDebugLine: return "dwarf-line";
+    case eSectionTypeDWARFDebugLoc: return "dwarf-loc";
+    case eSectionTypeDWARFDebugMacInfo: return "dwarf-macinfo";
+    case eSectionTypeDWARFDebugPubNames: return "dwarf-pubnames";
+    case eSectionTypeDWARFDebugPubTypes: return "dwarf-pubtypes";
+    case eSectionTypeDWARFDebugRanges: return "dwarf-ranges";
+    case eSectionTypeDWARFDebugStr: return "dwarf-str";
+    case eSectionTypeEHFrame: return "eh-frame";
+    case eSectionTypeOther: return "regular";
+    }
+    return "unknown";
+
+}
+