SBSymbol.h revision 3be42fb4ff54e71afe0b9aac83b7fa3068a3d873
1//===-- SBSymbol.h ----------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef LLDB_SBSymbol_h_ 11#define LLDB_SBSymbol_h_ 12 13#include "lldb/API/SBDefines.h" 14#include "lldb/API/SBAddress.h" 15#include "lldb/API/SBInstructionList.h" 16#include "lldb/API/SBTarget.h" 17 18namespace lldb { 19 20class SBSymbol 21{ 22public: 23 24 SBSymbol (); 25 26 ~SBSymbol (); 27 28 SBSymbol (const lldb::SBSymbol &rhs); 29 30 const lldb::SBSymbol & 31 operator = (const lldb::SBSymbol &rhs); 32 33 bool 34 IsValid () const; 35 36 37 const char * 38 GetName() const; 39 40 const char * 41 GetMangledName () const; 42 43 lldb::SBInstructionList 44 GetInstructions (lldb::SBTarget target); 45 46 SBAddress 47 GetStartAddress (); 48 49 SBAddress 50 GetEndAddress (); 51 52 uint32_t 53 GetPrologueByteSize (); 54 55 SymbolType 56 GetType (); 57 58 bool 59 operator == (const lldb::SBSymbol &rhs) const; 60 61 bool 62 operator != (const lldb::SBSymbol &rhs) const; 63 64 bool 65 GetDescription (lldb::SBStream &description); 66 67 //---------------------------------------------------------------------- 68 // Returns true if the symbol is externally visible in the module that 69 // it is defined in 70 //---------------------------------------------------------------------- 71 bool 72 IsExternal(); 73 74 //---------------------------------------------------------------------- 75 // Returns true if the symbol was synthetically generated from something 76 // other than the actual symbol table itself in the object file. 77 //---------------------------------------------------------------------- 78 bool 79 IsSynthetic(); 80 81protected: 82 83 lldb_private::Symbol * 84 get (); 85 86 void 87 reset (lldb_private::Symbol *); 88 89private: 90 friend class SBAddress; 91 friend class SBFrame; 92 friend class SBModule; 93 friend class SBSymbolContext; 94 95 SBSymbol (lldb_private::Symbol *lldb_object_ptr); 96 97 void 98 SetSymbol (lldb_private::Symbol *lldb_object_ptr); 99 100 lldb_private::Symbol *m_opaque_ptr; 101}; 102 103 104} // namespace lldb 105 106#endif // LLDB_SBSymbol_h_ 107