Added symbol table access through the module for now. We might need to expose
a SBSymtab class, but for now, we expose the symbols through the module.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121112 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 7120e59..0a5c8aa 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -181,3 +181,36 @@
 
     return true;
 }
+
+size_t
+SBModule::GetNumSymbols ()
+{
+    if (m_opaque_sp)
+    {
+        ObjectFile *obj_file = m_opaque_sp->GetObjectFile();
+        if (obj_file)
+        {
+            Symtab *symtab = obj_file->GetSymtab();
+            if (symtab)
+                return symtab->GetNumSymbols();
+        }
+    }
+    return 0;
+}
+
+SBSymbol
+SBModule::GetSymbolAtIndex (size_t idx)
+{
+    SBSymbol sb_symbol;
+    if (m_opaque_sp)
+    {
+        ObjectFile *obj_file = m_opaque_sp->GetObjectFile();
+        if (obj_file)
+        {
+            Symtab *symtab = obj_file->GetSymtab();
+            if (symtab)
+                sb_symbol.SetSymbol(symtab->SymbolAtIndex (idx));
+        }
+    }
+    return sb_symbol;
+}