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