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 109 //---------------------------------------------------------------------- 110 // Used in conjunction with Host::GetLLDBPath () to find files that 111 // are related to 112 //---------------------------------------------------------------------- 113 typedef enum PathType 114 { 115 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists 116 ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc) 117 ePathTypeHeaderDir, // Find LLDB header file directory 118 ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory 119 ePathTypeLLDBSystemPlugins, // System plug-ins directory 120 ePathTypeLLDBUserPlugins, // User plug-ins directory 121 ePathTypeLLDBTempSystemDir // The LLDB temp directory for this system 122 123 } PathType; 124 125 126 //---------------------------------------------------------------------- 127 // We can execute ThreadPlans on one thread with various fall-back modes 128 // (try other threads after timeout, etc.) This enum gives the result of 129 // thread plan executions. 130 //---------------------------------------------------------------------- 131 typedef enum ExecutionResults 132 { 133 eExecutionSetupError, 134 eExecutionCompleted, 135 eExecutionDiscarded, 136 eExecutionInterrupted, 137 eExecutionHitBreakpoint, 138 eExecutionTimedOut, 139 eExecutionStoppedForDebug 140 } ExecutionResults; 141 142 typedef enum ObjCRuntimeVersions { 143 eObjC_VersionUnknown = 0, 144 eAppleObjC_V1 = 1, 145 eAppleObjC_V2 = 2 146 } ObjCRuntimeVersions; 147 148 149 //---------------------------------------------------------------------- 150 // LazyBool is for boolean values that need to be calculated lazily. 151 // Values start off set to eLazyBoolCalculate, and then they can be 152 // calculated once and set to eLazyBoolNo or eLazyBoolYes. 153 //---------------------------------------------------------------------- 154 typedef enum LazyBool { 155 eLazyBoolCalculate = -1, 156 eLazyBoolNo = 0, 157 eLazyBoolYes = 1 158 } LazyBool; 159 160 //------------------------------------------------------------------ 161 /// Name matching 162 //------------------------------------------------------------------ 163 typedef enum NameMatchType 164 { 165 eNameMatchIgnore, 166 eNameMatchEquals, 167 eNameMatchContains, 168 eNameMatchStartsWith, 169 eNameMatchEndsWith, 170 eNameMatchRegularExpression 171 172 } NameMatchType; 173 174 175 //------------------------------------------------------------------ 176 /// Instruction types 177 //------------------------------------------------------------------ 178 typedef enum InstructionType 179 { 180 eInstructionTypeAny, // Support for any instructions at all (at least one) 181 eInstructionTypePrologueEpilogue, // All prologue and epilogue instructons that push and pop register values and modify sp/fp 182 eInstructionTypePCModifying, // Any instruction that modifies the program counter/instruction pointer 183 eInstructionTypeAll // All instructions of any kind 184 185 } InstructionType; 186 187 188 //------------------------------------------------------------------ 189 /// Format category entry types 190 //------------------------------------------------------------------ 191 typedef enum FormatCategoryItem 192 { 193 eFormatCategoryItemSummary = 0x0001, 194 eFormatCategoryItemRegexSummary = 0x0002, 195 eFormatCategoryItemFilter = 0x0004, 196 eFormatCategoryItemRegexFilter = 0x0008, 197 eFormatCategoryItemSynth = 0x0010, 198 eFormatCategoryItemRegexSynth = 0x0020, 199 eFormatCategoryItemValue = 0x0040, 200 eFormatCategoryItemRegexValue = 0x0080 201 } FormatCategoryItem; 202 203 //------------------------------------------------------------------ 204 /// Expression execution policies 205 //------------------------------------------------------------------ 206 typedef enum { 207 eExecutionPolicyOnlyWhenNeeded, 208 eExecutionPolicyNever, 209 eExecutionPolicyAlways 210 } ExecutionPolicy; 211 212 //---------------------------------------------------------------------- 213 // Ways that the FormatManager picks a particular format for a type 214 //---------------------------------------------------------------------- 215 typedef enum FormatterChoiceCriterion 216 { 217 eFormatterChoiceCriterionDirectChoice = 0x00000000, 218 eFormatterChoiceCriterionStrippedPointerReference = 0x00000001, 219 eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002, 220 eFormatterChoiceCriterionRegularExpressionSummary = 0x00000004, 221 eFormatterChoiceCriterionRegularExpressionFilter = 0x00000004, 222 eFormatterChoiceCriterionDynamicObjCDiscovery = 0x00000008, 223 eFormatterChoiceCriterionStrippedBitField = 0x00000010, 224 eFormatterChoiceCriterionWentToStaticValue = 0x00000020 225 } FormatterChoiceCriterion; 226 227 //---------------------------------------------------------------------- 228 // Synchronicity behavior of scripted commands 229 //---------------------------------------------------------------------- 230 typedef enum ScriptedCommandSynchronicity 231 { 232 eScriptedCommandSynchronicitySynchronous, 233 eScriptedCommandSynchronicityAsynchronous, 234 eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is 235 } ScriptedCommandSynchronicity; 236 237 //---------------------------------------------------------------------- 238 // Verbosity mode of "po" output 239 //---------------------------------------------------------------------- 240 typedef enum LanguageRuntimeDescriptionDisplayVerbosity 241 { 242 eLanguageRuntimeDescriptionDisplayVerbosityCompact, // only print the description string, if any 243 eLanguageRuntimeDescriptionDisplayVerbosityFull, // print the full-blown output 244 } LanguageRuntimeDescriptionDisplayVerbosity; 245 246 //---------------------------------------------------------------------- 247 // Loading modules from memory 248 //---------------------------------------------------------------------- 249 typedef enum MemoryModuleLoadLevel { 250 eMemoryModuleLoadLevelMinimal, // Load sections only 251 eMemoryModuleLoadLevelPartial, // Load function bounds but no symbols 252 eMemoryModuleLoadLevelComplete, // Load sections and all symbols 253 } MemoryModuleLoadLevel; 254 255 256 //---------------------------------------------------------------------- 257 // Result enums for when reading multiple lines from IOHandlers 258 //---------------------------------------------------------------------- 259 enum class LineStatus { 260 Success, // The line that was just edited if good and should be added to the lines 261 Error, // There is an error with the current line and it needs to be re-edited before it can be accepted 262 Done // Lines are complete 263 }; 264 265 } // namespace lldb_private 266 267 268 #endif // LLDB_lldb_private_enumerations_h_ 269