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