1 //===-- MICmdCmdStack.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Overview: CMICmdCmdStackInfoDepth interface.
11 // CMICmdCmdStackInfoFrame interface.
12 // CMICmdCmdStackListFrames interface.
13 // CMICmdCmdStackListArguments interface.
14 // CMICmdCmdStackListLocals interface.
15 // CMICmdCmdStackSelectFrame interface.
17 // To implement new MI commands derive a new command class from the
19 // class. To enable the new command for interpretation add the new
21 // to the command factory. The files of relevance are:
25 // For an introduction to adding a new command see
26 // CMICmdCmdSupportInfoMiCmdQuery
27 // command class as an example.
32 #include "MICmdBase.h"
33 #include "MICmnMIValueList.h"
34 #include "MICmnMIValueTuple.h"
37 //============================================================================
38 // Details: MI command class. MI commands derived from the command base class.
39 // *this class implements MI command "stack-info-depth".
41 class CMICmdCmdStackInfoDepth : public CMICmdBase {
44 // Required by the CMICmdFactory when registering *this command
45 static CMICmdBase *CreateSelf();
49 /* ctor */ CMICmdCmdStackInfoDepth();
53 // From CMICmdInvoker::ICmd
54 bool Execute() override;
55 bool Acknowledge() override;
56 bool ParseArgs() override;
58 /* dtor */ ~CMICmdCmdStackInfoDepth() override;
62 MIuint m_nThreadFrames;
63 const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
67 //============================================================================
68 // Details: MI command class. MI commands derived from the command base class.
69 // *this class implements MI command "stack-info-frame".
71 class CMICmdCmdStackInfoFrame : public CMICmdBase {
74 // Required by the CMICmdFactory when registering *this command
75 static CMICmdBase *CreateSelf();
79 /* ctor */ CMICmdCmdStackInfoFrame();
83 // From CMICmdInvoker::ICmd
84 bool Execute() override;
85 bool Acknowledge() override;
86 bool ParseArgs() override;
88 /* dtor */ ~CMICmdCmdStackInfoFrame() override;
92 CMICmnMIValueTuple m_miValueTuple;
96 //============================================================================
97 // Details: MI command class. MI commands derived from the command base class.
98 // *this class implements MI command "stack-list-frames".
100 class CMICmdCmdStackListFrames : public CMICmdBase {
103 // Required by the CMICmdFactory when registering *this command
104 static CMICmdBase *CreateSelf();
108 /* ctor */ CMICmdCmdStackListFrames();
112 // From CMICmdInvoker::ICmd
113 bool Execute() override;
114 bool Acknowledge() override;
115 bool ParseArgs() override;
117 /* dtor */ ~CMICmdCmdStackListFrames() override;
121 typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
125 MIuint m_nThreadFrames;
126 VecMIValueResult_t m_vecMIValueResult;
127 const CMIUtilString m_constStrArgFrameLow;
128 const CMIUtilString m_constStrArgFrameHigh;
132 //============================================================================
133 // Details: MI command class. MI commands derived from the command base class.
134 // *this class implements MI command "stack-list-arguments".
136 class CMICmdCmdStackListArguments : public CMICmdBase {
139 // Required by the CMICmdFactory when registering *this command
140 static CMICmdBase *CreateSelf();
144 /* ctor */ CMICmdCmdStackListArguments();
148 // From CMICmdInvoker::ICmd
149 bool Execute() override;
150 bool Acknowledge() override;
151 bool ParseArgs() override;
153 /* dtor */ ~CMICmdCmdStackListArguments() override;
157 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
159 CMICmnMIValueList m_miValueList;
160 const CMIUtilString m_constStrArgPrintValues;
161 const CMIUtilString m_constStrArgFrameLow;
162 const CMIUtilString m_constStrArgFrameHigh;
166 //============================================================================
167 // Details: MI command class. MI commands derived from the command base class.
168 // *this class implements MI command "stack-list-locals".
170 class CMICmdCmdStackListLocals : public CMICmdBase {
173 // Required by the CMICmdFactory when registering *this command
174 static CMICmdBase *CreateSelf();
178 /* ctor */ CMICmdCmdStackListLocals();
182 // From CMICmdInvoker::ICmd
183 bool Execute() override;
184 bool Acknowledge() override;
185 bool ParseArgs() override;
187 /* dtor */ ~CMICmdCmdStackListLocals() override;
191 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
193 CMICmnMIValueList m_miValueList;
194 const CMIUtilString m_constStrArgPrintValues;
198 //============================================================================
199 // Details: MI command class. MI commands derived from the command base class.
200 // *this class implements MI command "stack-list-variables".
202 class CMICmdCmdStackListVariables : public CMICmdBase {
205 // Required by the CMICmdFactory when registering *this command
206 static CMICmdBase *CreateSelf();
210 /* ctor */ CMICmdCmdStackListVariables();
214 // From CMICmdInvoker::ICmd
215 bool Execute() override;
216 bool Acknowledge() override;
217 bool ParseArgs() override;
219 /* dtor */ ~CMICmdCmdStackListVariables() override;
223 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
225 CMICmnMIValueList m_miValueList;
226 const CMIUtilString m_constStrArgPrintValues;
230 //============================================================================
231 // Details: MI command class. MI commands derived from the command base class.
232 // *this class implements MI command "stack-select-frame".
234 class CMICmdCmdStackSelectFrame : public CMICmdBase {
237 // Required by the CMICmdFactory when registering *this command
238 static CMICmdBase *CreateSelf();
242 /* ctor */ CMICmdCmdStackSelectFrame();
246 // From CMICmdInvoker::ICmd
247 bool Execute() override;
248 bool Acknowledge() override;
249 bool ParseArgs() override;
251 /* dtor */ ~CMICmdCmdStackSelectFrame() override;
255 bool m_bFrameInvalid; // True = yes invalid frame, false = ok
256 const CMIUtilString m_constStrArgFrameId;