SBFrame.h revision 5f81547fd786584b10999c087528b323b5945896
1//===-- SBFrame.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_SBFrame_h_
11#define LLDB_SBFrame_h_
12
13#include "lldb/API/SBDefines.h"
14#include "lldb/API/SBValueList.h"
15
16namespace lldb {
17
18class SBValue;
19
20class SBFrame
21{
22public:
23    SBFrame ();
24
25   ~SBFrame();
26
27    bool
28    IsValid() const;
29
30    uint32_t
31    GetFrameID () const;
32
33    lldb::addr_t
34    GetPC () const;
35
36    bool
37    SetPC (lldb::addr_t new_pc);
38
39    lldb::addr_t
40    GetSP () const;
41
42    lldb::addr_t
43    GetFP () const;
44
45    lldb::SBAddress
46    GetPCAddress () const;
47
48    lldb::SBSymbolContext
49    GetSymbolContext (uint32_t resolve_scope) const;
50
51    lldb::SBModule
52    GetModule () const;
53
54    lldb::SBCompileUnit
55    GetCompileUnit () const;
56
57    lldb::SBFunction
58    GetFunction () const;
59
60    lldb::SBBlock
61    GetBlock () const;
62
63    lldb::SBLineEntry
64    GetLineEntry () const;
65
66    lldb::SBThread
67    GetThread () const;
68
69    const char *
70    Disassemble () const;
71
72    void
73    Clear();
74
75#ifndef SWIG
76    bool
77    operator == (const lldb::SBFrame &rhs) const;
78
79    bool
80    operator != (const lldb::SBFrame &rhs) const;
81
82#endif
83
84    lldb::SBValueList
85    GetVariables (bool arguments,
86                  bool locals,
87                  bool statics,
88                  bool in_scope_only);
89
90    lldb::SBValueList
91    GetRegisters ();
92
93    lldb::SBValue
94    LookupVar (const char *var_name);
95
96    lldb::SBValue
97    LookupVarInScope (const char *var_name, const char *scope);
98
99protected:
100    friend class SBValue;
101
102    lldb_private::StackFrame *
103    GetLLDBObjectPtr ();
104
105private:
106    friend class SBThread;
107
108#ifndef SWIG
109
110    lldb_private::StackFrame *
111    operator->() const;
112
113    // Mimic shared pointer...
114    lldb_private::StackFrame *
115    get() const;
116
117#endif
118
119
120    SBFrame (const lldb::StackFrameSP &lldb_object_sp);
121
122    void
123    SetFrame (const lldb::StackFrameSP &lldb_object_sp);
124
125    lldb::StackFrameSP m_lldb_object_sp;
126};
127
128} // namespace lldb
129
130#endif  // LLDB_SBFrame_h_
131