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