1 //===-- MICmdCmdExec.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: CMICmdCmdExecRun interface.
11 // CMICmdCmdExecContinue interface.
12 // CMICmdCmdExecNext interface.
13 // CMICmdCmdExecStep interface.
14 // CMICmdCmdExecNextInstruction interface.
15 // CMICmdCmdExecStepInstruction interface.
16 // CMICmdCmdExecFinish interface.
17 // CMICmdCmdExecInterrupt interface.
18 // CMICmdCmdExecArguments interface.
19 // CMICmdCmdExecAbort interface.
21 // To implement new MI commands derive a new command class from the command base
22 // class. To enable the new command for interpretation add the new command class
23 // to the command factory. The files of relevance are:
27 // For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
28 // command class as an example.
32 // Third party headers:
33 #include "lldb/API/SBCommandReturnObject.h"
36 #include "MICmdBase.h"
38 //++ ============================================================================
39 // Details: MI command class. MI commands derived from the command base class.
40 // *this class implements MI command "exec-run".
42 // Authors: Illya Rudkin 07/03/2014.
45 class CMICmdCmdExecRun : public CMICmdBase
49 // Required by the CMICmdFactory when registering *this command
50 static CMICmdBase *CreateSelf(void);
54 /* ctor */ CMICmdCmdExecRun(void);
58 // From CMICmdInvoker::ICmd
59 bool Execute(void) override;
60 bool Acknowledge(void) override;
62 /* dtor */ ~CMICmdCmdExecRun(void) override;
66 lldb::SBCommandReturnObject m_lldbResult;
69 //++ ============================================================================
70 // Details: MI command class. MI commands derived from the command base class.
71 // *this class implements MI command "exec-continue".
73 // Authors: Illya Rudkin 07/03/2014.
76 class CMICmdCmdExecContinue : public CMICmdBase
80 // Required by the CMICmdFactory when registering *this command
81 static CMICmdBase *CreateSelf(void);
85 /* ctor */ CMICmdCmdExecContinue(void);
89 // From CMICmdInvoker::ICmd
90 bool Execute(void) override;
91 bool Acknowledge(void) override;
93 /* dtor */ ~CMICmdCmdExecContinue(void) override;
97 lldb::SBCommandReturnObject m_lldbResult;
100 //++ ============================================================================
101 // Details: MI command class. MI commands derived from the command base class.
102 // *this class implements MI command "exec-next".
104 // Authors: Illya Rudkin 25/03/2014.
107 class CMICmdCmdExecNext : public CMICmdBase
111 // Required by the CMICmdFactory when registering *this command
112 static CMICmdBase *CreateSelf(void);
116 /* ctor */ CMICmdCmdExecNext(void);
120 // From CMICmdInvoker::ICmd
121 bool Execute(void) override;
122 bool Acknowledge(void) override;
123 bool ParseArgs(void) override;
125 /* dtor */ ~CMICmdCmdExecNext(void) override;
129 lldb::SBCommandReturnObject m_lldbResult;
130 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
131 const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option
134 //++ ============================================================================
135 // Details: MI command class. MI commands derived from the command base class.
136 // *this class implements MI command "exec-step".
138 // Authors: Illya Rudkin 25/03/2014.
141 class CMICmdCmdExecStep : public CMICmdBase
145 // Required by the CMICmdFactory when registering *this command
146 static CMICmdBase *CreateSelf(void);
150 /* ctor */ CMICmdCmdExecStep(void);
154 // From CMICmdInvoker::ICmd
155 bool Execute(void) override;
156 bool Acknowledge(void) override;
157 bool ParseArgs(void) override;
159 /* dtor */ ~CMICmdCmdExecStep(void) override;
163 lldb::SBCommandReturnObject m_lldbResult;
164 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
165 const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option
168 //++ ============================================================================
169 // Details: MI command class. MI commands derived from the command base class.
170 // *this class implements MI command "exec-next-instruction".
172 // Authors: Illya Rudkin 25/03/2014.
175 class CMICmdCmdExecNextInstruction : public CMICmdBase
179 // Required by the CMICmdFactory when registering *this command
180 static CMICmdBase *CreateSelf(void);
184 /* ctor */ CMICmdCmdExecNextInstruction(void);
188 // From CMICmdInvoker::ICmd
189 bool Execute(void) override;
190 bool Acknowledge(void) override;
191 bool ParseArgs(void) override;
193 /* dtor */ ~CMICmdCmdExecNextInstruction(void) override;
197 lldb::SBCommandReturnObject m_lldbResult;
198 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
199 const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option
202 //++ ============================================================================
203 // Details: MI command class. MI commands derived from the command base class.
204 // *this class implements MI command "exec-step-instruction".
206 // Authors: Illya Rudkin 25/03/2014.
209 class CMICmdCmdExecStepInstruction : public CMICmdBase
213 // Required by the CMICmdFactory when registering *this command
214 static CMICmdBase *CreateSelf(void);
218 /* ctor */ CMICmdCmdExecStepInstruction(void);
222 // From CMICmdInvoker::ICmd
223 bool Execute(void) override;
224 bool Acknowledge(void) override;
225 bool ParseArgs(void) override;
227 /* dtor */ ~CMICmdCmdExecStepInstruction(void) override;
231 lldb::SBCommandReturnObject m_lldbResult;
232 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
233 const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but Eclipse gives this option
236 //++ ============================================================================
237 // Details: MI command class. MI commands derived from the command base class.
238 // *this class implements MI command "exec-finish".
240 // Authors: Illya Rudkin 25/03/2014.
243 class CMICmdCmdExecFinish : public CMICmdBase
247 // Required by the CMICmdFactory when registering *this command
248 static CMICmdBase *CreateSelf(void);
252 /* ctor */ CMICmdCmdExecFinish(void);
256 // From CMICmdInvoker::ICmd
257 bool Execute(void) override;
258 bool Acknowledge(void) override;
259 bool ParseArgs(void) override;
261 /* dtor */ ~CMICmdCmdExecFinish(void) override;
265 lldb::SBCommandReturnObject m_lldbResult;
266 const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
267 const CMIUtilString m_constStrArgFrame; // Not specified in MI spec but Eclipse gives this option
270 // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
271 //++ ============================================================================
272 // Details: MI command class. MI commands derived from the command base class.
273 // *this class implements MI command "exec-interrupt".
274 // Gotchas: Using Eclipse this command is injected into the command system when a
275 // SIGINT signal is received while running an inferior program.
276 // Authors: Illya Rudkin 03/06/2014.
279 class CMICmdCmdExecInterrupt : public CMICmdBase
283 // Required by the CMICmdFactory when registering *this command
284 static CMICmdBase *CreateSelf(void);
288 /* ctor */ CMICmdCmdExecInterrupt(void);
292 // From CMICmdInvoker::ICmd
293 bool Execute(void) override;
294 bool Acknowledge(void) override;
296 /* dtor */ ~CMICmdCmdExecInterrupt(void) override;
300 lldb::SBCommandReturnObject m_lldbResult;
303 //++ ============================================================================
304 // Details: MI command class. MI commands derived from the command base class.
305 // *this class implements MI command "exec-arguments".
307 // Authors: Ilia Kirianovskii 25/11/2014.
310 class CMICmdCmdExecArguments : public CMICmdBase
314 // Required by the CMICmdFactory when registering *this command
315 static CMICmdBase *CreateSelf(void);
319 /* ctor */ CMICmdCmdExecArguments(void);
323 // From CMICmdInvoker::ICmd
324 bool Execute(void) override;
325 bool Acknowledge(void) override;
326 bool ParseArgs(void) override;
328 /* dtor */ ~CMICmdCmdExecArguments(void) override;
332 const CMIUtilString m_constStrArgArguments;
335 //++ ============================================================================
336 // Details: MI command class. MI commands derived from the command base class.
337 // *this class implements MI command "exec-abort".
339 class CMICmdCmdExecAbort : public CMICmdBase
343 // Required by the CMICmdFactory when registering *this command
344 static CMICmdBase *CreateSelf(void);
348 /* ctor */ CMICmdCmdExecAbort(void);
352 // From CMICmdInvoker::ICmd
353 bool Execute(void) override;
354 bool Acknowledge(void) override;
356 /* dtor */ ~CMICmdCmdExecAbort(void) override;