diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-04-02 20:08:08 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-04-02 20:08:08 +0000 |
| commit | 74ae3f5a4569a94beeef1a86a01868346d2f58aa (patch) | |
| tree | 726a4a230ba96adaa74c114a3b8957680afdec41 /lldb | |
| parent | aaafacd07ed17080f399a2613702f48b8fad1bb8 (diff) | |
| download | bcm5719-llvm-74ae3f5a4569a94beeef1a86a01868346d2f58aa.tar.gz bcm5719-llvm-74ae3f5a4569a94beeef1a86a01868346d2f58aa.zip | |
Export the ability to see if a symbol is externally visible and also if the symbol was synthetically added to the symbol table (the symbol was not part of the symbol table itself but came from another section).
llvm-svn: 153893
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/include/lldb/API/SBSymbol.h | 14 | ||||
| -rw-r--r-- | lldb/scripts/Python/interface/SBSymbol.i | 15 | ||||
| -rw-r--r-- | lldb/source/API/SBSymbol.cpp | 17 |
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; +} + |

