SBSymbol.h revision 7d4083837c5a258375fdc185d464b4ed15759a4b
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    lldb::SBInstructionList
47    GetInstructions (lldb::SBTarget target, const char *flavor_string);
48
49    SBAddress
50    GetStartAddress ();
51
52    SBAddress
53    GetEndAddress ();
54
55    uint32_t
56    GetPrologueByteSize ();
57
58    SymbolType
59    GetType ();
60
61    bool
62    operator == (const lldb::SBSymbol &rhs) const;
63
64    bool
65    operator != (const lldb::SBSymbol &rhs) const;
66
67    bool
68    GetDescription (lldb::SBStream &description);
69
70    //----------------------------------------------------------------------
71    // Returns true if the symbol is externally visible in the module that
72    // it is defined in
73    //----------------------------------------------------------------------
74    bool
75    IsExternal();
76
77    //----------------------------------------------------------------------
78    // Returns true if the symbol was synthetically generated from something
79    // other than the actual symbol table itself in the object file.
80    //----------------------------------------------------------------------
81    bool
82    IsSynthetic();
83
84protected:
85
86    lldb_private::Symbol *
87    get ();
88
89    void
90    reset (lldb_private::Symbol *);
91
92private:
93    friend class SBAddress;
94    friend class SBFrame;
95    friend class SBModule;
96    friend class SBSymbolContext;
97
98    SBSymbol (lldb_private::Symbol *lldb_object_ptr);
99
100    void
101    SetSymbol (lldb_private::Symbol *lldb_object_ptr);
102
103    lldb_private::Symbol *m_opaque_ptr;
104};
105
106
107} // namespace lldb
108
109#endif // LLDB_SBSymbol_h_
110