]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdExec.h
Update lldb to upstream trunk r242221.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / tools / lldb-mi / MICmdCmdExec.h
1 //===-- MICmdCmdExec.h ------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
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.
20 //
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:
24 //                  MICmdCommands.cpp
25 //                  MICmdBase.h / .cpp
26 //                  MICmdCmd.h / .cpp
27 //              For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
28 //              command class as an example.
29
30 #pragma once
31
32 // Third party headers:
33 #include "lldb/API/SBCommandReturnObject.h"
34
35 // In-house headers:
36 #include "MICmdBase.h"
37
38 //++ ============================================================================
39 // Details: MI command class. MI commands derived from the command base class.
40 //          *this class implements MI command "exec-run".
41 // Gotchas: None.
42 // Authors: Illya Rudkin 07/03/2014.
43 // Changes: None.
44 //--
45 class CMICmdCmdExecRun : public CMICmdBase
46 {
47     // Statics:
48   public:
49     // Required by the CMICmdFactory when registering *this command
50     static CMICmdBase *CreateSelf(void);
51
52     // Methods:
53   public:
54     /* ctor */ CMICmdCmdExecRun(void);
55
56     // Overridden:
57   public:
58     // From CMICmdInvoker::ICmd
59     bool Execute(void) override;
60     bool Acknowledge(void) override;
61     // From CMICmnBase
62     /* dtor */ ~CMICmdCmdExecRun(void) override;
63
64     // Attributes:
65   private:
66     lldb::SBCommandReturnObject m_lldbResult;
67 };
68
69 //++ ============================================================================
70 // Details: MI command class. MI commands derived from the command base class.
71 //          *this class implements MI command "exec-continue".
72 // Gotchas: None.
73 // Authors: Illya Rudkin 07/03/2014.
74 // Changes: None.
75 //--
76 class CMICmdCmdExecContinue : public CMICmdBase
77 {
78     // Statics:
79   public:
80     // Required by the CMICmdFactory when registering *this command
81     static CMICmdBase *CreateSelf(void);
82
83     // Methods:
84   public:
85     /* ctor */ CMICmdCmdExecContinue(void);
86
87     // Overridden:
88   public:
89     // From CMICmdInvoker::ICmd
90     bool Execute(void) override;
91     bool Acknowledge(void) override;
92     // From CMICmnBase
93     /* dtor */ ~CMICmdCmdExecContinue(void) override;
94
95     // Attributes:
96   private:
97     lldb::SBCommandReturnObject m_lldbResult;
98 };
99
100 //++ ============================================================================
101 // Details: MI command class. MI commands derived from the command base class.
102 //          *this class implements MI command "exec-next".
103 // Gotchas: None.
104 // Authors: Illya Rudkin 25/03/2014.
105 // Changes: None.
106 //--
107 class CMICmdCmdExecNext : public CMICmdBase
108 {
109     // Statics:
110   public:
111     // Required by the CMICmdFactory when registering *this command
112     static CMICmdBase *CreateSelf(void);
113
114     // Methods:
115   public:
116     /* ctor */ CMICmdCmdExecNext(void);
117
118     // Overridden:
119   public:
120     // From CMICmdInvoker::ICmd
121     bool Execute(void) override;
122     bool Acknowledge(void) override;
123     bool ParseArgs(void) override;
124     // From CMICmnBase
125     /* dtor */ ~CMICmdCmdExecNext(void) override;
126
127     // Attributes:
128   private:
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
132 };
133
134 //++ ============================================================================
135 // Details: MI command class. MI commands derived from the command base class.
136 //          *this class implements MI command "exec-step".
137 // Gotchas: None.
138 // Authors: Illya Rudkin 25/03/2014.
139 // Changes: None.
140 //--
141 class CMICmdCmdExecStep : public CMICmdBase
142 {
143     // Statics:
144   public:
145     // Required by the CMICmdFactory when registering *this command
146     static CMICmdBase *CreateSelf(void);
147
148     // Methods:
149   public:
150     /* ctor */ CMICmdCmdExecStep(void);
151
152     // Overridden:
153   public:
154     // From CMICmdInvoker::ICmd
155     bool Execute(void) override;
156     bool Acknowledge(void) override;
157     bool ParseArgs(void) override;
158     // From CMICmnBase
159     /* dtor */ ~CMICmdCmdExecStep(void) override;
160
161     // Attributes:
162   private:
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
166 };
167
168 //++ ============================================================================
169 // Details: MI command class. MI commands derived from the command base class.
170 //          *this class implements MI command "exec-next-instruction".
171 // Gotchas: None.
172 // Authors: Illya Rudkin 25/03/2014.
173 // Changes: None.
174 //--
175 class CMICmdCmdExecNextInstruction : public CMICmdBase
176 {
177     // Statics:
178   public:
179     // Required by the CMICmdFactory when registering *this command
180     static CMICmdBase *CreateSelf(void);
181
182     // Methods:
183   public:
184     /* ctor */ CMICmdCmdExecNextInstruction(void);
185
186     // Overridden:
187   public:
188     // From CMICmdInvoker::ICmd
189     bool Execute(void) override;
190     bool Acknowledge(void) override;
191     bool ParseArgs(void) override;
192     // From CMICmnBase
193     /* dtor */ ~CMICmdCmdExecNextInstruction(void) override;
194
195     // Attributes:
196   private:
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
200 };
201
202 //++ ============================================================================
203 // Details: MI command class. MI commands derived from the command base class.
204 //          *this class implements MI command "exec-step-instruction".
205 // Gotchas: None.
206 // Authors: Illya Rudkin 25/03/2014.
207 // Changes: None.
208 //--
209 class CMICmdCmdExecStepInstruction : public CMICmdBase
210 {
211     // Statics:
212   public:
213     // Required by the CMICmdFactory when registering *this command
214     static CMICmdBase *CreateSelf(void);
215
216     // Methods:
217   public:
218     /* ctor */ CMICmdCmdExecStepInstruction(void);
219
220     // Overridden:
221   public:
222     // From CMICmdInvoker::ICmd
223     bool Execute(void) override;
224     bool Acknowledge(void) override;
225     bool ParseArgs(void) override;
226     // From CMICmnBase
227     /* dtor */ ~CMICmdCmdExecStepInstruction(void) override;
228
229     // Attributes:
230   private:
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
234 };
235
236 //++ ============================================================================
237 // Details: MI command class. MI commands derived from the command base class.
238 //          *this class implements MI command "exec-finish".
239 // Gotchas: None.
240 // Authors: Illya Rudkin 25/03/2014.
241 // Changes: None.
242 //--
243 class CMICmdCmdExecFinish : public CMICmdBase
244 {
245     // Statics:
246   public:
247     // Required by the CMICmdFactory when registering *this command
248     static CMICmdBase *CreateSelf(void);
249
250     // Methods:
251   public:
252     /* ctor */ CMICmdCmdExecFinish(void);
253
254     // Overridden:
255   public:
256     // From CMICmdInvoker::ICmd
257     bool Execute(void) override;
258     bool Acknowledge(void) override;
259     bool ParseArgs(void) override;
260     // From CMICmnBase
261     /* dtor */ ~CMICmdCmdExecFinish(void) override;
262
263     // Attributes:
264   private:
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
268 };
269
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.
277 // Changes: None.
278 //--
279 class CMICmdCmdExecInterrupt : public CMICmdBase
280 {
281     // Statics:
282   public:
283     // Required by the CMICmdFactory when registering *this command
284     static CMICmdBase *CreateSelf(void);
285
286     // Methods:
287   public:
288     /* ctor */ CMICmdCmdExecInterrupt(void);
289
290     // Overridden:
291   public:
292     // From CMICmdInvoker::ICmd
293     bool Execute(void) override;
294     bool Acknowledge(void) override;
295     // From CMICmnBase
296     /* dtor */ ~CMICmdCmdExecInterrupt(void) override;
297
298     // Attributes:
299   private:
300     lldb::SBCommandReturnObject m_lldbResult;
301 };
302
303 //++ ============================================================================
304 // Details: MI command class. MI commands derived from the command base class.
305 //          *this class implements MI command "exec-arguments".
306 // Gotchas: None.
307 // Authors: Ilia Kirianovskii 25/11/2014.
308 // Changes: None.
309 //--
310 class CMICmdCmdExecArguments : public CMICmdBase
311 {
312     // Statics:
313   public:
314     // Required by the CMICmdFactory when registering *this command
315     static CMICmdBase *CreateSelf(void);
316
317     // Methods:
318   public:
319     /* ctor */ CMICmdCmdExecArguments(void);
320
321     // Overridden:
322   public:
323     // From CMICmdInvoker::ICmd
324     bool Execute(void) override;
325     bool Acknowledge(void) override;
326     bool ParseArgs(void) override;
327     // From CMICmnBase
328     /* dtor */ ~CMICmdCmdExecArguments(void) override;
329
330     // Attributes:
331   private:
332     const CMIUtilString m_constStrArgArguments;
333 };
334
335 //++ ============================================================================
336 // Details: MI command class. MI commands derived from the command base class.
337 //          *this class implements MI command "exec-abort".
338 //--
339 class CMICmdCmdExecAbort : public CMICmdBase
340 {
341     // Statics:
342   public:
343     // Required by the CMICmdFactory when registering *this command
344     static CMICmdBase *CreateSelf(void);
345
346     // Methods:
347   public:
348     /* ctor */ CMICmdCmdExecAbort(void);
349
350     // Overridden:
351   public:
352     // From CMICmdInvoker::ICmd
353     bool Execute(void) override;
354     bool Acknowledge(void) override;
355     // From CMICmnBase
356     /* dtor */ ~CMICmdCmdExecAbort(void) override;
357 };