Added some functions to our API related to classifying symbols as code, data,
const data, etc, and also for SBAddress objects to classify their type of
section they are in and also getting the module for a section offset address.

    lldb::SymbolType SBSymbol::GetType();
    
    lldb::SectionType SBAddress::GetSectionType ();
    lldb::SBModule SBAddress::GetModule ();




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128602 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBAddress.cpp b/source/API/SBAddress.cpp
index 61ad71b..6c357f9 100644
--- a/source/API/SBAddress.cpp
+++ b/source/API/SBAddress.cpp
@@ -12,6 +12,7 @@
 #include "lldb/API/SBStream.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Core/Log.h"
+#include "lldb/Core/Module.h"
 #include "lldb/Host/Mutex.h"
 #include "lldb/Target/Target.h"
 
@@ -170,3 +171,31 @@
 
     return true;
 }
+
+SectionType
+SBAddress::GetSectionType ()
+{
+    if (m_opaque_ap.get())
+    {
+        const Section *section = m_opaque_ap->GetSection();
+        if (section)
+            return section->GetType();
+    }
+    return eSectionTypeInvalid;
+}
+
+
+SBModule
+SBAddress::GetModule ()
+{
+    SBModule sb_module;
+    if (m_opaque_ap.get())
+    {
+        const Module *module = m_opaque_ap->GetModule();
+        if (module)
+            *sb_module = module->GetSP();
+    }
+    return sb_module;
+}
+
+