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 typedef enum ObjCRuntimeVersions { 110 eObjC_VersionUnknown = 0, 111 eAppleObjC_V1 = 1, 112 eAppleObjC_V2 = 2 113 } ObjCRuntimeVersions; 114 115 116 //---------------------------------------------------------------------- 117 // LazyBool is for boolean values that need to be calculated lazily. 118 // Values start off set to eLazyBoolCalculate, and then they can be 119 // calculated once and set to eLazyBoolNo or eLazyBoolYes. 120 //---------------------------------------------------------------------- 121 typedef enum LazyBool { 122 eLazyBoolCalculate = -1, 123 eLazyBoolNo = 0, 124 eLazyBoolYes = 1 125 } LazyBool; 126 127 //------------------------------------------------------------------ 128 /// Name matching 129 //------------------------------------------------------------------ 130 typedef enum NameMatchType 131 { 132 eNameMatchIgnore, 133 eNameMatchEquals, 134 eNameMatchContains, 135 eNameMatchStartsWith, 136 eNameMatchEndsWith, 137 eNameMatchRegularExpression 138 139 } NameMatchType; 140 141 142 //------------------------------------------------------------------ 143 /// Instruction types 144 //------------------------------------------------------------------ 145 typedef enum InstructionType 146 { 147 eInstructionTypeAny, // Support for any instructions at all (at least one) 148 eInstructionTypePrologueEpilogue, // All prologue and epilogue instructions that push and pop register values and modify sp/fp 149 eInstructionTypePCModifying, // Any instruction that modifies the program counter/instruction pointer 150 eInstructionTypeAll // All instructions of any kind 151 152 } InstructionType; 153 154 155 //------------------------------------------------------------------ 156 /// Format category entry types 157 //------------------------------------------------------------------ 158 typedef enum FormatCategoryItem 159 { 160 eFormatCategoryItemSummary = 0x0001, 161 eFormatCategoryItemRegexSummary = 0x0002, 162 eFormatCategoryItemFilter = 0x0004, 163 eFormatCategoryItemRegexFilter = 0x0008, 164 eFormatCategoryItemSynth = 0x0010, 165 eFormatCategoryItemRegexSynth = 0x0020, 166 eFormatCategoryItemValue = 0x0040, 167 eFormatCategoryItemRegexValue = 0x0080, 168 eFormatCategoryItemValidator = 0x0100, 169 eFormatCategoryItemRegexValidator = 0x0200 170 } FormatCategoryItem; 171 172 //------------------------------------------------------------------ 173 /// Expression execution policies 174 //------------------------------------------------------------------ 175 typedef enum { 176 eExecutionPolicyOnlyWhenNeeded, 177 eExecutionPolicyNever, 178 eExecutionPolicyAlways 179 } ExecutionPolicy; 180 181 //---------------------------------------------------------------------- 182 // Ways that the FormatManager picks a particular format for a type 183 //---------------------------------------------------------------------- 184 typedef enum FormatterChoiceCriterion 185 { 186 eFormatterChoiceCriterionDirectChoice = 0x00000000, 187 eFormatterChoiceCriterionStrippedPointerReference = 0x00000001, 188 eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002, 189 eFormatterChoiceCriterionRegularExpressionSummary = 0x00000004, 190 eFormatterChoiceCriterionRegularExpressionFilter = 0x00000004, 191 eFormatterChoiceCriterionDynamicObjCDiscovery = 0x00000008, 192 eFormatterChoiceCriterionStrippedBitField = 0x00000010, 193 eFormatterChoiceCriterionWentToStaticValue = 0x00000020 194 } FormatterChoiceCriterion; 195 196 //---------------------------------------------------------------------- 197 // Synchronicity behavior of scripted commands 198 //---------------------------------------------------------------------- 199 typedef enum ScriptedCommandSynchronicity 200 { 201 eScriptedCommandSynchronicitySynchronous, 202 eScriptedCommandSynchronicityAsynchronous, 203 eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is 204 } ScriptedCommandSynchronicity; 205 206 //---------------------------------------------------------------------- 207 // Verbosity mode of "po" output 208 //---------------------------------------------------------------------- 209 typedef enum LanguageRuntimeDescriptionDisplayVerbosity 210 { 211 eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the description string, if any 212 eLanguageRuntimeDescriptionDisplayVerbosityFull, // print the full-blown output 213 } LanguageRuntimeDescriptionDisplayVerbosity; 214 215 //---------------------------------------------------------------------- 216 // Loading modules from memory 217 //---------------------------------------------------------------------- 218 typedef enum MemoryModuleLoadLevel { 219 eMemoryModuleLoadLevelMinimal, // Load sections only 220 eMemoryModuleLoadLevelPartial, // Load function bounds but no symbols 221 eMemoryModuleLoadLevelComplete, // Load sections and all symbols 222 } MemoryModuleLoadLevel; 223 224 225 //---------------------------------------------------------------------- 226 // Result enums for when reading multiple lines from IOHandlers 227 //---------------------------------------------------------------------- 228 enum class LineStatus { 229 Success, // The line that was just edited if good and should be added to the lines 230 Error, // There is an error with the current line and it needs to be re-edited before it can be accepted 231 Done // Lines are complete 232 }; 233 234 //---------------------------------------------------------------------- 235 // Exit Type for inferior processes 236 //---------------------------------------------------------------------- 237 typedef enum ExitType { 238 eExitTypeInvalid, 239 eExitTypeExit, // The exit status represents the return code from normal program exit (i.e. WIFEXITED() was true) 240 eExitTypeSignal, // The exit status represents the signal number that caused the program to exit (i.e. WIFSIGNALED() was true) 241 eExitTypeStop, // The exit status represents the stop signal that caused the program to exit (i.e. WIFSTOPPED() was true) 242 } ExitType; 243 244 //---------------------------------------------------------------------- 245 // Boolean result of running a Type Validator 246 //---------------------------------------------------------------------- 247 enum class TypeValidatorResult : bool { 248 Success = true, 249 Failure = false 250 }; 251 252 } // namespace lldb_private 253 254 255 #endif // LLDB_lldb_private_enumerations_h_ 256