lldb-private-enumerations.h revision 7fb143064009e34dbb7a602924e9807375f72a46
1//===-- lldb-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 13namespace lldb_private { 14 15//---------------------------------------------------------------------- 16// Thread Step Types 17//---------------------------------------------------------------------- 18typedef 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//---------------------------------------------------------------------- 31typedef 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//---------------------------------------------------------------------- 42typedef enum Vote 43{ 44 eVoteNo = -1, 45 eVoteNoOpinion = 0, 46 eVoteYes = 1 47} Vote; 48 49typedef enum ArchitectureType 50{ 51 eArchTypeInvalid, 52 eArchTypeMachO, 53 eArchTypeELF, 54 kNumArchTypes 55} ArchitectureType; 56 57//---------------------------------------------------------------------- 58/// Settable state variable types. 59/// 60//---------------------------------------------------------------------- 61 62typedef enum SettableVariableType 63{ 64 eSetVarTypeInt, 65 eSetVarTypeBoolean, 66 eSetVarTypeString, 67 eSetVarTypeArray, 68 eSetVarTypeDictionary, 69 eSetVarTypeEnum, 70 eSetVarTypeNone 71} SettableVariableType; 72 73typedef enum VarSetOperationType 74{ 75 eVarSetOperationReplace, 76 eVarSetOperationInsertBefore, 77 eVarSetOperationInsertAfter, 78 eVarSetOperationRemove, 79 eVarSetOperationAppend, 80 eVarSetOperationClear, 81 eVarSetOperationAssign, 82 eVarSetOperationInvalid 83} VarSetOperationType; 84 85typedef 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 100typedef enum SortOrder 101{ 102 eSortOrderNone, 103 eSortOrderByAddress, 104 eSortOrderByName 105} SortOrder; 106 107 108//---------------------------------------------------------------------- 109// Used in conjunction with Host::GetLLDBResource () to find files that 110// are related to 111//---------------------------------------------------------------------- 112typedef 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//---------------------------------------------------------------------- 128typedef enum ExecutionResults 129{ 130 eExecutionSetupError, 131 eExecutionCompleted, 132 eExecutionDiscarded, 133 eExecutionInterrupted, 134 eExecutionTimedOut 135} ExecutionResults; 136 137typedef enum ObjCRuntimeVersions { 138 eObjC_VersionUnknown = 0, 139 eAppleObjC_V1 = 1, 140 eAppleObjC_V2 = 2 141} ObjCRuntimeVersions; 142 143 144//---------------------------------------------------------------------- 145// LazyBool is for boolean values that need to be calculated lazily. 146// Values start off set to eLazyBoolCalculate, and then they can be 147// calculated once and set to eLazyBoolNo or eLazyBoolYes. 148//---------------------------------------------------------------------- 149typedef enum LazyBool { 150 eLazyBoolCalculate = -1, 151 eLazyBoolNo = 0, 152 eLazyBoolYes = 1 153} LazyBool; 154 155//------------------------------------------------------------------ 156/// Name matching 157//------------------------------------------------------------------ 158typedef enum NameMatchType 159{ 160 eNameMatchIgnore, 161 eNameMatchEquals, 162 eNameMatchContains, 163 eNameMatchStartsWith, 164 eNameMatchEndsWith, 165 eNameMatchRegularExpression 166 167} NameMatchType; 168 169 170//------------------------------------------------------------------ 171/// Instruction types 172//------------------------------------------------------------------ 173typedef enum InstructionType 174{ 175 eInstructionTypeAny, // Support for any instructions at all (at least one) 176 eInstructionTypePrologueEpilogue, // All prologue and epilogue instructons that push and pop register values and modify sp/fp 177 eInstructionTypePCModifying, // Any instruction that modifies the program counter/instruction pointer 178 eInstructionTypeAll // All instructions of any kind 179 180} InstructionType; 181 182 183//------------------------------------------------------------------ 184/// Format category entry types 185//------------------------------------------------------------------ 186typedef enum FormatCategoryItem 187{ 188 eFormatCategoryItemSummary = 0x0001, 189 eFormatCategoryItemRegexSummary = 0x0002, 190 eFormatCategoryItemFilter = 0x0004, 191 eFormatCategoryItemRegexFilter = 0x0008, 192 eFormatCategoryItemSynth = 0x0010, 193 eFormatCategoryItemRegexSynth = 0x0020 194} FormatCategoryItem; 195 196//------------------------------------------------------------------ 197/// Expression execution policies 198//------------------------------------------------------------------ 199typedef enum { 200 eExecutionPolicyOnlyWhenNeeded, 201 eExecutionPolicyNever, 202 eExecutionPolicyAlways 203} ExecutionPolicy; 204 205//---------------------------------------------------------------------- 206// Ways that the FormatManager picks a particular format for a type 207//---------------------------------------------------------------------- 208typedef enum FormatterChoiceCriterion 209{ 210 eFormatterChoiceCriterionDirectChoice = 0x00000000, 211 eFormatterChoiceCriterionStrippedPointerReference = 0x00000001, 212 eFormatterChoiceCriterionNavigatedTypedefs = 0x00000002, 213 eFormatterChoiceCriterionRegularExpressionSummary = 0x00000004, 214 eFormatterChoiceCriterionRegularExpressionFilter = 0x00000004, 215 eFormatterChoiceCriterionDynamicObjCDiscovery = 0x00000008, 216 eFormatterChoiceCriterionStrippedBitField = 0x00000010 217} FormatterChoiceCriterion; 218 219//---------------------------------------------------------------------- 220// Synchronicity behavior of scripted commands 221//---------------------------------------------------------------------- 222typedef enum ScriptedCommandSynchronicity 223{ 224 eScriptedCommandSynchronicitySynchronous, 225 eScriptedCommandSynchronicityAsynchronous, 226 eScriptedCommandSynchronicityCurrentValue // use whatever the current synchronicity is 227} ScriptedCommandSynchronicity; 228 229} // namespace lldb_private 230 231 232#endif // LLDB_lldb_private_enumerations_h_ 233