File indexing completed on 2026-05-10 08:43:00
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_LLDB_PRIVATE_ENUMERATIONS_H
0010 #define LLDB_LLDB_PRIVATE_ENUMERATIONS_H
0011
0012 #include "lldb/lldb-enumerations.h"
0013 #include "llvm/ADT/BitmaskEnum.h"
0014 #include "llvm/ADT/StringRef.h"
0015 #include "llvm/Support/FormatProviders.h"
0016 #include "llvm/Support/raw_ostream.h"
0017
0018 namespace lldb_private {
0019
0020
0021 enum StepType {
0022 eStepTypeNone,
0023 eStepTypeTrace,
0024 eStepTypeTraceOver,
0025 eStepTypeInto,
0026 eStepTypeOver,
0027 eStepTypeOut,
0028 eStepTypeScripted
0029 };
0030
0031
0032 enum AddressType {
0033 eAddressTypeInvalid = 0,
0034 eAddressTypeFile,
0035
0036 eAddressTypeLoad,
0037
0038 eAddressTypeHost
0039
0040 };
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 enum class AddressClass {
0051 eInvalid,
0052 eUnknown,
0053 eCode,
0054 eCodeAlternateISA,
0055 eData,
0056 eDebug,
0057 eRuntime
0058 };
0059
0060
0061 enum Vote { eVoteNo = -1, eVoteNoOpinion = 0, eVoteYes = 1 };
0062
0063 enum ArchitectureType {
0064 eArchTypeInvalid,
0065 eArchTypeMachO,
0066 eArchTypeELF,
0067 eArchTypeCOFF,
0068 eArchTypeXCOFF,
0069 kNumArchTypes
0070 };
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086 enum VarSetOperationType {
0087 eVarSetOperationReplace,
0088 eVarSetOperationInsertBefore,
0089 eVarSetOperationInsertAfter,
0090 eVarSetOperationRemove,
0091 eVarSetOperationAppend,
0092 eVarSetOperationClear,
0093 eVarSetOperationAssign,
0094 eVarSetOperationInvalid
0095 };
0096
0097 enum ArgumentRepetitionType {
0098 eArgRepeatPlain,
0099 eArgRepeatOptional,
0100 eArgRepeatPlus,
0101 eArgRepeatStar,
0102 eArgRepeatRange,
0103 eArgRepeatPairPlain,
0104
0105 eArgRepeatPairOptional,
0106 eArgRepeatPairPlus,
0107 eArgRepeatPairStar,
0108 eArgRepeatPairRange,
0109 eArgRepeatPairRangeOptional
0110
0111 };
0112
0113 enum SortOrder {
0114 eSortOrderNone,
0115 eSortOrderByAddress,
0116 eSortOrderByName,
0117 eSortOrderBySize
0118 };
0119
0120
0121
0122
0123 enum LazyBool { eLazyBoolCalculate = -1, eLazyBoolNo = 0, eLazyBoolYes = 1 };
0124
0125
0126 enum InstructionType {
0127 eInstructionTypeAny,
0128 eInstructionTypePrologueEpilogue,
0129
0130
0131 eInstructionTypePCModifying,
0132
0133 eInstructionTypeAll
0134
0135 };
0136
0137
0138 enum FormatCategoryItem {
0139 eFormatCategoryItemSummary = 1,
0140 eFormatCategoryItemFilter = 1 << 1,
0141 eFormatCategoryItemSynth = 1 << 2,
0142 eFormatCategoryItemFormat = 1 << 3,
0143 };
0144
0145
0146 enum ExecutionPolicy {
0147 eExecutionPolicyOnlyWhenNeeded,
0148 eExecutionPolicyNever,
0149 eExecutionPolicyAlways,
0150 eExecutionPolicyTopLevel
0151 };
0152
0153
0154 enum ScriptedCommandSynchronicity {
0155 eScriptedCommandSynchronicitySynchronous,
0156 eScriptedCommandSynchronicityAsynchronous,
0157 eScriptedCommandSynchronicityCurrentValue
0158
0159 };
0160
0161
0162 enum LanguageRuntimeDescriptionDisplayVerbosity {
0163 eLanguageRuntimeDescriptionDisplayVerbosityCompact,
0164
0165
0166 eLanguageRuntimeDescriptionDisplayVerbosityFull,
0167
0168 };
0169
0170
0171 enum MemoryModuleLoadLevel {
0172 eMemoryModuleLoadLevelMinimal,
0173 eMemoryModuleLoadLevelPartial,
0174 eMemoryModuleLoadLevelComplete,
0175 };
0176
0177
0178 enum FollowForkMode {
0179 eFollowParent,
0180 eFollowChild,
0181 };
0182
0183
0184 enum class LineStatus {
0185 Success,
0186
0187 Status,
0188
0189
0190 Done
0191 };
0192
0193
0194 enum class TypeValidatorResult : bool { Success = true, Failure = false };
0195
0196
0197 enum class CompilerContextKind : uint16_t {
0198 Invalid = 0,
0199 TranslationUnit = 1,
0200 Module = 1 << 1,
0201 Namespace = 1 << 2,
0202 ClassOrStruct = 1 << 3,
0203 Union = 1 << 5,
0204 Function = 1 << 6,
0205 Variable = 1 << 7,
0206 Enum = 1 << 8,
0207 Typedef = 1 << 9,
0208 Builtin = 1 << 10,
0209
0210 Any = 1 << 15,
0211
0212 AnyType = Any | ClassOrStruct | Union | Enum | Typedef | Builtin,
0213
0214 AnyDeclContext = Any | Namespace | ClassOrStruct | Union | Enum | Function,
0215 LLVM_MARK_AS_BITMASK_ENUM(AnyDeclContext),
0216 };
0217 LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
0218
0219
0220
0221 enum StatisticKind {
0222 ExpressionSuccessful = 0,
0223 ExpressionFailure = 1,
0224 FrameVarSuccess = 2,
0225 FrameVarFailure = 3,
0226 StatisticMax = 4
0227 };
0228
0229
0230 enum LogHandlerKind {
0231 eLogHandlerStream,
0232 eLogHandlerCallback,
0233 eLogHandlerCircular,
0234 eLogHandlerSystem,
0235 eLogHandlerDefault = eLogHandlerStream,
0236 };
0237
0238 enum LoadDependentFiles {
0239 eLoadDependentsDefault,
0240 eLoadDependentsYes,
0241 eLoadDependentsNo,
0242 };
0243
0244
0245
0246 enum class IterationAction {
0247 Continue = 0,
0248 Stop,
0249 };
0250
0251 inline std::string GetStatDescription(lldb_private::StatisticKind K) {
0252 switch (K) {
0253 case StatisticKind::ExpressionSuccessful:
0254 return "Number of expr evaluation successes";
0255 case StatisticKind::ExpressionFailure:
0256 return "Number of expr evaluation failures";
0257 case StatisticKind::FrameVarSuccess:
0258 return "Number of frame var successes";
0259 case StatisticKind::FrameVarFailure:
0260 return "Number of frame var failures";
0261 case StatisticKind::StatisticMax:
0262 return "";
0263 }
0264 llvm_unreachable("Statistic not registered!");
0265 }
0266
0267 }
0268
0269 namespace llvm {
0270 template <> struct format_provider<lldb_private::Vote> {
0271 static void format(const lldb_private::Vote &V, llvm::raw_ostream &Stream,
0272 StringRef Style) {
0273 switch (V) {
0274 case lldb_private::eVoteNo:
0275 Stream << "no";
0276 return;
0277 case lldb_private::eVoteNoOpinion:
0278 Stream << "no opinion";
0279 return;
0280 case lldb_private::eVoteYes:
0281 Stream << "yes";
0282 return;
0283 }
0284 Stream << "invalid";
0285 }
0286 };
0287 }
0288
0289 enum SelectMostRelevant : bool {
0290 SelectMostRelevantFrame = true,
0291 DoNoSelectMostRelevantFrame = false,
0292 };
0293
0294 enum InterruptionControl : bool {
0295 AllowInterruption = true,
0296 DoNotAllowInterruption = false,
0297 };
0298
0299
0300
0301
0302 FLAGS_ENUM(WatchpointHardwareFeature){
0303
0304
0305
0306 eWatchpointHardwareFeatureUnknown = (1u << 0),
0307
0308
0309
0310 eWatchpointHardwareX86 = (1u << 1),
0311
0312
0313
0314
0315
0316 eWatchpointHardwareArmBAS = (1u << 2),
0317
0318
0319
0320
0321 eWatchpointHardwareArmMASK = (1u << 3),
0322 };
0323 LLDB_MARK_AS_BITMASK_ENUM(WatchpointHardwareFeature)
0324
0325 #endif