]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/lldb-mi/MICmdCmdStack.h
Vendor import of (stripped) lldb trunk r242221:
[FreeBSD/FreeBSD.git] / tools / lldb-mi / MICmdCmdStack.h
1 //===-- MICmdCmdStack.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:    CMICmdCmdStackInfoDepth         interface.
11 //              CMICmdCmdStackInfoFrame         interface.
12 //              CMICmdCmdStackListFrames        interface.
13 //              CMICmdCmdStackListArguments     interface.
14 //              CMICmdCmdStackListLocals        interface.
15 //              CMICmdCmdStackSelectFrame       interface.
16 //
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:
20 //                  MICmdCommands.cpp
21 //                  MICmdBase.h / .cpp
22 //                  MICmdCmd.h / .cpp
23 //              For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
24 //              command class as an example.
25
26 #pragma once
27
28 // In-house headers:
29 #include "MICmdBase.h"
30 #include "MICmnMIValueList.h"
31 #include "MICmnMIValueTuple.h"
32
33 //++ ============================================================================
34 // Details: MI command class. MI commands derived from the command base class.
35 //          *this class implements MI command "stack-info-depth".
36 // Gotchas: None.
37 // Authors: Illya Rudkin 21/03/2014.
38 // Changes: None.
39 //--
40 class CMICmdCmdStackInfoDepth : public CMICmdBase
41 {
42     // Statics:
43   public:
44     // Required by the CMICmdFactory when registering *this command
45     static CMICmdBase *CreateSelf(void);
46
47     // Methods:
48   public:
49     /* ctor */ CMICmdCmdStackInfoDepth(void);
50
51     // Overridden:
52   public:
53     // From CMICmdInvoker::ICmd
54     bool Execute(void) override;
55     bool Acknowledge(void) override;
56     bool ParseArgs(void) override;
57     // From CMICmnBase
58     /* dtor */ ~CMICmdCmdStackInfoDepth(void) override;
59
60     // Attributes:
61   private:
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
65 };
66
67 //++ ============================================================================
68 // Details: MI command class. MI commands derived from the command base class.
69 //          *this class implements MI command "stack-info-frame".
70 //--
71 class CMICmdCmdStackInfoFrame : public CMICmdBase
72 {
73     // Statics:
74   public:
75     // Required by the CMICmdFactory when registering *this command
76     static CMICmdBase *CreateSelf(void);
77
78     // Methods:
79   public:
80     /* ctor */ CMICmdCmdStackInfoFrame(void);
81
82     // Overridden:
83   public:
84     // From CMICmdInvoker::ICmd
85     bool Execute(void) override;
86     bool Acknowledge(void) override;
87     bool ParseArgs(void) override;
88     // From CMICmnBase
89     /* dtor */ ~CMICmdCmdStackInfoFrame(void) override;
90
91     // Attributes:
92   private:
93     CMICmnMIValueTuple m_miValueTuple;
94 };
95
96 //++ ============================================================================
97 // Details: MI command class. MI commands derived from the command base class.
98 //          *this class implements MI command "stack-list-frames".
99 // Gotchas: None.
100 // Authors: Illya Rudkin 21/03/2014.
101 // Changes: None.
102 //--
103 class CMICmdCmdStackListFrames : public CMICmdBase
104 {
105     // Statics:
106   public:
107     // Required by the CMICmdFactory when registering *this command
108     static CMICmdBase *CreateSelf(void);
109
110     // Methods:
111   public:
112     /* ctor */ CMICmdCmdStackListFrames(void);
113
114     // Overridden:
115   public:
116     // From CMICmdInvoker::ICmd
117     bool Execute(void) override;
118     bool Acknowledge(void) override;
119     bool ParseArgs(void) override;
120     // From CMICmnBase
121     /* dtor */ ~CMICmdCmdStackListFrames(void) override;
122
123     // Typedefs:
124   private:
125     typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
126
127     // Attributes:
128   private:
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;
134 };
135
136 //++ ============================================================================
137 // Details: MI command class. MI commands derived from the command base class.
138 //          *this class implements MI command "stack-list-arguments".
139 // Gotchas: None.
140 // Authors: Illya Rudkin 24/03/2014.
141 // Changes: None.
142 //--
143 class CMICmdCmdStackListArguments : public CMICmdBase
144 {
145     // Statics:
146   public:
147     // Required by the CMICmdFactory when registering *this command
148     static CMICmdBase *CreateSelf(void);
149
150     // Methods:
151   public:
152     /* ctor */ CMICmdCmdStackListArguments(void);
153
154     // Overridden:
155   public:
156     // From CMICmdInvoker::ICmd
157     bool Execute(void) override;
158     bool Acknowledge(void) override;
159     bool ParseArgs(void) override;
160     // From CMICmnBase
161     /* dtor */ ~CMICmdCmdStackListArguments(void) override;
162
163     // Attributes:
164   private:
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;
171 };
172
173 //++ ============================================================================
174 // Details: MI command class. MI commands derived from the command base class.
175 //          *this class implements MI command "stack-list-locals".
176 // Gotchas: None.
177 // Authors: Illya Rudkin 24/03/2014.
178 // Changes: None.
179 //--
180 class CMICmdCmdStackListLocals : public CMICmdBase
181 {
182     // Statics:
183   public:
184     // Required by the CMICmdFactory when registering *this command
185     static CMICmdBase *CreateSelf(void);
186
187     // Methods:
188   public:
189     /* ctor */ CMICmdCmdStackListLocals(void);
190
191     // Overridden:
192   public:
193     // From CMICmdInvoker::ICmd
194     bool Execute(void) override;
195     bool Acknowledge(void) override;
196     bool ParseArgs(void) override;
197     // From CMICmnBase
198     /* dtor */ ~CMICmdCmdStackListLocals(void) override;
199
200     // Attributes:
201   private:
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;
207 };
208
209 //++ ============================================================================
210 // Details: MI command class. MI commands derived from the command base class.
211 //          *this class implements MI command "stack-list-variables".
212 //--
213 class CMICmdCmdStackListVariables : public CMICmdBase
214 {
215     // Statics:
216 public:
217     // Required by the CMICmdFactory when registering *this command
218     static CMICmdBase *CreateSelf(void);
219     
220     // Methods:
221 public:
222     /* ctor */ CMICmdCmdStackListVariables(void);
223     
224     // Overridden:
225 public:
226     // From CMICmdInvoker::ICmd
227     bool Execute(void) override;
228     bool Acknowledge(void) override;
229     bool ParseArgs(void) override;
230     // From CMICmnBase
231     /* dtor */ ~CMICmdCmdStackListVariables(void) override;
232     
233     // Attributes
234 private:
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;
240 };
241
242 //++ ============================================================================
243 // Details: MI command class. MI commands derived from the command base class.
244 //          *this class implements MI command "stack-select-frame".
245 //--
246 class CMICmdCmdStackSelectFrame : public CMICmdBase
247 {
248     // Statics:
249   public:
250     // Required by the CMICmdFactory when registering *this command
251     static CMICmdBase *CreateSelf(void);
252
253     // Methods:
254   public:
255     /* ctor */ CMICmdCmdStackSelectFrame(void);
256
257     // Overridden:
258   public:
259     // From CMICmdInvoker::ICmd
260     bool Execute(void) override;
261     bool Acknowledge(void) override;
262     bool ParseArgs(void) override;
263     // From CMICmnBase
264     /* dtor */ ~CMICmdCmdStackSelectFrame(void) override;
265
266     // Attributes:
267   private:
268     bool m_bFrameInvalid; // True = yes invalid frame, false = ok
269     const CMIUtilString m_constStrArgFrame;
270 };