summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/include/lldb/API/SBSymbol.h14
-rw-r--r--lldb/scripts/Python/interface/SBSymbol.i15
-rw-r--r--lldb/source/API/SBSymbol.cpp17
3 files changed, 45 insertions, 1 deletions
diff --git a/lldb/include/lldb/API/SBSymbol.h b/lldb/include/lldb/API/SBSymbol.h
index 6315794fab3..ddfff277650 100644
--- a/lldb/include/lldb/API/SBSymbol.h
+++ b/lldb/include/lldb/API/SBSymbol.h
@@ -64,6 +64,20 @@ public:
bool
GetDescription (lldb::SBStream &description);
+ //----------------------------------------------------------------------
+ // Returns true if the symbol is externally visible in the module that
+ // it is defined in
+ //----------------------------------------------------------------------
+ bool
+ IsExternal();
+
+ //----------------------------------------------------------------------
+ // Returns true if the symbol was synthetically generated from something
+ // other than the actual symbol table itself in the object file.
+ //----------------------------------------------------------------------
+ bool
+ IsSynthetic();
+
protected:
lldb_private::Symbol *
diff --git a/lldb/scripts/Python/interface/SBSymbol.i b/lldb/scripts/Python/interface/SBSymbol.i
index 0b5342a53f6..4995c4f9c49 100644
--- a/lldb/scripts/Python/interface/SBSymbol.i
+++ b/lldb/scripts/Python/interface/SBSymbol.i
@@ -52,7 +52,13 @@ public:
bool
GetDescription (lldb::SBStream &description);
-
+
+ bool
+ IsExternal();
+
+ bool
+ IsSynthetic();
+
%pythoncode %{
def get_instructions_from_current_target (self):
return self.GetInstructions (target)
@@ -77,6 +83,13 @@ public:
__swig_getmethods__["instructions"] = get_instructions_from_current_target
if _newclass: x = property(get_instructions_from_current_target, None)
+
+ __swig_getmethods__["external"] = IsExternal
+ if _newclass: x = property(IsExternal, None)
+
+ __swig_getmethods__["synthetic"] = IsSynthetic
+ if _newclass: x = property(IsSynthetic, None)
+
%}
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index 4a89567f3bb..9b82f368acd 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -199,3 +199,20 @@ SBSymbol::GetType ()
return m_opaque_ptr->GetType();
return eSymbolTypeInvalid;
}
+
+bool
+SBSymbol::IsExternal()
+{
+ if (m_opaque_ptr)
+ return m_opaque_ptr->IsExternal();
+ return false;
+}
+
+bool
+SBSymbol::IsSynthetic()
+{
+ if (m_opaque_ptr)
+ return m_opaque_ptr->IsSynthetic();
+ return false;
+}
+
OpenPOWER on IntegriCloud