]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h
Merge ^/head r295902 through r296006.
[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 } ExecutionPolicy;
173
174 //----------------------------------------------------------------------
175 // Ways that the FormatManager picks a particular format for a type
176 //----------------------------------------------------------------------
177 typedef enum FormatterChoiceCriterion
178 {
179     eFormatterChoiceCriterionDirectChoice =                  0x00000000,
180     eFormatterChoiceCriterionStrippedPointerReference =      0x00000001,
181     eFormatterChoiceCriterionNavigatedTypedefs =             0x00000002,
182     eFormatterChoiceCriterionRegularExpressionSummary =      0x00000004,
183     eFormatterChoiceCriterionRegularExpressionFilter =       0x00000004,
184     eFormatterChoiceCriterionLanguagePlugin =                0x00000008,
185     eFormatterChoiceCriterionStrippedBitField =              0x00000010,
186     eFormatterChoiceCriterionWentToStaticValue =             0x00000020
187 } FormatterChoiceCriterion;
188
189 //----------------------------------------------------------------------
190 // Synchronicity behavior of scripted commands
191 //----------------------------------------------------------------------
192 typedef enum ScriptedCommandSynchronicity
193 {
194     eScriptedCommandSynchronicitySynchronous,
195     eScriptedCommandSynchronicityAsynchronous,
196     eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is
197 } ScriptedCommandSynchronicity;
198
199 //----------------------------------------------------------------------
200 // Verbosity mode of "po" output
201 //----------------------------------------------------------------------
202 typedef enum LanguageRuntimeDescriptionDisplayVerbosity
203 {
204     eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the description string, if any
205     eLanguageRuntimeDescriptionDisplayVerbosityFull,    // print the full-blown output
206 } LanguageRuntimeDescriptionDisplayVerbosity;
207
208 //----------------------------------------------------------------------
209 // Loading modules from memory
210 //----------------------------------------------------------------------
211 typedef enum MemoryModuleLoadLevel {
212     eMemoryModuleLoadLevelMinimal,  // Load sections only
213     eMemoryModuleLoadLevelPartial,  // Load function bounds but no symbols
214     eMemoryModuleLoadLevelComplete, // Load sections and all symbols
215 } MemoryModuleLoadLevel;
216     
217
218 //----------------------------------------------------------------------
219 // Result enums for when reading multiple lines from IOHandlers
220 //----------------------------------------------------------------------
221 enum class LineStatus {
222     Success,    // The line that was just edited if good and should be added to the lines
223     Error,      // There is an error with the current line and it needs to be re-edited before it can be accepted
224     Done        // Lines are complete
225 };
226
227 //----------------------------------------------------------------------
228 // Exit Type for inferior processes
229 //----------------------------------------------------------------------
230 typedef enum ExitType {
231     eExitTypeInvalid,
232     eExitTypeExit,    // The exit status represents the return code from normal program exit (i.e. WIFEXITED() was true)
233     eExitTypeSignal,  // The exit status represents the signal number that caused the program to exit (i.e. WIFSIGNALED() was true)
234     eExitTypeStop,    // The exit status represents the stop signal that caused the program to exit (i.e. WIFSTOPPED() was true)
235 } ExitType;
236
237 //----------------------------------------------------------------------
238 // Boolean result of running a Type Validator
239 //----------------------------------------------------------------------
240 enum class TypeValidatorResult : bool {
241     Success = true,
242     Failure = false
243 };
244
245 //----------------------------------------------------------------------
246 // Enumerations that can be used to specify scopes types when looking up
247 // types.
248 //----------------------------------------------------------------------
249 enum class CompilerContextKind
250 {
251     Invalid = 0,
252     TranslationUnit,
253     Module,
254     Namespace,
255     Class,
256     Structure,
257     Union,
258     Function,
259     Variable,
260     Enumeration,
261     Typedef
262 };
263     
264 } // namespace lldb_private
265
266
267 #endif  // LLDB_lldb_private_enumerations_h_