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 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:
23 // For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
24 // command class as an example.
29 #include "MICmdBase.h"
30 #include "MICmnMIValueList.h"
31 #include "MICmnMIValueTuple.h"
33 //++ ============================================================================
34 // Details: MI command class. MI commands derived from the command base class.
35 // *this class implements MI command "stack-info-depth".
37 class CMICmdCmdStackInfoDepth : public CMICmdBase
41 // Required by the CMICmdFactory when registering *this command
42 static CMICmdBase *CreateSelf();
46 /* ctor */ CMICmdCmdStackInfoDepth();
50 // From CMICmdInvoker::ICmd
51 bool Execute() override;
52 bool Acknowledge() override;
53 bool ParseArgs() override;
55 /* dtor */ ~CMICmdCmdStackInfoDepth() override;
59 MIuint m_nThreadFrames;
60 const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
63 //++ ============================================================================
64 // Details: MI command class. MI commands derived from the command base class.
65 // *this class implements MI command "stack-info-frame".
67 class CMICmdCmdStackInfoFrame : public CMICmdBase
71 // Required by the CMICmdFactory when registering *this command
72 static CMICmdBase *CreateSelf();
76 /* ctor */ CMICmdCmdStackInfoFrame();
80 // From CMICmdInvoker::ICmd
81 bool Execute() override;
82 bool Acknowledge() override;
83 bool ParseArgs() override;
85 /* dtor */ ~CMICmdCmdStackInfoFrame() override;
89 CMICmnMIValueTuple m_miValueTuple;
92 //++ ============================================================================
93 // Details: MI command class. MI commands derived from the command base class.
94 // *this class implements MI command "stack-list-frames".
96 class CMICmdCmdStackListFrames : public CMICmdBase
100 // Required by the CMICmdFactory when registering *this command
101 static CMICmdBase *CreateSelf();
105 /* ctor */ CMICmdCmdStackListFrames();
109 // From CMICmdInvoker::ICmd
110 bool Execute() override;
111 bool Acknowledge() override;
112 bool ParseArgs() override;
114 /* dtor */ ~CMICmdCmdStackListFrames() override;
118 typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
122 MIuint m_nThreadFrames;
123 VecMIValueResult_t m_vecMIValueResult;
124 const CMIUtilString m_constStrArgFrameLow;
125 const CMIUtilString m_constStrArgFrameHigh;
128 //++ ============================================================================
129 // Details: MI command class. MI commands derived from the command base class.
130 // *this class implements MI command "stack-list-arguments".
132 class CMICmdCmdStackListArguments : public CMICmdBase
136 // Required by the CMICmdFactory when registering *this command
137 static CMICmdBase *CreateSelf();
141 /* ctor */ CMICmdCmdStackListArguments();
145 // From CMICmdInvoker::ICmd
146 bool Execute() override;
147 bool Acknowledge() override;
148 bool ParseArgs() override;
150 /* dtor */ ~CMICmdCmdStackListArguments() override;
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;
161 //++ ============================================================================
162 // Details: MI command class. MI commands derived from the command base class.
163 // *this class implements MI command "stack-list-locals".
165 class CMICmdCmdStackListLocals : public CMICmdBase
169 // Required by the CMICmdFactory when registering *this command
170 static CMICmdBase *CreateSelf();
174 /* ctor */ CMICmdCmdStackListLocals();
178 // From CMICmdInvoker::ICmd
179 bool Execute() override;
180 bool Acknowledge() override;
181 bool ParseArgs() override;
183 /* dtor */ ~CMICmdCmdStackListLocals() override;
187 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
188 CMICmnMIValueList m_miValueList;
189 const CMIUtilString m_constStrArgPrintValues;
192 //++ ============================================================================
193 // Details: MI command class. MI commands derived from the command base class.
194 // *this class implements MI command "stack-list-variables".
196 class CMICmdCmdStackListVariables : public CMICmdBase
200 // Required by the CMICmdFactory when registering *this command
201 static CMICmdBase *CreateSelf();
205 /* ctor */ CMICmdCmdStackListVariables();
209 // From CMICmdInvoker::ICmd
210 bool Execute() override;
211 bool Acknowledge() override;
212 bool ParseArgs() override;
214 /* dtor */ ~CMICmdCmdStackListVariables() override;
218 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
219 CMICmnMIValueList m_miValueList;
220 const CMIUtilString m_constStrArgPrintValues;
223 //++ ============================================================================
224 // Details: MI command class. MI commands derived from the command base class.
225 // *this class implements MI command "stack-select-frame".
227 class CMICmdCmdStackSelectFrame : public CMICmdBase
231 // Required by the CMICmdFactory when registering *this command
232 static CMICmdBase *CreateSelf();
236 /* ctor */ CMICmdCmdStackSelectFrame();
240 // From CMICmdInvoker::ICmd
241 bool Execute() override;
242 bool Acknowledge() override;
243 bool ParseArgs() override;
245 /* dtor */ ~CMICmdCmdStackSelectFrame() override;
249 bool m_bFrameInvalid; // True = yes invalid frame, false = ok
250 const CMIUtilString m_constStrArgFrameId;