1061da546Spatrick //===-- SWIG Interface for SBSymbol -----------------------------*- C++ -*-===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick 
9061da546Spatrick namespace lldb {
10061da546Spatrick 
11061da546Spatrick %feature("docstring",
12061da546Spatrick "Represents the symbol possibly associated with a stack frame.
13be691f3bSpatrick :py:class:`SBModule` contains SBSymbol(s). SBSymbol can also be retrieved from :py:class:`SBFrame` ."
14061da546Spatrick ) SBSymbol;
15061da546Spatrick class SBSymbol
16061da546Spatrick {
17061da546Spatrick public:
18061da546Spatrick 
19061da546Spatrick     SBSymbol ();
20061da546Spatrick 
21061da546Spatrick     ~SBSymbol ();
22061da546Spatrick 
23061da546Spatrick     SBSymbol (const lldb::SBSymbol &rhs);
24061da546Spatrick 
25061da546Spatrick     bool
26061da546Spatrick     IsValid () const;
27061da546Spatrick 
28061da546Spatrick     explicit operator bool() const;
29061da546Spatrick 
30061da546Spatrick 
31061da546Spatrick     const char *
32061da546Spatrick     GetName() const;
33061da546Spatrick 
34061da546Spatrick     const char *
35061da546Spatrick     GetDisplayName() const;
36061da546Spatrick 
37061da546Spatrick     const char *
38061da546Spatrick     GetMangledName () const;
39061da546Spatrick 
40061da546Spatrick     lldb::SBInstructionList
41061da546Spatrick     GetInstructions (lldb::SBTarget target);
42061da546Spatrick 
43061da546Spatrick     lldb::SBInstructionList
44061da546Spatrick     GetInstructions (lldb::SBTarget target, const char *flavor_string);
45061da546Spatrick 
46061da546Spatrick     SBAddress
47061da546Spatrick     GetStartAddress ();
48061da546Spatrick 
49061da546Spatrick     SBAddress
50061da546Spatrick     GetEndAddress ();
51061da546Spatrick 
52*f6aab3d8Srobert     uint64_t GetValue();
53*f6aab3d8Srobert 
54*f6aab3d8Srobert     uint64_t GetSize();
55*f6aab3d8Srobert 
56061da546Spatrick     uint32_t
57061da546Spatrick     GetPrologueByteSize ();
58061da546Spatrick 
59061da546Spatrick     SymbolType
60061da546Spatrick     GetType ();
61061da546Spatrick 
62061da546Spatrick     bool
63061da546Spatrick     GetDescription (lldb::SBStream &description);
64061da546Spatrick 
65061da546Spatrick     bool
66061da546Spatrick     IsExternal();
67061da546Spatrick 
68061da546Spatrick     bool
69061da546Spatrick     IsSynthetic();
70061da546Spatrick 
71061da546Spatrick     bool
72061da546Spatrick     operator == (const lldb::SBSymbol &rhs) const;
73061da546Spatrick 
74061da546Spatrick     bool
75061da546Spatrick     operator != (const lldb::SBSymbol &rhs) const;
76061da546Spatrick 
77061da546Spatrick     STRING_EXTENSION(SBSymbol)
78061da546Spatrick 
79061da546Spatrick #ifdef SWIGPYTHON
80061da546Spatrick     %pythoncode %{
81061da546Spatrick         def get_instructions_from_current_target (self):
82061da546Spatrick             return self.GetInstructions (target)
83061da546Spatrick 
84061da546Spatrick         name = property(GetName, None, doc='''A read only property that returns the name for this symbol as a string.''')
85061da546Spatrick         mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this symbol as a string.''')
86061da546Spatrick         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.''')
87061da546Spatrick         addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this symbol.''')
88061da546Spatrick         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.''')
89061da546Spatrick         prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
90061da546Spatrick         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.''')
91061da546Spatrick         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.''')
92061da546Spatrick         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.''')
93061da546Spatrick     %}
94061da546Spatrick #endif
95061da546Spatrick 
96061da546Spatrick };
97061da546Spatrick 
98061da546Spatrick } // namespace lldb
99