]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h
Merge ^/head r305220 through r305300.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / lldb-private-enumerations.h
1 //===-- lldb-private-enumerations.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 #ifndef LLDB_lldb_private_enumerations_h_
11 #define LLDB_lldb_private_enumerations_h_
12
13 namespace lldb_private {
14
15 //----------------------------------------------------------------------
16 // Thread Step Types
17 //----------------------------------------------------------------------
18 typedef enum StepType
19 {
20     eStepTypeNone,
21     eStepTypeTrace,     ///< Single step one instruction.
22     eStepTypeTraceOver, ///< Single step one instruction, stepping over.
23     eStepTypeInto,      ///< Single step into a specified context.
24     eStepTypeOver,      ///< Single step over a specified context.
25     eStepTypeOut,       ///< Single step out a specified context.
26     eStepTypeScripted   ///< A step type implemented by the script interpreter.
27 } StepType;
28
29 //----------------------------------------------------------------------
30 // Address Types
31 //----------------------------------------------------------------------
32 typedef enum AddressType
33 {
34     eAddressTypeInvalid = 0,
35     eAddressTypeFile, ///< Address is an address as found in an object or symbol file
36     eAddressTypeLoad, ///< Address is an address as in the current target inferior process
37     eAddressTypeHost  ///< Address is an address in the process that is running this code
38 } AddressType;
39
40 //----------------------------------------------------------------------
41 // Votes - Need a tri-state, yes, no, no opinion...
42 //----------------------------------------------------------------------
43 typedef enum Vote
44 {
45     eVoteNo         = -1,
46     eVoteNoOpinion  =  0,
47     eVoteYes        =  1
48 } Vote;
49
50 typedef enum ArchitectureType 
51 {
52     eArchTypeInvalid,
53     eArchTypeMachO,
54     eArchTypeELF,
55     eArchTypeCOFF,
56     kNumArchTypes
57 } ArchitectureType;
58
59 //----------------------------------------------------------------------
60 /// Settable state variable types.
61 ///
62 //----------------------------------------------------------------------
63
64 //typedef enum SettableVariableType
65 //{
66 //    eSetVarTypeInt,
67 //    eSetVarTypeBoolean,
68 //    eSetVarTypeString,
69 //    eSetVarTypeArray,
70 //    eSetVarTypeDictionary,
71 //    eSetVarTypeEnum,
72 //    eSetVarTypeNone
73 //} SettableVariableType;
74
75 typedef enum VarSetOperationType
76 {
77     eVarSetOperationReplace,
78     eVarSetOperationInsertBefore,
79     eVarSetOperationInsertAfter,
80     eVarSetOperationRemove,
81     eVarSetOperationAppend,
82     eVarSetOperationClear,
83     eVarSetOperationAssign,
84     eVarSetOperationInvalid
85 } VarSetOperationType;
86
87 typedef enum ArgumentRepetitionType
88 {
89     eArgRepeatPlain,            // Exactly one occurrence
90     eArgRepeatOptional,         // At most one occurrence, but it's optional
91     eArgRepeatPlus,             // One or more occurrences
92     eArgRepeatStar,             // Zero or more occurrences
93     eArgRepeatRange,            // Repetition of same argument, from 1 to n
94     eArgRepeatPairPlain,        // A pair of arguments that must always go together ([arg-type arg-value]), occurs exactly once
95     eArgRepeatPairOptional,     // A pair that occurs at most once (optional)
96     eArgRepeatPairPlus,         // One or more occurrences of a pair
97     eArgRepeatPairStar,         // Zero or more occurrences of a pair
98     eArgRepeatPairRange,        // A pair that repeats from 1 to n
99     eArgRepeatPairRangeOptional // A pair that repeats from 1 to n, but is optional
100 } ArgumentRepetitionType;
101
102 typedef enum SortOrder
103 {
104     eSortOrderNone,
105     eSortOrderByAddress,
106     eSortOrderByName
107 } SortOrder;
108
109 //----------------------------------------------------------------------
110 // LazyBool is for boolean values that need to be calculated lazily.
111 // Values start off set to eLazyBoolCalculate, and then they can be
112 // calculated once and set to eLazyBoolNo or eLazyBoolYes.
113 //----------------------------------------------------------------------
114 typedef enum LazyBool {
115     eLazyBoolCalculate  = -1,
116     eLazyBoolNo         = 0,
117     eLazyBoolYes        = 1
118 } LazyBool;
119
120 //------------------------------------------------------------------
121 /// Name matching
122 //------------------------------------------------------------------
123 typedef enum NameMatchType
124 {
125     eNameMatchIgnore,
126     eNameMatchEquals,
127     eNameMatchContains,
128     eNameMatchStartsWith,
129     eNameMatchEndsWith,
130     eNameMatchRegularExpression
131     
132 } NameMatchType;
133
134
135 //------------------------------------------------------------------
136 /// Instruction types
137 //------------------------------------------------------------------    
138 typedef enum InstructionType
139 {
140     eInstructionTypeAny,                // Support for any instructions at all (at least one)
141     eInstructionTypePrologueEpilogue,   // All prologue and epilogue instructions that push and pop register values and modify sp/fp
142     eInstructionTypePCModifying,        // Any instruction that modifies the program counter/instruction pointer
143     eInstructionTypeAll                 // All instructions of any kind
144
145 }  InstructionType;
146     
147     
148 //------------------------------------------------------------------
149 /// Format category entry types
150 //------------------------------------------------------------------    
151 typedef enum FormatCategoryItem
152 {
153     eFormatCategoryItemSummary =         0x0001,
154     eFormatCategoryItemRegexSummary =    0x0002,
155     eFormatCategoryItemFilter =          0x0004,
156     eFormatCategoryItemRegexFilter =     0x0008,
157     eFormatCategoryItemSynth =           0x0010,
158     eFormatCategoryItemRegexSynth =      0x0020,
159     eFormatCategoryItemValue =           0x0040,
160     eFormatCategoryItemRegexValue =      0x0080,
161     eFormatCategoryItemValidator =       0x0100,
162     eFormatCategoryItemRegexValidator =  0x0200
163 } FormatCategoryItem;
164
165 //------------------------------------------------------------------
166 /// Expression execution policies
167 //------------------------------------------------------------------
168 typedef enum {
169     eExecutionPolicyOnlyWhenNeeded,
170     eExecutionPolicyNever,
171     eExecutionPolicyAlways,
172     eExecutionPolicyTopLevel // used for top-level code
173 } ExecutionPolicy;
174
175 //----------------------------------------------------------------------
176 // Ways that the FormatManager picks a particular format for a type
177 //----------------------------------------------------------------------
178 typedef enum FormatterChoiceCriterion
179 {
180     eFormatterChoiceCriterionDirectChoice =                  0x00000000,
181     eFormatterChoiceCriterionStrippedPointerReference =      0x00000001,
182     eFormatterChoiceCriterionNavigatedTypedefs =             0x00000002,
183     eFormatterChoiceCriterionRegularExpressionSummary =      0x00000004,
184     eFormatterChoiceCriterionRegularExpressionFilter =       0x00000004,
185     eFormatterChoiceCriterionLanguagePlugin =                0x00000008,
186     eFormatterChoiceCriterionStrippedBitField =              0x00000010,
187     eFormatterChoiceCriterionWentToStaticValue =             0x00000020
188 } FormatterChoiceCriterion;
189
190 //----------------------------------------------------------------------
191 // Synchronicity behavior of scripted commands
192 //----------------------------------------------------------------------
193 typedef enum ScriptedCommandSynchronicity
194 {
195     eScriptedCommandSynchronicitySynchronous,
196     eScriptedCommandSynchronicityAsynchronous,
197     eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is
198 } ScriptedCommandSynchronicity;
199
200 //----------------------------------------------------------------------
201 // Verbosity mode of "po" output
202 //----------------------------------------------------------------------
203 typedef enum LanguageRuntimeDescriptionDisplayVerbosity
204 {
205     eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the description string, if any
206     eLanguageRuntimeDescriptionDisplayVerbosityFull,    // print the full-blown output
207 } LanguageRuntimeDescriptionDisplayVerbosity;
208
209 //----------------------------------------------------------------------
210 // Loading modules from memory
211 //----------------------------------------------------------------------
212 typedef enum MemoryModuleLoadLevel {
213     eMemoryModuleLoadLevelMinimal,  // Load sections only
214     eMemoryModuleLoadLevelPartial,  // Load function bounds but no symbols
215     eMemoryModuleLoadLevelComplete, // Load sections and all symbols
216 } MemoryModuleLoadLevel;
217     
218
219 //----------------------------------------------------------------------
220 // Result enums for when reading multiple lines from IOHandlers
221 //----------------------------------------------------------------------
222 enum class LineStatus {
223     Success,    // The line that was just edited if good and should be added to the lines
224     Error,      // There is an error with the current line and it needs to be re-edited before it can be accepted
225     Done        // Lines are complete
226 };
227
228 //----------------------------------------------------------------------
229 // Exit Type for inferior processes
230 //----------------------------------------------------------------------
231 typedef enum ExitType {
232     eExitTypeInvalid,
233     eExitTypeExit,    // The exit status represents the return code from normal program exit (i.e. WIFEXITED() was true)
234     eExitTypeSignal,  // The exit status represents the signal number that caused the program to exit (i.e. WIFSIGNALED() was true)
235     eExitTypeStop,    // The exit status represents the stop signal that caused the program to exit (i.e. WIFSTOPPED() was true)
236 } ExitType;
237
238 //----------------------------------------------------------------------
239 // Boolean result of running a Type Validator
240 //----------------------------------------------------------------------
241 enum class TypeValidatorResult : bool {
242     Success = true,
243     Failure = false
244 };
245
246 //----------------------------------------------------------------------
247 // Enumerations that can be used to specify scopes types when looking up
248 // types.
249 //----------------------------------------------------------------------
250 enum class CompilerContextKind
251 {
252     Invalid = 0,
253     TranslationUnit,
254     Module,
255     Namespace,
256     Class,
257     Structure,
258     Union,
259     Function,
260     Variable,
261     Enumeration,
262     Typedef
263 };
264     
265 } // namespace lldb_private
266
267
268 #endif  // LLDB_lldb_private_enumerations_h_