1 //===-- MICmdCmdStack.h -----------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // Overview: CMICmdCmdStackInfoDepth interface.
10 // CMICmdCmdStackInfoFrame interface.
11 // CMICmdCmdStackListFrames interface.
12 // CMICmdCmdStackListArguments interface.
13 // CMICmdCmdStackListLocals interface.
14 // CMICmdCmdStackSelectFrame interface.
16 // To implement new MI commands derive a new command class from the
18 // class. To enable the new command for interpretation add the new
20 // to the command factory. The files of relevance are:
24 // For an introduction to adding a new command see
25 // CMICmdCmdSupportInfoMiCmdQuery
26 // command class as an example.
31 #include "MICmdBase.h"
32 #include "MICmnMIValueList.h"
33 #include "MICmnMIValueTuple.h"
36 //============================================================================
37 // Details: MI command class. MI commands derived from the command base class.
38 // *this class implements MI command "stack-info-depth".
40 class CMICmdCmdStackInfoDepth : public CMICmdBase {
43 // Required by the CMICmdFactory when registering *this command
44 static CMICmdBase *CreateSelf();
48 /* ctor */ CMICmdCmdStackInfoDepth();
52 // From CMICmdInvoker::ICmd
53 bool Execute() override;
54 bool Acknowledge() override;
55 bool ParseArgs() override;
57 /* dtor */ ~CMICmdCmdStackInfoDepth() override;
61 MIuint m_nThreadFrames;
62 const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
66 //============================================================================
67 // Details: MI command class. MI commands derived from the command base class.
68 // *this class implements MI command "stack-info-frame".
70 class CMICmdCmdStackInfoFrame : public CMICmdBase {
73 // Required by the CMICmdFactory when registering *this command
74 static CMICmdBase *CreateSelf();
78 /* ctor */ CMICmdCmdStackInfoFrame();
82 // From CMICmdInvoker::ICmd
83 bool Execute() override;
84 bool Acknowledge() override;
85 bool ParseArgs() override;
87 /* dtor */ ~CMICmdCmdStackInfoFrame() override;
91 CMICmnMIValueTuple m_miValueTuple;
95 //============================================================================
96 // Details: MI command class. MI commands derived from the command base class.
97 // *this class implements MI command "stack-list-frames".
99 class CMICmdCmdStackListFrames : public CMICmdBase {
102 // Required by the CMICmdFactory when registering *this command
103 static CMICmdBase *CreateSelf();
107 /* ctor */ CMICmdCmdStackListFrames();
111 // From CMICmdInvoker::ICmd
112 bool Execute() override;
113 bool Acknowledge() override;
114 bool ParseArgs() override;
116 /* dtor */ ~CMICmdCmdStackListFrames() override;
120 typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
124 MIuint m_nThreadFrames;
125 VecMIValueResult_t m_vecMIValueResult;
126 const CMIUtilString m_constStrArgFrameLow;
127 const CMIUtilString m_constStrArgFrameHigh;
131 //============================================================================
132 // Details: MI command class. MI commands derived from the command base class.
133 // *this class implements MI command "stack-list-arguments".
135 class CMICmdCmdStackListArguments : public CMICmdBase {
138 // Required by the CMICmdFactory when registering *this command
139 static CMICmdBase *CreateSelf();
143 /* ctor */ CMICmdCmdStackListArguments();
147 // From CMICmdInvoker::ICmd
148 bool Execute() override;
149 bool Acknowledge() override;
150 bool ParseArgs() override;
152 /* dtor */ ~CMICmdCmdStackListArguments() override;
156 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
158 CMICmnMIValueList m_miValueList;
159 const CMIUtilString m_constStrArgPrintValues;
160 const CMIUtilString m_constStrArgFrameLow;
161 const CMIUtilString m_constStrArgFrameHigh;
165 //============================================================================
166 // Details: MI command class. MI commands derived from the command base class.
167 // *this class implements MI command "stack-list-locals".
169 class CMICmdCmdStackListLocals : public CMICmdBase {
172 // Required by the CMICmdFactory when registering *this command
173 static CMICmdBase *CreateSelf();
177 /* ctor */ CMICmdCmdStackListLocals();
181 // From CMICmdInvoker::ICmd
182 bool Execute() override;
183 bool Acknowledge() override;
184 bool ParseArgs() override;
186 /* dtor */ ~CMICmdCmdStackListLocals() override;
190 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
192 CMICmnMIValueList m_miValueList;
193 const CMIUtilString m_constStrArgPrintValues;
197 //============================================================================
198 // Details: MI command class. MI commands derived from the command base class.
199 // *this class implements MI command "stack-list-variables".
201 class CMICmdCmdStackListVariables : public CMICmdBase {
204 // Required by the CMICmdFactory when registering *this command
205 static CMICmdBase *CreateSelf();
209 /* ctor */ CMICmdCmdStackListVariables();
213 // From CMICmdInvoker::ICmd
214 bool Execute() override;
215 bool Acknowledge() override;
216 bool ParseArgs() override;
218 /* dtor */ ~CMICmdCmdStackListVariables() override;
222 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
224 CMICmnMIValueList m_miValueList;
225 const CMIUtilString m_constStrArgPrintValues;
229 //============================================================================
230 // Details: MI command class. MI commands derived from the command base class.
231 // *this class implements MI command "stack-select-frame".
233 class CMICmdCmdStackSelectFrame : public CMICmdBase {
236 // Required by the CMICmdFactory when registering *this command
237 static CMICmdBase *CreateSelf();
241 /* ctor */ CMICmdCmdStackSelectFrame();
245 // From CMICmdInvoker::ICmd
246 bool Execute() override;
247 bool Acknowledge() override;
248 bool ParseArgs() override;
250 /* dtor */ ~CMICmdCmdStackSelectFrame() override;
254 bool m_bFrameInvalid; // True = yes invalid frame, false = ok
255 const CMIUtilString m_constStrArgFrameId;