Add TestSymbolAPI.py to test the newly added SBSymbol and SBAddress APIs:
lldb::SymbolType SBSymbol::GetType();
lldb::SectionType SBAddress::GetSectionType ();
lldb::SBModule SBAddress::GetModule ();
Also add an lldb::SBModule::GetUUIDString() API which is easier for Python
to work with in the test script.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128695 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 0a5c8aa..e7e95be 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -95,6 +95,31 @@
}
+const char *
+SBModule::GetUUIDString () const
+{
+ LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ static char uuid_string[80];
+ const char * uuid_c_string = NULL;
+ if (m_opaque_sp)
+ uuid_c_string = (const char *)m_opaque_sp->GetUUID().GetAsCString(uuid_string, sizeof(uuid_string));
+
+ if (log)
+ {
+ if (uuid_c_string)
+ {
+ StreamString s;
+ m_opaque_sp->GetUUID().Dump (&s);
+ log->Printf ("SBModule(%p)::GetUUIDString () => %s", m_opaque_sp.get(), s.GetData());
+ }
+ else
+ log->Printf ("SBModule(%p)::GetUUIDString () => NULL", m_opaque_sp.get());
+ }
+ return uuid_c_string;
+}
+
+
bool
SBModule::operator == (const SBModule &rhs) const
{