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