blob: eb17a095ac53fd836356dee7395d66fd4667127b [file] [log] [blame]
Johnny Chenc3fba812011-07-18 20:13:38 +00001//===-- SWIG Interface for SBFrame ------------------------------*- 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
10namespace lldb {
11
12%feature("docstring",
13"Represents one of the stack frames associated with a thread.
14SBThread contains SBFrame(s)."
15) SBFrame;
16class SBFrame
17{
18public:
19 SBFrame ();
20
21 SBFrame (const lldb::SBFrame &rhs);
22
23 ~SBFrame();
24
25 bool
26 IsValid() const;
27
28 uint32_t
29 GetFrameID () const;
30
31 lldb::addr_t
32 GetPC () const;
33
34 bool
35 SetPC (lldb::addr_t new_pc);
36
37 lldb::addr_t
38 GetSP () const;
39
40 lldb::addr_t
41 GetFP () const;
42
43 lldb::SBAddress
44 GetPCAddress () const;
45
46 lldb::SBSymbolContext
47 GetSymbolContext (uint32_t resolve_scope) const;
48
49 lldb::SBModule
50 GetModule () const;
51
52 lldb::SBCompileUnit
53 GetCompileUnit () const;
54
55 lldb::SBFunction
56 GetFunction () const;
57
58 lldb::SBSymbol
59 GetSymbol () const;
60
61 %feature("docstring", "
62 /// Gets the deepest block that contains the frame PC.
63 ///
64 /// See also GetFrameBlock().
65 ") GetBlock;
66 lldb::SBBlock
67 GetBlock () const;
68
69 %feature("docstring", "
70 /// Get the appropriate function name for this frame. Inlined functions in
71 /// LLDB are represented by Blocks that have inlined function information, so
72 /// just looking at the SBFunction or SBSymbol for a frame isn't enough.
73 /// This function will return the appriopriate function, symbol or inlined
74 /// function name for the frame.
75 ///
76 /// This function returns:
77 /// - the name of the inlined function (if there is one)
78 /// - the name of the concrete function (if there is one)
79 /// - the name of the symbol (if there is one)
80 /// - NULL
81 ///
82 /// See also IsInlined().
83 ") GetFunctionName;
84 const char *
85 GetFunctionName();
86
87 %feature("docstring", "
88 /// Return true if this frame represents an inlined function.
89 ///
90 /// See also GetFunctionName().
91 ") IsInlined;
92 bool
93 IsInlined();
94
95 %feature("docstring", "
96 /// The version that doesn't supply a 'use_dynamic' value will use the
97 /// target's default.
98 ") EvaluateExpression;
99 lldb::SBValue
100 EvaluateExpression (const char *expr);
101
102 lldb::SBValue
103 EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic);
104
105 %feature("docstring", "
106 /// Gets the lexical block that defines the stack frame. Another way to think
107 /// of this is it will return the block that contains all of the variables
108 /// for a stack frame. Inlined functions are represented as SBBlock objects
109 /// that have inlined function information: the name of the inlined function,
110 /// where it was called from. The block that is returned will be the first
111 /// block at or above the block for the PC (SBFrame::GetBlock()) that defines
112 /// the scope of the frame. When a function contains no inlined functions,
113 /// this will be the top most lexical block that defines the function.
114 /// When a function has inlined functions and the PC is currently
115 /// in one of those inlined functions, this method will return the inlined
116 /// block that defines this frame. If the PC isn't currently in an inlined
117 /// function, the lexical block that defines the function is returned.
118 ") GetFrameBlock;
119 lldb::SBBlock
120 GetFrameBlock () const;
121
122 lldb::SBLineEntry
123 GetLineEntry () const;
124
125 lldb::SBThread
126 GetThread () const;
127
128 const char *
129 Disassemble () const;
130
131 void
132 Clear();
133
134#ifndef SWIG
135 bool
136 operator == (const lldb::SBFrame &rhs) const;
137
138 bool
139 operator != (const lldb::SBFrame &rhs) const;
140
141#endif
142
143 %feature("docstring", "
144 /// The version that doesn't supply a 'use_dynamic' value will use the
145 /// target's default.
146 ") GetVariables;
147 lldb::SBValueList
148 GetVariables (bool arguments,
149 bool locals,
150 bool statics,
151 bool in_scope_only);
152
153 lldb::SBValueList
154 GetVariables (bool arguments,
155 bool locals,
156 bool statics,
157 bool in_scope_only,
158 lldb::DynamicValueType use_dynamic);
159
160 lldb::SBValueList
161 GetRegisters ();
162
163 %feature("docstring", "
164 /// The version that doesn't supply a 'use_dynamic' value will use the
165 /// target's default.
166 ") FindVariable;
167 lldb::SBValue
168 FindVariable (const char *var_name);
169
170 lldb::SBValue
171 FindVariable (const char *var_name, lldb::DynamicValueType use_dynamic);
172
173 %feature("docstring", "
174 /// Find variables, register sets, registers, or persistent variables using
175 /// the frame as the scope.
176 ///
177 /// The version that doesn't supply a 'use_dynamic' value will use the
178 /// target's default.
179 ") FindValue;
180 lldb::SBValue
181 FindValue (const char *name, ValueType value_type);
182
183 lldb::SBValue
184 FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic);
185
186 bool
187 GetDescription (lldb::SBStream &description);
188
189};
190
191} // namespace lldb