1//===-- SWIG Interface for SBSymbol -----------------------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9namespace lldb { 10 11%feature("docstring", 12"Represents the symbol possibly associated with a stack frame. 13SBModule contains SBSymbol(s). SBSymbol can also be retrieved from SBFrame. 14 15See also SBModule and SBFrame." 16) SBSymbol; 17class SBSymbol 18{ 19public: 20 21 SBSymbol (); 22 23 ~SBSymbol (); 24 25 SBSymbol (const lldb::SBSymbol &rhs); 26 27 bool 28 IsValid () const; 29 30 explicit operator bool() const; 31 32 33 const char * 34 GetName() const; 35 36 const char * 37 GetDisplayName() const; 38 39 const char * 40 GetMangledName () const; 41 42 lldb::SBInstructionList 43 GetInstructions (lldb::SBTarget target); 44 45 lldb::SBInstructionList 46 GetInstructions (lldb::SBTarget target, const char *flavor_string); 47 48 SBAddress 49 GetStartAddress (); 50 51 SBAddress 52 GetEndAddress (); 53 54 uint32_t 55 GetPrologueByteSize (); 56 57 SymbolType 58 GetType (); 59 60 bool 61 GetDescription (lldb::SBStream &description); 62 63 bool 64 IsExternal(); 65 66 bool 67 IsSynthetic(); 68 69 bool 70 operator == (const lldb::SBSymbol &rhs) const; 71 72 bool 73 operator != (const lldb::SBSymbol &rhs) const; 74 75 STRING_EXTENSION(SBSymbol) 76 77#ifdef SWIGPYTHON 78 %pythoncode %{ 79 def get_instructions_from_current_target (self): 80 return self.GetInstructions (target) 81 82 name = property(GetName, None, doc='''A read only property that returns the name for this symbol as a string.''') 83 mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this symbol as a string.''') 84 type = property(GetType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSymbolType") that represents the type of this symbol.''') 85 addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this symbol.''') 86 end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this symbol.''') 87 prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''') 88 instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this symbol.''') 89 external = property(IsExternal, None, doc='''A read only property that returns a boolean value that indicates if this symbol is externally visiable (exported) from the module that contains it.''') 90 synthetic = property(IsSynthetic, None, doc='''A read only property that returns a boolean value that indicates if this symbol was synthetically created from information in module that contains it.''') 91 %} 92#endif 93 94}; 95 96} // namespace lldb 97