diff options
Diffstat (limited to 'include/lldb/lldb-enumerations.h')
-rw-r--r-- | include/lldb/lldb-enumerations.h | 334 |
1 files changed, 227 insertions, 107 deletions
diff --git a/include/lldb/lldb-enumerations.h b/include/lldb/lldb-enumerations.h index f70ee0cd7b28..28614ffb23e1 100644 --- a/include/lldb/lldb-enumerations.h +++ b/include/lldb/lldb-enumerations.h @@ -10,12 +10,34 @@ #ifndef LLDB_lldb_enumerations_h_ #define LLDB_lldb_enumerations_h_ +#ifndef SWIG +// With MSVC, the default type of an enum is always signed, even if one of the +// enumerator values is too large to fit into a signed integer but would +// otherwise fit into an unsigned integer. As a result of this, all of LLDB's +// flag-style enumerations that specify something like eValueFoo = 1u << 31 +// result in negative values. This usually just results in a benign warning, +// but in a few places we actually do comparisons on the enum values, which +// would cause a real bug. Furthermore, there's no way to silence only this +// warning, as it's part of -Wmicrosoft which also catches a whole slew of +// other useful issues. +// +// To make matters worse, early versions of SWIG don't recognize the syntax +// of specifying the underlying type of an enum (and Python doesn't care anyway) +// so we need a way to specify the underlying type when the enum is being used +// from C++ code, but just use a regular enum when swig is pre-processing. +#define FLAGS_ENUM(Name) enum Name : unsigned +#define FLAGS_ANONYMOUS_ENUM() enum : unsigned +#else +#define FLAGS_ENUM(Name) enum Name +#define FLAGS_ANONYMOUS_ENUM() enum +#endif + namespace lldb { //---------------------------------------------------------------------- // Process and Thread States //---------------------------------------------------------------------- - typedef enum StateType + enum StateType { eStateInvalid = 0, eStateUnloaded, ///< Process is object is valid, but not currently loaded @@ -31,12 +53,12 @@ namespace lldb { eStateSuspended ///< Process or thread is in a suspended state as far ///< as the debugger is concerned while other processes ///< or threads get the chance to run. - } StateType; + }; //---------------------------------------------------------------------- // Launch Flags //---------------------------------------------------------------------- - typedef enum LaunchFlags + FLAGS_ENUM(LaunchFlags) { eLaunchFlagNone = 0u, eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling process into a new process @@ -49,46 +71,49 @@ namespace lldb { eLaunchFlagLaunchInSeparateProcessGroup = (1u << 7), ///< Launch the process in a separate process group eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the process off (e.g. to debugserver) ///< set this flag so lldb & the handee don't race to set its exit status. - eLaunchFlagDetachOnError = (1u << 9) ///< If set, then the client stub should detach rather than killing the debugee + eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub should detach rather than killing the debugee ///< if it loses connection with lldb. - } LaunchFlags; + eLaunchFlagShellExpandArguments = (1u << 10), ///< Perform shell-style argument expansion + eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit + }; //---------------------------------------------------------------------- // Thread Run Modes //---------------------------------------------------------------------- - typedef enum RunMode { + enum RunMode + { eOnlyThisThread, eAllThreads, eOnlyDuringStepping - } RunMode; + }; //---------------------------------------------------------------------- // Byte ordering definitions //---------------------------------------------------------------------- - typedef enum ByteOrder + enum ByteOrder { eByteOrderInvalid = 0, eByteOrderBig = 1, eByteOrderPDP = 2, eByteOrderLittle = 4 - } ByteOrder; + }; //---------------------------------------------------------------------- // Register encoding definitions //---------------------------------------------------------------------- - typedef enum Encoding + enum Encoding { eEncodingInvalid = 0, eEncodingUint, // unsigned integer eEncodingSint, // signed integer eEncodingIEEE754, // float eEncodingVector // vector registers - } Encoding; + }; //---------------------------------------------------------------------- // Display format definitions //---------------------------------------------------------------------- - typedef enum Format + enum Format { eFormatDefault = 0, eFormatInvalid = 0, @@ -131,29 +156,29 @@ namespace lldb { eFormatInstruction, // Disassemble an opcode eFormatVoid, // Do not print this kNumFormats - } Format; + }; //---------------------------------------------------------------------- // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls //---------------------------------------------------------------------- - typedef enum DescriptionLevel + enum DescriptionLevel { eDescriptionLevelBrief = 0, eDescriptionLevelFull, eDescriptionLevelVerbose, eDescriptionLevelInitial, kNumDescriptionLevels - } DescriptionLevel; + }; //---------------------------------------------------------------------- // Script interpreter types //---------------------------------------------------------------------- - typedef enum ScriptLanguage + enum ScriptLanguage { eScriptLanguageNone, eScriptLanguagePython, eScriptLanguageDefault = eScriptLanguagePython - } ScriptLanguage; + }; //---------------------------------------------------------------------- // Register numbering types @@ -161,7 +186,7 @@ namespace lldb { // any of these to the lldb internal register numbering scheme // (eRegisterKindLLDB). //---------------------------------------------------------------------- - typedef enum RegisterKind + enum RegisterKind { eRegisterKindGCC = 0, // the register numbers seen in eh_frame eRegisterKindDWARF, // the register numbers seen DWARF @@ -169,12 +194,12 @@ namespace lldb { eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers) eRegisterKindLLDB, // lldb's internal register numbers kNumRegisterKinds - } RegisterKind; + }; //---------------------------------------------------------------------- // Thread stop reasons //---------------------------------------------------------------------- - typedef enum StopReason + enum StopReason { eStopReasonInvalid = 0, eStopReasonNone, @@ -187,12 +212,12 @@ namespace lldb { eStopReasonPlanComplete, eStopReasonThreadExiting, eStopReasonInstrumentation - } StopReason; + }; //---------------------------------------------------------------------- // Command Return Status Types //---------------------------------------------------------------------- - typedef enum ReturnStatus + enum ReturnStatus { eReturnStatusInvalid, eReturnStatusSuccessFinishNoResult, @@ -202,13 +227,13 @@ namespace lldb { eReturnStatusStarted, eReturnStatusFailed, eReturnStatusQuit - } ReturnStatus; + }; //---------------------------------------------------------------------- // The results of expression evaluation: //---------------------------------------------------------------------- - typedef enum ExpressionResults + enum ExpressionResults { eExpressionCompleted = 0, eExpressionSetupError, @@ -219,12 +244,12 @@ namespace lldb { eExpressionTimedOut, eExpressionResultUnavailable, eExpressionStoppedForDebug - } ExpressionResults; + }; //---------------------------------------------------------------------- // Connection Status Types //---------------------------------------------------------------------- - typedef enum ConnectionStatus + enum ConnectionStatus { eConnectionStatusSuccess, // Success eConnectionStatusEndOfFile, // End-of-file encountered @@ -233,9 +258,9 @@ namespace lldb { eConnectionStatusNoConnection, // No connection eConnectionStatusLostConnection, // Lost connection while connected to a valid connection eConnectionStatusInterrupted // Interrupted read - } ConnectionStatus; + }; - typedef enum ErrorType + enum ErrorType { eErrorTypeInvalid, eErrorTypeGeneric, ///< Generic errors that can be any value. @@ -243,10 +268,10 @@ namespace lldb { eErrorTypePOSIX, ///< POSIX error codes. eErrorTypeExpression, ///< These are from the ExpressionResults enum. eErrorTypeWin32 ///< Standard Win32 error codes. - } ErrorType; + }; - typedef enum ValueType + enum ValueType { eValueTypeInvalid = 0, eValueTypeVariableGlobal = 1, // globals variable @@ -256,20 +281,20 @@ namespace lldb { eValueTypeRegister = 5, // stack frame register value eValueTypeRegisterSet = 6, // A collection of stack frame register values eValueTypeConstResult = 7 // constant result variables - } ValueType; + }; //---------------------------------------------------------------------- // Token size/granularities for Input Readers //---------------------------------------------------------------------- - typedef enum InputReaderGranularity + enum InputReaderGranularity { eInputReaderGranularityInvalid = 0, eInputReaderGranularityByte, eInputReaderGranularityWord, eInputReaderGranularityLine, eInputReaderGranularityAll - } InputReaderGranularity; + }; //------------------------------------------------------------------ /// These mask bits allow a common interface for queries that can @@ -281,7 +306,7 @@ namespace lldb { /// in this class, and requests that that item be resolved, or /// indicates that the member did get resolved. //------------------------------------------------------------------ - typedef enum SymbolContextItem + FLAGS_ENUM(SymbolContextItem) { eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from a query, or was located in query results eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from a query, or was located in query results @@ -295,16 +320,16 @@ namespace lldb { ///< eSymbolContextVariable is potentially expensive to lookup so it isn't included in ///< eSymbolContextEverything which stops it from being used during frame PC lookups and ///< many other potential address to symbol context lookups. - } SymbolContextItem; + }; - typedef enum Permissions + FLAGS_ENUM(Permissions) { ePermissionsWritable = (1u << 0), ePermissionsReadable = (1u << 1), ePermissionsExecutable = (1u << 2) - } Permissions; + }; - typedef enum InputReaderAction + enum InputReaderAction { eInputReaderActivate, // reader is newly pushed onto the reader stack eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something @@ -314,9 +339,9 @@ namespace lldb { eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c) eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d) eInputReaderDone // reader was just popped off the stack and is done - } InputReaderAction; + }; - typedef enum BreakpointEventType + FLAGS_ENUM(BreakpointEventType) { eBreakpointEventTypeInvalidType = (1u << 0), eBreakpointEventTypeAdded = (1u << 1), @@ -330,9 +355,9 @@ namespace lldb { eBreakpointEventTypeConditionChanged = (1u << 9), eBreakpointEventTypeIgnoreChanged = (1u << 10), eBreakpointEventTypeThreadChanged = (1u << 11) - } BreakpointEventType; + }; - typedef enum WatchpointEventType + FLAGS_ENUM(WatchpointEventType) { eWatchpointEventTypeInvalidType = (1u << 0), eWatchpointEventTypeAdded = (1u << 1), @@ -344,7 +369,7 @@ namespace lldb { eWatchpointEventTypeIgnoreChanged = (1u << 10), eWatchpointEventTypeThreadChanged = (1u << 11), eWatchpointEventTypeTypeChanged = (1u << 12) - } WatchpointEventType; + }; //---------------------------------------------------------------------- @@ -355,7 +380,7 @@ namespace lldb { /// The enum -> string code is in LanguageRuntime.cpp, don't change this /// table without updating that code as well. //---------------------------------------------------------------------- - typedef enum LanguageType + enum LanguageType { eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value. eLanguageTypeC89 = 0x0001, ///< ISO C:1989. @@ -395,31 +420,39 @@ namespace lldb { eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014. eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003. eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008. + // Vendor Extensions + // Note: LanguageRuntime::GetNameForLanguageType + // assumes these can be used as indexes into array language_names, and + // Language::SetLanguageFromCString and Language::AsCString + // assume these can be used as indexes into array g_languages. + eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler. + eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript. eNumLanguageTypes - } LanguageType; + }; - typedef enum InstrumentationRuntimeType { + enum InstrumentationRuntimeType + { eInstrumentationRuntimeTypeAddressSanitizer = 0x0000, eNumInstrumentationRuntimeTypes - } InstrumentationRuntimeType; + }; - typedef enum DynamicValueType + enum DynamicValueType { eNoDynamicValues = 0, eDynamicCanRunTarget = 1, eDynamicDontRunTarget = 2 - } DynamicValueType; + }; - typedef enum AccessType + enum AccessType { eAccessNone, eAccessPublic, eAccessPrivate, eAccessProtected, eAccessPackage - } AccessType; + }; - typedef enum CommandArgumentType + enum CommandArgumentType { eArgTypeAddress = 0, eArgTypeAddressOrExpression, @@ -493,6 +526,7 @@ namespace lldb { eArgTypeThreadID, eArgTypeThreadIndex, eArgTypeThreadName, + eArgTypeTypeName, eArgTypeUnsignedInteger, eArgTypeUnixSignal, eArgTypeVarName, @@ -504,12 +538,12 @@ namespace lldb { eArgTypeWatchpointIDRange, eArgTypeWatchType, eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!! - } CommandArgumentType; + }; //---------------------------------------------------------------------- // Symbol types //---------------------------------------------------------------------- - typedef enum SymbolType + enum SymbolType { eSymbolTypeAny = 0, eSymbolTypeInvalid = 0, @@ -541,9 +575,9 @@ namespace lldb { eSymbolTypeObjCMetaClass, eSymbolTypeObjCIVar, eSymbolTypeReExported - } SymbolType; + }; - typedef enum SectionType + enum SectionType { eSectionTypeInvalid, eSectionTypeCode, @@ -582,17 +616,16 @@ namespace lldb { eSectionTypeEHFrame, eSectionTypeCompactUnwind, // compact unwind section in Mach-O, __TEXT,__unwind_info eSectionTypeOther - - } SectionType; + }; - typedef enum EmulateInstructionOptions + FLAGS_ENUM(EmulateInstructionOptions) { eEmulateInstructionOptionNone = (0u), eEmulateInstructionOptionAutoAdvancePC = (1u << 0), eEmulateInstructionOptionIgnoreConditions = (1u << 1) - } EmulateInstructionOptions; + }; - typedef enum FunctionNameType + FLAGS_ENUM(FunctionNameType) { eFunctionNameTypeNone = 0u, eFunctionNameTypeAuto = (1u << 1), // Automatically figure out which FunctionNameType @@ -607,13 +640,13 @@ namespace lldb { eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++) with no namespace or arguments eFunctionNameTypeSelector = (1u << 5), // Find function by selector name (ObjC) names eFunctionNameTypeAny = eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto - } FunctionNameType; + }; //---------------------------------------------------------------------- // Basic types enumeration for the public API SBType::GetBasicType() //---------------------------------------------------------------------- - typedef enum BasicType + enum BasicType { eBasicTypeInvalid = 0, eBasicTypeVoid = 1, @@ -648,9 +681,9 @@ namespace lldb { eBasicTypeObjCSel, eBasicTypeNullPtr, eBasicTypeOther - } BasicType; + }; - typedef enum TypeClass + FLAGS_ENUM(TypeClass) { eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0), @@ -675,9 +708,9 @@ namespace lldb { eTypeClassOther = (1u << 31), // Define a mask that can be used for any type when finding types eTypeClassAny = (0xffffffffu) - } TypeClass; + }; - typedef enum TemplateArgumentKind + enum TemplateArgumentKind { eTemplateArgumentKindNull = 0, eTemplateArgumentKindType, @@ -688,13 +721,13 @@ namespace lldb { eTemplateArgumentKindExpression, eTemplateArgumentKindPack - } TemplateArgumentKind; + }; //---------------------------------------------------------------------- // Options that can be set for a formatter to alter its behavior // Not all of these are applicable to all formatter types //---------------------------------------------------------------------- - typedef enum TypeOptions + FLAGS_ENUM(TypeOptions) { eTypeOptionNone = (0u), eTypeOptionCascade = (1u << 0), @@ -703,8 +736,9 @@ namespace lldb { eTypeOptionHideChildren = (1u << 3), eTypeOptionHideValue = (1u << 4), eTypeOptionShowOneLiner = (1u << 5), - eTypeOptionHideNames = (1u << 6) - } TypeOptions; + eTypeOptionHideNames = (1u << 6), + eTypeOptionNonCacheable = (1u << 7) + }; //---------------------------------------------------------------------- // This is the return value for frame comparisons. If you are comparing frame A to frame B @@ -717,7 +751,7 @@ namespace lldb { // 5) If the two frames are on different threads or processes the comparision is Invalid // 6) If for some reason we can't figure out what went on, we return Unknown. //---------------------------------------------------------------------- - typedef enum FrameComparison + enum FrameComparison { eFrameCompareInvalid, eFrameCompareUnknown, @@ -725,7 +759,7 @@ namespace lldb { eFrameCompareSameParent, eFrameCompareYounger, eFrameCompareOlder - } FrameComparison; + }; //---------------------------------------------------------------------- // Address Class @@ -737,7 +771,7 @@ namespace lldb { // might contain PC relative data and the object file might be able to // tell us that an address in code is data. //---------------------------------------------------------------------- - typedef enum AddressClass + enum AddressClass { eAddressClassInvalid, eAddressClassUnknown, @@ -746,7 +780,7 @@ namespace lldb { eAddressClassData, eAddressClassDebug, eAddressClassRuntime - } AddressClass; + }; //---------------------------------------------------------------------- // File Permissions @@ -755,7 +789,7 @@ namespace lldb { // used with functions that set 'mode_t' to certain values for // permissions. //---------------------------------------------------------------------- - typedef enum FilePermissions + FLAGS_ENUM(FilePermissions) { eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7), @@ -788,7 +822,7 @@ namespace lldb { eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR | eFilePermissionsEveryoneW | eFilePermissionsEveryoneX ), eFilePermissionsFileDefault = eFilePermissionsUserRW, eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX, - } FilePermissions; + }; //---------------------------------------------------------------------- // Queue work item types @@ -796,24 +830,24 @@ namespace lldb { // The different types of work that can be enqueued on a libdispatch // aka Grand Central Dispatch (GCD) queue. //---------------------------------------------------------------------- - typedef enum QueueItemKind + enum QueueItemKind { eQueueItemKindUnknown = 0, eQueueItemKindFunction, eQueueItemKindBlock - } QueueItemKind; + }; //---------------------------------------------------------------------- // Queue type // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial // (executing on one thread) or concurrent (executing on multiple threads). //---------------------------------------------------------------------- - typedef enum QueueKind + enum QueueKind { eQueueKindUnknown = 0, eQueueKindSerial, eQueueKindConcurrent - } QueueKind; + }; //---------------------------------------------------------------------- // Expression Evaluation Stages @@ -821,13 +855,13 @@ namespace lldb { // expression evaluation callback, so that you can interrupt expression // evaluation at the various points in its lifecycle. //---------------------------------------------------------------------- - typedef enum ExpressionEvaluationPhase + enum ExpressionEvaluationPhase { eExpressionEvaluationParse = 0, eExpressionEvaluationIRGen, eExpressionEvaluationExecution, eExpressionEvaluationComplete - } ExpressionEvaluationPhase; + }; //---------------------------------------------------------------------- @@ -835,13 +869,13 @@ namespace lldb { // Indicates what types of events cause the watchpoint to fire. // Used by Native*Protocol-related classes. //---------------------------------------------------------------------- - typedef enum WatchpointKind + FLAGS_ENUM(WatchpointKind) { eWatchpointKindRead = (1u << 0), eWatchpointKindWrite = (1u << 1) - } WatchpointKind; + }; - typedef enum GdbSignal + enum GdbSignal { eGdbSignalBadAccess = 0x91, eGdbSignalBadInstruction = 0x92, @@ -849,52 +883,55 @@ namespace lldb { eGdbSignalEmulation = 0x94, eGdbSignalSoftware = 0x95, eGdbSignalBreakpoint = 0x96 - } GdbRemoteSignal; + }; //---------------------------------------------------------------------- // Used with SBHost::GetPath (lldb::PathType) to find files that are // related to LLDB on the current host machine. Most files are relative // to LLDB or are in known locations. //---------------------------------------------------------------------- - typedef enum PathType - { - ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists - ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc) - ePathTypeHeaderDir, // Find LLDB header file directory - ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory - ePathTypeLLDBSystemPlugins, // System plug-ins directory - ePathTypeLLDBUserPlugins, // User plug-ins directory - ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that will be cleaned up on exit - ePathTypeClangDir // Find path to Clang builtin headers - } PathType; + enum PathType + { + ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists + ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc) + ePathTypeHeaderDir, // Find LLDB header file directory + ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory + ePathTypeLLDBSystemPlugins, // System plug-ins directory + ePathTypeLLDBUserPlugins, // User plug-ins directory + ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that will be cleaned up on exit + ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system, NOT cleaned up on a process exit. + ePathTypeClangDir // Find path to Clang builtin headers + }; //---------------------------------------------------------------------- // Kind of member function // Used by the type system //---------------------------------------------------------------------- - typedef enum MemberFunctionKind + enum MemberFunctionKind { eMemberFunctionKindUnknown = 0, // Not sure what the type of this is eMemberFunctionKindConstructor, // A function used to create instances eMemberFunctionKindDestructor, // A function used to tear down existing instances eMemberFunctionKindInstanceMethod, // A function that applies to a specific instance eMemberFunctionKindStaticMethod // A function that applies to a type rather than any instance - } MemberFunctionKind; + }; //---------------------------------------------------------------------- // String matching algorithm used by SBTarget //---------------------------------------------------------------------- - typedef enum MatchType { + enum MatchType + { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith - } MatchType; + }; //---------------------------------------------------------------------- // Bitmask that describes details about a type //---------------------------------------------------------------------- - typedef enum TypeFlags { + FLAGS_ENUM(TypeFlags) + { eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1), eTypeIsArray = (1u << 2), @@ -917,17 +954,100 @@ namespace lldb { eTypeIsFloat = (1u << 19), eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21) - } TypeFlags; + }; + + FLAGS_ENUM(CommandFlags) + { + //---------------------------------------------------------------------- + // eCommandRequiresTarget + // + // Ensures a valid target is contained in m_exe_ctx prior to executing + // the command. If a target doesn't exist or is invalid, the command + // will fail and CommandObject::GetInvalidTargetDescription() will be + // returned as the error. CommandObject subclasses can override the + // virtual function for GetInvalidTargetDescription() to provide custom + // strings when needed. + //---------------------------------------------------------------------- + eCommandRequiresTarget = (1u << 0), + //---------------------------------------------------------------------- + // eCommandRequiresProcess + // + // Ensures a valid process is contained in m_exe_ctx prior to executing + // the command. If a process doesn't exist or is invalid, the command + // will fail and CommandObject::GetInvalidProcessDescription() will be + // returned as the error. CommandObject subclasses can override the + // virtual function for GetInvalidProcessDescription() to provide custom + // strings when needed. + //---------------------------------------------------------------------- + eCommandRequiresProcess = (1u << 1), + //---------------------------------------------------------------------- + // eCommandRequiresThread + // + // Ensures a valid thread is contained in m_exe_ctx prior to executing + // the command. If a thread doesn't exist or is invalid, the command + // will fail and CommandObject::GetInvalidThreadDescription() will be + // returned as the error. CommandObject subclasses can override the + // virtual function for GetInvalidThreadDescription() to provide custom + // strings when needed. + //---------------------------------------------------------------------- + eCommandRequiresThread = (1u << 2), + //---------------------------------------------------------------------- + // eCommandRequiresFrame + // + // Ensures a valid frame is contained in m_exe_ctx prior to executing + // the command. If a frame doesn't exist or is invalid, the command + // will fail and CommandObject::GetInvalidFrameDescription() will be + // returned as the error. CommandObject subclasses can override the + // virtual function for GetInvalidFrameDescription() to provide custom + // strings when needed. + //---------------------------------------------------------------------- + eCommandRequiresFrame = (1u << 3), + //---------------------------------------------------------------------- + // eCommandRequiresRegContext + // + // Ensures a valid register context (from the selected frame if there + // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx) + // is available from m_exe_ctx prior to executing the command. If a + // target doesn't exist or is invalid, the command will fail and + // CommandObject::GetInvalidRegContextDescription() will be returned as + // the error. CommandObject subclasses can override the virtual function + // for GetInvalidRegContextDescription() to provide custom strings when + // needed. + //---------------------------------------------------------------------- + eCommandRequiresRegContext = (1u << 4), + //---------------------------------------------------------------------- + // eCommandTryTargetAPILock + // + // Attempts to acquire the target lock if a target is selected in the + // command interpreter. If the command object fails to acquire the API + // lock, the command will fail with an appropriate error message. + //---------------------------------------------------------------------- + eCommandTryTargetAPILock = (1u << 5), + //---------------------------------------------------------------------- + // eCommandProcessMustBeLaunched + // + // Verifies that there is a launched process in m_exe_ctx, if there + // isn't, the command will fail with an appropriate error message. + //---------------------------------------------------------------------- + eCommandProcessMustBeLaunched = (1u << 6), + //---------------------------------------------------------------------- + // eCommandProcessMustBePaused + // + // Verifies that there is a paused process in m_exe_ctx, if there + // isn't, the command will fail with an appropriate error message. + //---------------------------------------------------------------------- + eCommandProcessMustBePaused = (1u << 7) + }; //---------------------------------------------------------------------- // Whether a summary should cap how much data it returns to users or not //---------------------------------------------------------------------- - typedef enum TypeSummaryCapping { + enum TypeSummaryCapping + { eTypeSummaryCapped = true, eTypeSummaryUncapped = false - } TypeSummaryCapping; + }; } // namespace lldb - #endif // LLDB_lldb_enumerations_h_ |