|
|
|||
File indexing completed on 2026-05-10 08:42:42
0001 //===-- SBSymbol.h ----------------------------------------------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLDB_API_SBSYMBOL_H 0010 #define LLDB_API_SBSYMBOL_H 0011 0012 #include "lldb/API/SBAddress.h" 0013 #include "lldb/API/SBDefines.h" 0014 #include "lldb/API/SBInstructionList.h" 0015 #include "lldb/API/SBTarget.h" 0016 0017 namespace lldb { 0018 0019 class LLDB_API SBSymbol { 0020 public: 0021 SBSymbol(); 0022 0023 ~SBSymbol(); 0024 0025 SBSymbol(const lldb::SBSymbol &rhs); 0026 0027 const lldb::SBSymbol &operator=(const lldb::SBSymbol &rhs); 0028 0029 explicit operator bool() const; 0030 0031 bool IsValid() const; 0032 0033 const char *GetName() const; 0034 0035 const char *GetDisplayName() const; 0036 0037 const char *GetMangledName() const; 0038 0039 lldb::SBInstructionList GetInstructions(lldb::SBTarget target); 0040 0041 lldb::SBInstructionList GetInstructions(lldb::SBTarget target, 0042 const char *flavor_string); 0043 0044 /// Get the start address of this symbol 0045 /// 0046 /// \returns 0047 /// If the symbol's value is not an address, an invalid SBAddress object 0048 /// will be returned. If the symbol's value is an address, a valid SBAddress 0049 /// object will be returned. 0050 SBAddress GetStartAddress(); 0051 0052 /// Get the end address of this symbol 0053 /// 0054 /// \returns 0055 /// If the symbol's value is not an address, an invalid SBAddress object 0056 /// will be returned. If the symbol's value is an address, a valid SBAddress 0057 /// object will be returned. 0058 SBAddress GetEndAddress(); 0059 0060 /// Get the raw value of a symbol. 0061 /// 0062 /// This accessor allows direct access to the symbol's value from the symbol 0063 /// table regardless of what the value is. The value can be a file address or 0064 /// it can be an integer value that depends on what the symbol's type is. Some 0065 /// symbol values are not addresses, but absolute values or integer values 0066 /// that can be mean different things. The GetStartAddress() accessor will 0067 /// only return a valid SBAddress if the symbol's value is an address, so this 0068 /// accessor provides a way to access the symbol's value when the value is 0069 /// not an address. 0070 /// 0071 /// \returns 0072 /// Returns the raw integer value of a symbol from the symbol table. 0073 uint64_t GetValue(); 0074 0075 /// Get the size of the symbol. 0076 /// 0077 /// This accessor allows direct access to the symbol's size from the symbol 0078 /// table regardless of what the value is (address or integer value). 0079 /// 0080 /// \returns 0081 /// Returns the size of a symbol from the symbol table. 0082 uint64_t GetSize(); 0083 0084 uint32_t GetPrologueByteSize(); 0085 0086 SymbolType GetType(); 0087 0088 bool operator==(const lldb::SBSymbol &rhs) const; 0089 0090 bool operator!=(const lldb::SBSymbol &rhs) const; 0091 0092 bool GetDescription(lldb::SBStream &description); 0093 0094 // Returns true if the symbol is externally visible in the module that it is 0095 // defined in 0096 bool IsExternal(); 0097 0098 // Returns true if the symbol was synthetically generated from something 0099 // other than the actual symbol table itself in the object file. 0100 bool IsSynthetic(); 0101 0102 protected: 0103 lldb_private::Symbol *get(); 0104 0105 void reset(lldb_private::Symbol *); 0106 0107 private: 0108 friend class SBAddress; 0109 friend class SBFrame; 0110 friend class SBModule; 0111 friend class SBSymbolContext; 0112 0113 SBSymbol(lldb_private::Symbol *lldb_object_ptr); 0114 0115 void SetSymbol(lldb_private::Symbol *lldb_object_ptr); 0116 0117 lldb_private::Symbol *m_opaque_ptr = nullptr; 0118 }; 0119 0120 } // namespace lldb 0121 0122 #endif // LLDB_API_SBSYMBOL_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|