LLDB  mainline
SBSymbol.h
Go to the documentation of this file.
1 //===-- SBSymbol.h ----------------------------------------------*- 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 
9 #ifndef LLDB_SBSymbol_h_
10 #define LLDB_SBSymbol_h_
11 
12 #include "lldb/API/SBAddress.h"
13 #include "lldb/API/SBDefines.h"
15 #include "lldb/API/SBTarget.h"
16 
17 namespace lldb {
18 
20 public:
21  SBSymbol();
22 
23  ~SBSymbol();
24 
25  SBSymbol(const lldb::SBSymbol &rhs);
26 
27  const lldb::SBSymbol &operator=(const lldb::SBSymbol &rhs);
28 
29  explicit operator bool() const;
30 
31  bool IsValid() const;
32 
33  const char *GetName() const;
34 
35  const char *GetDisplayName() const;
36 
37  const char *GetMangledName() const;
38 
39  lldb::SBInstructionList GetInstructions(lldb::SBTarget target);
40 
41  lldb::SBInstructionList GetInstructions(lldb::SBTarget target,
42  const char *flavor_string);
43 
44  SBAddress GetStartAddress();
45 
46  SBAddress GetEndAddress();
47 
48  uint32_t GetPrologueByteSize();
49 
50  SymbolType GetType();
51 
52  bool operator==(const lldb::SBSymbol &rhs) const;
53 
54  bool operator!=(const lldb::SBSymbol &rhs) const;
55 
56  bool GetDescription(lldb::SBStream &description);
57 
58  // Returns true if the symbol is externally visible in the module that it is
59  // defined in
60  bool IsExternal();
61 
62  // Returns true if the symbol was synthetically generated from something
63  // other than the actual symbol table itself in the object file.
64  bool IsSynthetic();
65 
66 protected:
67  lldb_private::Symbol *get();
68 
69  void reset(lldb_private::Symbol *);
70 
71 private:
72  friend class SBAddress;
73  friend class SBFrame;
74  friend class SBModule;
75  friend class SBSymbolContext;
76 
77  SBSymbol(lldb_private::Symbol *lldb_object_ptr);
78 
79  void SetSymbol(lldb_private::Symbol *lldb_object_ptr);
80 
81  lldb_private::Symbol *m_opaque_ptr;
82 };
83 
84 } // namespace lldb
85 
86 #endif // LLDB_SBSymbol_h_
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition: SBAddress.cpp:66
class LLDB_API SBSymbol
Definition: SBDefines.h:69
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:979
#define LLDB_API
Definition: lldb-defines.h:23
Definition: SBAddress.h:15