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 // Authors: Illya Rudkin 21/03/2014.
40 class CMICmdCmdStackInfoDepth : public CMICmdBase
44 // Required by the CMICmdFactory when registering *this command
45 static CMICmdBase *CreateSelf(void);
49 /* ctor */ CMICmdCmdStackInfoDepth(void);
53 // From CMICmdInvoker::ICmd
54 bool Execute(void) override;
55 bool Acknowledge(void) override;
56 bool ParseArgs(void) override;
58 /* dtor */ ~CMICmdCmdStackInfoDepth(void) override;
62 MIuint m_nThreadFrames;
63 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
64 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
75 // Required by the CMICmdFactory when registering *this command
76 static CMICmdBase *CreateSelf(void);
80 /* ctor */ CMICmdCmdStackInfoFrame(void);
84 // From CMICmdInvoker::ICmd
85 bool Execute(void) override;
86 bool Acknowledge(void) override;
87 bool ParseArgs(void) override;
89 /* dtor */ ~CMICmdCmdStackInfoFrame(void) override;
93 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 // Authors: Illya Rudkin 21/03/2014.
103 class CMICmdCmdStackListFrames : public CMICmdBase
107 // Required by the CMICmdFactory when registering *this command
108 static CMICmdBase *CreateSelf(void);
112 /* ctor */ CMICmdCmdStackListFrames(void);
116 // From CMICmdInvoker::ICmd
117 bool Execute(void) override;
118 bool Acknowledge(void) override;
119 bool ParseArgs(void) override;
121 /* dtor */ ~CMICmdCmdStackListFrames(void) override;
125 typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
129 MIuint m_nThreadFrames;
130 VecMIValueResult_t m_vecMIValueResult;
131 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
132 const CMIUtilString m_constStrArgFrameLow;
133 const CMIUtilString m_constStrArgFrameHigh;
136 //++ ============================================================================
137 // Details: MI command class. MI commands derived from the command base class.
138 // *this class implements MI command "stack-list-arguments".
140 // Authors: Illya Rudkin 24/03/2014.
143 class CMICmdCmdStackListArguments : public CMICmdBase
147 // Required by the CMICmdFactory when registering *this command
148 static CMICmdBase *CreateSelf(void);
152 /* ctor */ CMICmdCmdStackListArguments(void);
156 // From CMICmdInvoker::ICmd
157 bool Execute(void) override;
158 bool Acknowledge(void) override;
159 bool ParseArgs(void) override;
161 /* dtor */ ~CMICmdCmdStackListArguments(void) override;
165 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
166 CMICmnMIValueList m_miValueList;
167 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
168 const CMIUtilString m_constStrArgPrintValues;
169 const CMIUtilString m_constStrArgFrameLow;
170 const CMIUtilString m_constStrArgFrameHigh;
173 //++ ============================================================================
174 // Details: MI command class. MI commands derived from the command base class.
175 // *this class implements MI command "stack-list-locals".
177 // Authors: Illya Rudkin 24/03/2014.
180 class CMICmdCmdStackListLocals : public CMICmdBase
184 // Required by the CMICmdFactory when registering *this command
185 static CMICmdBase *CreateSelf(void);
189 /* ctor */ CMICmdCmdStackListLocals(void);
193 // From CMICmdInvoker::ICmd
194 bool Execute(void) override;
195 bool Acknowledge(void) override;
196 bool ParseArgs(void) override;
198 /* dtor */ ~CMICmdCmdStackListLocals(void) override;
202 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
203 CMICmnMIValueList m_miValueList;
204 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
205 const CMIUtilString m_constStrArgFrame; // Not specified in MI spec but Eclipse gives this option
206 const CMIUtilString m_constStrArgPrintValues;
209 //++ ============================================================================
210 // Details: MI command class. MI commands derived from the command base class.
211 // *this class implements MI command "stack-list-variables".
213 class CMICmdCmdStackListVariables : public CMICmdBase
217 // Required by the CMICmdFactory when registering *this command
218 static CMICmdBase *CreateSelf(void);
222 /* ctor */ CMICmdCmdStackListVariables(void);
226 // From CMICmdInvoker::ICmd
227 bool Execute(void) override;
228 bool Acknowledge(void) override;
229 bool ParseArgs(void) override;
231 /* dtor */ ~CMICmdCmdStackListVariables(void) override;
235 bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
236 CMICmnMIValueList m_miValueList;
237 const CMIUtilString m_constStrArgThread;
238 const CMIUtilString m_constStrArgFrame;
239 const CMIUtilString m_constStrArgPrintValues;
242 //++ ============================================================================
243 // Details: MI command class. MI commands derived from the command base class.
244 // *this class implements MI command "stack-select-frame".
246 class CMICmdCmdStackSelectFrame : public CMICmdBase
250 // Required by the CMICmdFactory when registering *this command
251 static CMICmdBase *CreateSelf(void);
255 /* ctor */ CMICmdCmdStackSelectFrame(void);
259 // From CMICmdInvoker::ICmd
260 bool Execute(void) override;
261 bool Acknowledge(void) override;
262 bool ParseArgs(void) override;
264 /* dtor */ ~CMICmdCmdStackSelectFrame(void) override;
268 bool m_bFrameInvalid; // True = yes invalid frame, false = ok
269 const CMIUtilString m_constStrArgFrame;