]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmdCmdStack.h
Vendor import of stripped lldb trunk r256633:
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmdCmdStack.h
1 //===-- MICmdCmdStack.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 // Overview:    CMICmdCmdStackInfoDepth         interface.
11 //              CMICmdCmdStackInfoFrame         interface.
12 //              CMICmdCmdStackListFrames        interface.
13 //              CMICmdCmdStackListArguments     interface.
14 //              CMICmdCmdStackListLocals        interface.
15 //              CMICmdCmdStackSelectFrame       interface.
16 //
17 //              To implement new MI commands derive a new command class from the command base
18 //              class. To enable the new command for interpretation add the new command class
19 //              to the command factory. The files of relevance are:
20 //                  MICmdCommands.cpp
21 //                  MICmdBase.h / .cpp
22 //                  MICmdCmd.h / .cpp
23 //              For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
24 //              command class as an example.
25
26 #pragma once
27
28 // In-house headers:
29 #include "MICmdBase.h"
30 #include "MICmnMIValueList.h"
31 #include "MICmnMIValueTuple.h"
32
33 //++ ============================================================================
34 // Details: MI command class. MI commands derived from the command base class.
35 //          *this class implements MI command "stack-info-depth".
36 //--
37 class CMICmdCmdStackInfoDepth : public CMICmdBase
38 {
39     // Statics:
40   public:
41     // Required by the CMICmdFactory when registering *this command
42     static CMICmdBase *CreateSelf();
43
44     // Methods:
45   public:
46     /* ctor */ CMICmdCmdStackInfoDepth();
47
48     // Overridden:
49   public:
50     // From CMICmdInvoker::ICmd
51     bool Execute() override;
52     bool Acknowledge() override;
53     bool ParseArgs() override;
54     // From CMICmnBase
55     /* dtor */ ~CMICmdCmdStackInfoDepth() override;
56
57     // Attributes:
58   private:
59     MIuint m_nThreadFrames;
60     const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
61 };
62
63 //++ ============================================================================
64 // Details: MI command class. MI commands derived from the command base class.
65 //          *this class implements MI command "stack-info-frame".
66 //--
67 class CMICmdCmdStackInfoFrame : public CMICmdBase
68 {
69     // Statics:
70   public:
71     // Required by the CMICmdFactory when registering *this command
72     static CMICmdBase *CreateSelf();
73
74     // Methods:
75   public:
76     /* ctor */ CMICmdCmdStackInfoFrame();
77
78     // Overridden:
79   public:
80     // From CMICmdInvoker::ICmd
81     bool Execute() override;
82     bool Acknowledge() override;
83     bool ParseArgs() override;
84     // From CMICmnBase
85     /* dtor */ ~CMICmdCmdStackInfoFrame() override;
86
87     // Attributes:
88   private:
89     CMICmnMIValueTuple m_miValueTuple;
90 };
91
92 //++ ============================================================================
93 // Details: MI command class. MI commands derived from the command base class.
94 //          *this class implements MI command "stack-list-frames".
95 //--
96 class CMICmdCmdStackListFrames : public CMICmdBase
97 {
98     // Statics:
99   public:
100     // Required by the CMICmdFactory when registering *this command
101     static CMICmdBase *CreateSelf();
102
103     // Methods:
104   public:
105     /* ctor */ CMICmdCmdStackListFrames();
106
107     // Overridden:
108   public:
109     // From CMICmdInvoker::ICmd
110     bool Execute() override;
111     bool Acknowledge() override;
112     bool ParseArgs() override;
113     // From CMICmnBase
114     /* dtor */ ~CMICmdCmdStackListFrames() override;
115
116     // Typedefs:
117   private:
118     typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
119
120     // Attributes:
121   private:
122     MIuint m_nThreadFrames;
123     VecMIValueResult_t m_vecMIValueResult;
124     const CMIUtilString m_constStrArgFrameLow;
125     const CMIUtilString m_constStrArgFrameHigh;
126 };
127
128 //++ ============================================================================
129 // Details: MI command class. MI commands derived from the command base class.
130 //          *this class implements MI command "stack-list-arguments".
131 //--
132 class CMICmdCmdStackListArguments : public CMICmdBase
133 {
134     // Statics:
135   public:
136     // Required by the CMICmdFactory when registering *this command
137     static CMICmdBase *CreateSelf();
138
139     // Methods:
140   public:
141     /* ctor */ CMICmdCmdStackListArguments();
142
143     // Overridden:
144   public:
145     // From CMICmdInvoker::ICmd
146     bool Execute() override;
147     bool Acknowledge() override;
148     bool ParseArgs() override;
149     // From CMICmnBase
150     /* dtor */ ~CMICmdCmdStackListArguments() override;
151
152     // Attributes:
153   private:
154     bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
155     CMICmnMIValueList m_miValueList;
156     const CMIUtilString m_constStrArgPrintValues;
157     const CMIUtilString m_constStrArgFrameLow;
158     const CMIUtilString m_constStrArgFrameHigh;
159 };
160
161 //++ ============================================================================
162 // Details: MI command class. MI commands derived from the command base class.
163 //          *this class implements MI command "stack-list-locals".
164 //--
165 class CMICmdCmdStackListLocals : public CMICmdBase
166 {
167     // Statics:
168   public:
169     // Required by the CMICmdFactory when registering *this command
170     static CMICmdBase *CreateSelf();
171
172     // Methods:
173   public:
174     /* ctor */ CMICmdCmdStackListLocals();
175
176     // Overridden:
177   public:
178     // From CMICmdInvoker::ICmd
179     bool Execute() override;
180     bool Acknowledge() override;
181     bool ParseArgs() override;
182     // From CMICmnBase
183     /* dtor */ ~CMICmdCmdStackListLocals() override;
184
185     // Attributes:
186   private:
187     bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
188     CMICmnMIValueList m_miValueList;
189     const CMIUtilString m_constStrArgPrintValues;
190 };
191
192 //++ ============================================================================
193 // Details: MI command class. MI commands derived from the command base class.
194 //          *this class implements MI command "stack-list-variables".
195 //--
196 class CMICmdCmdStackListVariables : public CMICmdBase
197 {
198     // Statics:
199 public:
200     // Required by the CMICmdFactory when registering *this command
201     static CMICmdBase *CreateSelf();
202     
203     // Methods:
204 public:
205     /* ctor */ CMICmdCmdStackListVariables();
206     
207     // Overridden:
208 public:
209     // From CMICmdInvoker::ICmd
210     bool Execute() override;
211     bool Acknowledge() override;
212     bool ParseArgs() override;
213     // From CMICmnBase
214     /* dtor */ ~CMICmdCmdStackListVariables() override;
215     
216     // Attributes
217 private:
218     bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
219     CMICmnMIValueList m_miValueList;
220     const CMIUtilString m_constStrArgPrintValues;
221 };
222
223 //++ ============================================================================
224 // Details: MI command class. MI commands derived from the command base class.
225 //          *this class implements MI command "stack-select-frame".
226 //--
227 class CMICmdCmdStackSelectFrame : public CMICmdBase
228 {
229     // Statics:
230   public:
231     // Required by the CMICmdFactory when registering *this command
232     static CMICmdBase *CreateSelf();
233
234     // Methods:
235   public:
236     /* ctor */ CMICmdCmdStackSelectFrame();
237
238     // Overridden:
239   public:
240     // From CMICmdInvoker::ICmd
241     bool Execute() override;
242     bool Acknowledge() override;
243     bool ParseArgs() override;
244     // From CMICmnBase
245     /* dtor */ ~CMICmdCmdStackSelectFrame() override;
246
247     // Attributes:
248   private:
249     bool m_bFrameInvalid; // True = yes invalid frame, false = ok
250     const CMIUtilString m_constStrArgFrameId;
251 };