• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     kNumArchTypes
55 } ArchitectureType;
56 
57 //----------------------------------------------------------------------
58 /// Settable state variable types.
59 ///
60 //----------------------------------------------------------------------
61 
62 //typedef enum SettableVariableType
63 //{
64 //    eSetVarTypeInt,
65 //    eSetVarTypeBoolean,
66 //    eSetVarTypeString,
67 //    eSetVarTypeArray,
68 //    eSetVarTypeDictionary,
69 //    eSetVarTypeEnum,
70 //    eSetVarTypeNone
71 //} SettableVariableType;
72 
73 typedef enum VarSetOperationType
74 {
75     eVarSetOperationReplace,
76     eVarSetOperationInsertBefore,
77     eVarSetOperationInsertAfter,
78     eVarSetOperationRemove,
79     eVarSetOperationAppend,
80     eVarSetOperationClear,
81     eVarSetOperationAssign,
82     eVarSetOperationInvalid
83 } VarSetOperationType;
84 
85 typedef enum ArgumentRepetitionType
86 {
87     eArgRepeatPlain,            // Exactly one occurrence
88     eArgRepeatOptional,         // At most one occurrence, but it's optional
89     eArgRepeatPlus,             // One or more occurrences
90     eArgRepeatStar,             // Zero or more occurrences
91     eArgRepeatRange,            // Repetition of same argument, from 1 to n
92     eArgRepeatPairPlain,        // A pair of arguments that must always go together ([arg-type arg-value]), occurs exactly once
93     eArgRepeatPairOptional,     // A pair that occurs at most once (optional)
94     eArgRepeatPairPlus,         // One or more occurrences of a pair
95     eArgRepeatPairStar,         // Zero or more occurrences of a pair
96     eArgRepeatPairRange,        // A pair that repeats from 1 to n
97     eArgRepeatPairRangeOptional // A pair that repeats from 1 to n, but is optional
98 } ArgumentRepetitionType;
99 
100 typedef enum SortOrder
101 {
102     eSortOrderNone,
103     eSortOrderByAddress,
104     eSortOrderByName
105 } SortOrder;
106 
107 
108 //----------------------------------------------------------------------
109 // Used in conjunction with Host::GetLLDBPath () to find files that
110 // are related to
111 //----------------------------------------------------------------------
112 typedef enum PathType
113 {
114     ePathTypeLLDBShlibDir,          // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
115     ePathTypeSupportExecutableDir,  // Find LLDB support executable directory (debugserver, etc)
116     ePathTypeHeaderDir,             // Find LLDB header file directory
117     ePathTypePythonDir,             // Find Python modules (PYTHONPATH) directory
118     ePathTypeLLDBSystemPlugins,     // System plug-ins directory
119     ePathTypeLLDBUserPlugins        // User plug-ins directory
120 } PathType;
121 
122 
123 //----------------------------------------------------------------------
124 // We can execute ThreadPlans on one thread with various fall-back modes
125 // (try other threads after timeout, etc.) This enum gives the result of
126 // thread plan executions.
127 //----------------------------------------------------------------------
128 typedef enum ExecutionResults
129 {
130     eExecutionSetupError,
131     eExecutionCompleted,
132     eExecutionDiscarded,
133     eExecutionInterrupted,
134     eExecutionHitBreakpoint,
135     eExecutionTimedOut
136 } ExecutionResults;
137 
138 typedef enum ObjCRuntimeVersions {
139     eObjC_VersionUnknown = 0,
140     eAppleObjC_V1 = 1,
141     eAppleObjC_V2 = 2
142 } ObjCRuntimeVersions;
143 
144 
145 //----------------------------------------------------------------------
146 // LazyBool is for boolean values that need to be calculated lazily.
147 // Values start off set to eLazyBoolCalculate, and then they can be
148 // calculated once and set to eLazyBoolNo or eLazyBoolYes.
149 //----------------------------------------------------------------------
150 typedef enum LazyBool {
151     eLazyBoolCalculate  = -1,
152     eLazyBoolNo         = 0,
153     eLazyBoolYes        = 1
154 } LazyBool;
155 
156 //------------------------------------------------------------------
157 /// Name matching
158 //------------------------------------------------------------------
159 typedef enum NameMatchType
160 {
161     eNameMatchIgnore,
162     eNameMatchEquals,
163     eNameMatchContains,
164     eNameMatchStartsWith,
165     eNameMatchEndsWith,
166     eNameMatchRegularExpression
167 
168 } NameMatchType;
169 
170 
171 //------------------------------------------------------------------
172 /// Instruction types
173 //------------------------------------------------------------------
174 typedef enum InstructionType
175 {
176     eInstructionTypeAny,                // Support for any instructions at all (at least one)
177     eInstructionTypePrologueEpilogue,   // All prologue and epilogue instructons that push and pop register values and modify sp/fp
178     eInstructionTypePCModifying,        // Any instruction that modifies the program counter/instruction pointer
179     eInstructionTypeAll                 // All instructions of any kind
180 
181 }  InstructionType;
182 
183 
184 //------------------------------------------------------------------
185 /// Format category entry types
186 //------------------------------------------------------------------
187 typedef enum FormatCategoryItem
188 {
189     eFormatCategoryItemSummary =         0x0001,
190     eFormatCategoryItemRegexSummary =    0x0002,
191     eFormatCategoryItemFilter =          0x0004,
192     eFormatCategoryItemRegexFilter =     0x0008,
193     eFormatCategoryItemSynth =           0x0010,
194     eFormatCategoryItemRegexSynth =      0x0020
195 } FormatCategoryItem;
196 
197 //------------------------------------------------------------------
198 /// Expression execution policies
199 //------------------------------------------------------------------
200 typedef enum {
201     eExecutionPolicyOnlyWhenNeeded,
202     eExecutionPolicyNever,
203     eExecutionPolicyAlways
204 } ExecutionPolicy;
205 
206 //----------------------------------------------------------------------
207 // Ways that the FormatManager picks a particular format for a type
208 //----------------------------------------------------------------------
209 typedef enum FormatterChoiceCriterion
210 {
211     eFormatterChoiceCriterionDirectChoice =                  0x00000000,
212     eFormatterChoiceCriterionStrippedPointerReference =      0x00000001,
213     eFormatterChoiceCriterionNavigatedTypedefs =             0x00000002,
214     eFormatterChoiceCriterionRegularExpressionSummary =      0x00000004,
215     eFormatterChoiceCriterionRegularExpressionFilter =       0x00000004,
216     eFormatterChoiceCriterionDynamicObjCDiscovery =          0x00000008,
217     eFormatterChoiceCriterionStrippedBitField =              0x00000010,
218     eFormatterChoiceCriterionWentToStaticValue =             0x00000020
219 } FormatterChoiceCriterion;
220 
221 //----------------------------------------------------------------------
222 // Synchronicity behavior of scripted commands
223 //----------------------------------------------------------------------
224 typedef enum ScriptedCommandSynchronicity
225 {
226     eScriptedCommandSynchronicitySynchronous,
227     eScriptedCommandSynchronicityAsynchronous,
228     eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is
229 } ScriptedCommandSynchronicity;
230 
231 } // namespace lldb_private
232 
233 
234 #endif  // LLDB_lldb_private_enumerations_h_
235