]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdStack.h
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / 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 //++
11 // File:        MICmdCmdStack.h
12 //
13 // Overview:    CMICmdCmdStackInfoDepth         interface.
14 //              CMICmdCmdStackListFrames        interface.
15 //              CMICmdCmdStackListArguments     interface.
16 //              CMICmdCmdStackListLocals        interface.
17 //
18 //              To implement new MI commands derive a new command class from the command base
19 //              class. To enable the new command for interpretation add the new command class
20 //              to the command factory. The files of relevance are:
21 //                  MICmdCommands.cpp
22 //                  MICmdBase.h / .cpp
23 //                  MICmdCmd.h / .cpp
24 //              For an introduction to adding a new command see CMICmdCmdSupportInfoMiCmdQuery
25 //              command class as an example.
26 //
27 // Environment: Compilers:  Visual C++ 12.
28 //                          gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29 //              Libraries:  See MIReadmetxt.
30 //
31 // Copyright:   None.
32 //--
33
34 #pragma once
35
36 // In-house headers:
37 #include "MICmdBase.h"
38 #include "MICmnMIValueList.h"
39
40 //++ ============================================================================
41 // Details: MI command class. MI commands derived from the command base class.
42 //          *this class implements MI command "stack-info-depth".
43 // Gotchas: None.
44 // Authors: Illya Rudkin 21/03/2014.
45 // Changes: None.
46 //--
47 class CMICmdCmdStackInfoDepth : public CMICmdBase
48 {
49     // Statics:
50   public:
51     // Required by the CMICmdFactory when registering *this command
52     static CMICmdBase *CreateSelf(void);
53
54     // Methods:
55   public:
56     /* ctor */ CMICmdCmdStackInfoDepth(void);
57
58     // Overridden:
59   public:
60     // From CMICmdInvoker::ICmd
61     virtual bool Execute(void);
62     virtual bool Acknowledge(void);
63     virtual bool ParseArgs(void);
64     // From CMICmnBase
65     /* dtor */ virtual ~CMICmdCmdStackInfoDepth(void);
66
67     // Attributes:
68   private:
69     MIuint m_nThreadFrames;
70     const CMIUtilString m_constStrArgThread;   // Not specified in MI spec but Eclipse gives this option
71     const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
72 };
73
74 //++ ============================================================================
75 // Details: MI command class. MI commands derived from the command base class.
76 //          *this class implements MI command "stack-list-frames".
77 // Gotchas: None.
78 // Authors: Illya Rudkin 21/03/2014.
79 // Changes: None.
80 //--
81 class CMICmdCmdStackListFrames : public CMICmdBase
82 {
83     // Statics:
84   public:
85     // Required by the CMICmdFactory when registering *this command
86     static CMICmdBase *CreateSelf(void);
87
88     // Methods:
89   public:
90     /* ctor */ CMICmdCmdStackListFrames(void);
91
92     // Overridden:
93   public:
94     // From CMICmdInvoker::ICmd
95     virtual bool Execute(void);
96     virtual bool Acknowledge(void);
97     virtual bool ParseArgs(void);
98     // From CMICmnBase
99     /* dtor */ virtual ~CMICmdCmdStackListFrames(void);
100
101     // Typedefs:
102   private:
103     typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
104
105     // Attributes:
106   private:
107     MIuint m_nThreadFrames;
108     VecMIValueResult_t m_vecMIValueResult;
109     const CMIUtilString m_constStrArgThread; // Not specified in MI spec but Eclipse gives this option
110     const CMIUtilString m_constStrArgFrameLow;
111     const CMIUtilString m_constStrArgFrameHigh;
112 };
113
114 //++ ============================================================================
115 // Details: MI command class. MI commands derived from the command base class.
116 //          *this class implements MI command "stack-list-arguments".
117 // Gotchas: None.
118 // Authors: Illya Rudkin 24/03/2014.
119 // Changes: None.
120 //--
121 class CMICmdCmdStackListArguments : public CMICmdBase
122 {
123     // Statics:
124   public:
125     // Required by the CMICmdFactory when registering *this command
126     static CMICmdBase *CreateSelf(void);
127
128     // Methods:
129   public:
130     /* ctor */ CMICmdCmdStackListArguments(void);
131
132     // Overridden:
133   public:
134     // From CMICmdInvoker::ICmd
135     virtual bool Execute(void);
136     virtual bool Acknowledge(void);
137     virtual bool ParseArgs(void);
138     // From CMICmnBase
139     /* dtor */ virtual ~CMICmdCmdStackListArguments(void);
140
141     // Attributes:
142   private:
143     bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
144     CMICmnMIValueList m_miValueList;
145     const CMIUtilString m_constStrArgThread;      // Not specified in MI spec but Eclipse gives this option
146     const CMIUtilString m_constStrArgPrintValues; // Not handled by *this command
147 };
148
149 //++ ============================================================================
150 // Details: MI command class. MI commands derived from the command base class.
151 //          *this class implements MI command "stack-list-locals".
152 // Gotchas: None.
153 // Authors: Illya Rudkin 24/03/2014.
154 // Changes: None.
155 //--
156 class CMICmdCmdStackListLocals : public CMICmdBase
157 {
158     // Statics:
159   public:
160     // Required by the CMICmdFactory when registering *this command
161     static CMICmdBase *CreateSelf(void);
162
163     // Methods:
164   public:
165     /* ctor */ CMICmdCmdStackListLocals(void);
166
167     // Overridden:
168   public:
169     // From CMICmdInvoker::ICmd
170     virtual bool Execute(void);
171     virtual bool Acknowledge(void);
172     virtual bool ParseArgs(void);
173     // From CMICmnBase
174     /* dtor */ virtual ~CMICmdCmdStackListLocals(void);
175
176     // Attributes:
177   private:
178     bool m_bThreadInvalid; // True = yes invalid thread, false = thread object valid
179     CMICmnMIValueList m_miValueList;
180     const CMIUtilString m_constStrArgThread;      // Not specified in MI spec but Eclipse gives this option
181     const CMIUtilString m_constStrArgFrame;       // Not specified in MI spec but Eclipse gives this option
182     const CMIUtilString m_constStrArgPrintValues; // Not handled by *this command
183 };