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