Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:59

0001 //===-- lldb-enumerations.h -------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_LLDB_ENUMERATIONS_H
0010 #define LLDB_LLDB_ENUMERATIONS_H
0011 
0012 #include <cstdint>
0013 #include <type_traits>
0014 
0015 #ifndef SWIG
0016 // Macro to enable bitmask operations on an enum.  Without this, Enum | Enum
0017 // gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar).  If
0018 // you mark Enum with LLDB_MARK_AS_BITMASK_ENUM(Enum), however, you can simply
0019 // write Enum a = eFoo | eBar.
0020 // Unfortunately, swig<3.0 doesn't recognise the constexpr keyword, so remove
0021 // this entire block, as it is not necessary for swig processing.
0022 #define LLDB_MARK_AS_BITMASK_ENUM(Enum)                                        \
0023   constexpr Enum operator|(Enum a, Enum b) {                                   \
0024     return static_cast<Enum>(                                                  \
0025         static_cast<std::underlying_type<Enum>::type>(a) |                     \
0026         static_cast<std::underlying_type<Enum>::type>(b));                     \
0027   }                                                                            \
0028   constexpr Enum operator&(Enum a, Enum b) {                                   \
0029     return static_cast<Enum>(                                                  \
0030         static_cast<std::underlying_type<Enum>::type>(a) &                     \
0031         static_cast<std::underlying_type<Enum>::type>(b));                     \
0032   }                                                                            \
0033   constexpr Enum operator~(Enum a) {                                           \
0034     return static_cast<Enum>(                                                  \
0035         ~static_cast<std::underlying_type<Enum>::type>(a));                    \
0036   }                                                                            \
0037   inline Enum &operator|=(Enum &a, Enum b) {                                   \
0038     a = a | b;                                                                 \
0039     return a;                                                                  \
0040   }                                                                            \
0041   inline Enum &operator&=(Enum &a, Enum b) {                                   \
0042     a = a & b;                                                                 \
0043     return a;                                                                  \
0044   }
0045 #else
0046 #define LLDB_MARK_AS_BITMASK_ENUM(Enum)
0047 #endif
0048 
0049 #ifndef SWIG
0050 // With MSVC, the default type of an enum is always signed, even if one of the
0051 // enumerator values is too large to fit into a signed integer but would
0052 // otherwise fit into an unsigned integer.  As a result of this, all of LLDB's
0053 // flag-style enumerations that specify something like eValueFoo = 1u << 31
0054 // result in negative values.  This usually just results in a benign warning,
0055 // but in a few places we actually do comparisons on the enum values, which
0056 // would cause a real bug.  Furthermore, there's no way to silence only this
0057 // warning, as it's part of -Wmicrosoft which also catches a whole slew of
0058 // other useful issues.
0059 //
0060 // To make matters worse, early versions of SWIG don't recognize the syntax of
0061 // specifying the underlying type of an enum (and Python doesn't care anyway)
0062 // so we need a way to specify the underlying type when the enum is being used
0063 // from C++ code, but just use a regular enum when swig is pre-processing.
0064 #define FLAGS_ENUM(Name) enum Name : unsigned
0065 #define FLAGS_ANONYMOUS_ENUM() enum : unsigned
0066 #else
0067 #define FLAGS_ENUM(Name) enum Name
0068 #define FLAGS_ANONYMOUS_ENUM() enum
0069 #endif
0070 
0071 namespace lldb {
0072 
0073 /// Process and Thread States.
0074 enum StateType {
0075   eStateInvalid = 0,
0076   eStateUnloaded,  ///< Process is object is valid, but not currently loaded
0077   eStateConnected, ///< Process is connected to remote debug services, but not
0078                    /// launched or attached to anything yet
0079   eStateAttaching, ///< Process is currently trying to attach
0080   eStateLaunching, ///< Process is in the process of launching
0081   // The state changes eStateAttaching and eStateLaunching are both sent while
0082   // the private state thread is either not yet started or paused. For that
0083   // reason, they should only be signaled as public state changes, and not
0084   // private state changes.
0085   eStateStopped,   ///< Process or thread is stopped and can be examined.
0086   eStateRunning,   ///< Process or thread is running and can't be examined.
0087   eStateStepping,  ///< Process or thread is in the process of stepping and can
0088                    /// not be examined.
0089   eStateCrashed,   ///< Process or thread has crashed and can be examined.
0090   eStateDetached,  ///< Process has been detached and can't be examined.
0091   eStateExited,    ///< Process has exited and can't be examined.
0092   eStateSuspended, ///< Process or thread is in a suspended state as far
0093                    ///< as the debugger is concerned while other processes
0094                    ///< or threads get the chance to run.
0095   kLastStateType = eStateSuspended
0096 };
0097 
0098 /// Launch Flags.
0099 FLAGS_ENUM(LaunchFlags){
0100     eLaunchFlagNone = 0u,
0101     eLaunchFlagExec = (1u << 0),  ///< Exec when launching and turn the calling
0102                                   /// process into a new process
0103     eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to
0104                                   /// allow the process to be debugged
0105     eLaunchFlagStopAtEntry = (1u
0106                               << 2), ///< Stop at the program entry point
0107                                      /// instead of auto-continuing when
0108                                      /// launching or attaching at entry point
0109     eLaunchFlagDisableASLR =
0110         (1u << 3), ///< Disable Address Space Layout Randomization
0111     eLaunchFlagDisableSTDIO =
0112         (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
0113     eLaunchFlagLaunchInTTY =
0114         (1u << 5), ///< Launch the process in a new TTY if supported by the host
0115     eLaunchFlagLaunchInShell =
0116         (1u << 6), ///< Launch the process inside a shell to get shell expansion
0117     eLaunchFlagLaunchInSeparateProcessGroup =
0118         (1u << 7), ///< Launch the process in a separate process group
0119                    ///< If you are going to hand the process off (e.g. to
0120                    ///< debugserver)
0121     eLaunchFlagDontSetExitStatus = (1u << 8),
0122     ///< set this flag so lldb & the handee don't race to set its exit status.
0123     eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub
0124                                           ///< should detach rather than killing
0125                                           ///< the debugee
0126                                           ///< if it loses connection with lldb.
0127     eLaunchFlagShellExpandArguments =
0128         (1u << 10), ///< Perform shell-style argument expansion
0129     eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
0130     eLaunchFlagInheritTCCFromParent =
0131         (1u << 12), ///< Don't make the inferior responsible for its own TCC
0132                     ///< permissions but instead inherit them from its parent.
0133 };
0134 
0135 /// Thread Run Modes.
0136 enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping };
0137 
0138 /// Byte ordering definitions.
0139 enum ByteOrder {
0140   eByteOrderInvalid = 0,
0141   eByteOrderBig = 1,
0142   eByteOrderPDP = 2,
0143   eByteOrderLittle = 4
0144 };
0145 
0146 /// Register encoding definitions.
0147 enum Encoding {
0148   eEncodingInvalid = 0,
0149   eEncodingUint,    ///< unsigned integer
0150   eEncodingSint,    ///< signed integer
0151   eEncodingIEEE754, ///< float
0152   eEncodingVector   ///< vector registers
0153 };
0154 
0155 /// Display format definitions.
0156 enum Format {
0157   eFormatDefault = 0,
0158   eFormatInvalid = 0,
0159   eFormatBoolean,
0160   eFormatBinary,
0161   eFormatBytes,
0162   eFormatBytesWithASCII,
0163   eFormatChar,
0164   eFormatCharPrintable, ///< Only printable characters, '.' if not printable
0165   eFormatComplex,       ///< Floating point complex type
0166   eFormatComplexFloat = eFormatComplex,
0167   eFormatCString, ///< NULL terminated C strings
0168   eFormatDecimal,
0169   eFormatEnum,
0170   eFormatHex,
0171   eFormatHexUppercase,
0172   eFormatFloat,
0173   eFormatOctal,
0174   eFormatOSType, ///< OS character codes encoded into an integer 'PICT' 'text'
0175                  ///< etc...
0176   eFormatUnicode16,
0177   eFormatUnicode32,
0178   eFormatUnsigned,
0179   eFormatPointer,
0180   eFormatVectorOfChar,
0181   eFormatVectorOfSInt8,
0182   eFormatVectorOfUInt8,
0183   eFormatVectorOfSInt16,
0184   eFormatVectorOfUInt16,
0185   eFormatVectorOfSInt32,
0186   eFormatVectorOfUInt32,
0187   eFormatVectorOfSInt64,
0188   eFormatVectorOfUInt64,
0189   eFormatVectorOfFloat16,
0190   eFormatVectorOfFloat32,
0191   eFormatVectorOfFloat64,
0192   eFormatVectorOfUInt128,
0193   eFormatComplexInteger, ///< Integer complex type
0194   eFormatCharArray,      ///< Print characters with no single quotes, used for
0195                          ///< character arrays that can contain non printable
0196                          ///< characters
0197   eFormatAddressInfo,    ///< Describe what an address points to (func + offset
0198                       ///< with file/line, symbol + offset, data, etc)
0199   eFormatHexFloat,    ///< ISO C99 hex float string
0200   eFormatInstruction, ///< Disassemble an opcode
0201   eFormatVoid,        ///< Do not print this
0202   eFormatUnicode8,
0203   kNumFormats
0204 };
0205 
0206 /// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
0207 /// calls.
0208 enum DescriptionLevel {
0209   eDescriptionLevelBrief = 0,
0210   eDescriptionLevelFull,
0211   eDescriptionLevelVerbose,
0212   eDescriptionLevelInitial,
0213   kNumDescriptionLevels
0214 };
0215 
0216 /// Script interpreter types.
0217 enum ScriptLanguage {
0218   eScriptLanguageNone = 0,
0219   eScriptLanguagePython,
0220   eScriptLanguageLua,
0221   eScriptLanguageUnknown,
0222   eScriptLanguageDefault = eScriptLanguagePython
0223 };
0224 
0225 /// Register numbering types.
0226 // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert any of
0227 // these to the lldb internal register numbering scheme (eRegisterKindLLDB).
0228 enum RegisterKind {
0229   eRegisterKindEHFrame = 0, ///< the register numbers seen in eh_frame
0230   eRegisterKindDWARF,       ///< the register numbers seen DWARF
0231   eRegisterKindGeneric, ///< insn ptr reg, stack ptr reg, etc not specific to
0232                         ///< any particular target
0233   eRegisterKindProcessPlugin, ///< num used by the process plugin - e.g. by the
0234                               ///< remote gdb-protocol stub program
0235   eRegisterKindLLDB,          ///< lldb's internal register numbers
0236   kNumRegisterKinds
0237 };
0238 
0239 /// Thread stop reasons.
0240 enum StopReason {
0241   eStopReasonInvalid = 0,
0242   eStopReasonNone,
0243   eStopReasonTrace,
0244   eStopReasonBreakpoint,
0245   eStopReasonWatchpoint,
0246   eStopReasonSignal,
0247   eStopReasonException,
0248   eStopReasonExec, ///< Program was re-exec'ed
0249   eStopReasonPlanComplete,
0250   eStopReasonThreadExiting,
0251   eStopReasonInstrumentation,
0252   eStopReasonProcessorTrace,
0253   eStopReasonFork,
0254   eStopReasonVFork,
0255   eStopReasonVForkDone,
0256   eStopReasonInterrupt, ///< Thread requested interrupt
0257 };
0258 
0259 /// Command Return Status Types.
0260 enum ReturnStatus {
0261   eReturnStatusInvalid,
0262   eReturnStatusSuccessFinishNoResult,
0263   eReturnStatusSuccessFinishResult,
0264   eReturnStatusSuccessContinuingNoResult,
0265   eReturnStatusSuccessContinuingResult,
0266   eReturnStatusStarted,
0267   eReturnStatusFailed,
0268   eReturnStatusQuit
0269 };
0270 
0271 /// The results of expression evaluation.
0272 enum ExpressionResults {
0273   eExpressionCompleted = 0,
0274   eExpressionSetupError,
0275   eExpressionParseError,
0276   eExpressionDiscarded,
0277   eExpressionInterrupted,
0278   eExpressionHitBreakpoint,
0279   eExpressionTimedOut,
0280   eExpressionResultUnavailable,
0281   eExpressionStoppedForDebug,
0282   eExpressionThreadVanished
0283 };
0284 
0285 enum SearchDepth {
0286   eSearchDepthInvalid = 0,
0287   eSearchDepthTarget,
0288   eSearchDepthModule,
0289   eSearchDepthCompUnit,
0290   eSearchDepthFunction,
0291   eSearchDepthBlock,
0292   eSearchDepthAddress,
0293   kLastSearchDepthKind = eSearchDepthAddress
0294 };
0295 
0296 /// Connection Status Types.
0297 enum ConnectionStatus {
0298   eConnectionStatusSuccess,        ///< Success
0299   eConnectionStatusEndOfFile,      ///< End-of-file encountered
0300   eConnectionStatusError,          ///< Check GetError() for details
0301   eConnectionStatusTimedOut,       ///< Request timed out
0302   eConnectionStatusNoConnection,   ///< No connection
0303   eConnectionStatusLostConnection, ///< Lost connection while connected to a
0304                                    ///< valid connection
0305   eConnectionStatusInterrupted ///< Interrupted read
0306 };
0307 
0308 enum ErrorType {
0309   eErrorTypeInvalid,
0310   eErrorTypeGeneric,    ///< Generic errors that can be any value.
0311   eErrorTypeMachKernel, ///< Mach kernel error codes.
0312   eErrorTypePOSIX,      ///< POSIX error codes.
0313   eErrorTypeExpression, ///< These are from the ExpressionResults enum.
0314   eErrorTypeWin32       ///< Standard Win32 error codes.
0315 };
0316 
0317 enum ValueType {
0318   eValueTypeInvalid = 0,
0319   eValueTypeVariableGlobal = 1,   ///< globals variable
0320   eValueTypeVariableStatic = 2,   ///< static variable
0321   eValueTypeVariableArgument = 3, ///< function argument variables
0322   eValueTypeVariableLocal = 4,    ///< function local variables
0323   eValueTypeRegister = 5,         ///< stack frame register value
0324   eValueTypeRegisterSet = 6, ///< A collection of stack frame register values
0325   eValueTypeConstResult = 7, ///< constant result variables
0326   eValueTypeVariableThreadLocal = 8, ///< thread local storage variable
0327   eValueTypeVTable = 9,              ///< virtual function table
0328   eValueTypeVTableEntry = 10, ///< function pointer in virtual function table
0329 };
0330 
0331 /// Token size/granularities for Input Readers.
0332 
0333 enum InputReaderGranularity {
0334   eInputReaderGranularityInvalid = 0,
0335   eInputReaderGranularityByte,
0336   eInputReaderGranularityWord,
0337   eInputReaderGranularityLine,
0338   eInputReaderGranularityAll
0339 };
0340 
0341 /// These mask bits allow a common interface for queries that can
0342 /// limit the amount of information that gets parsed to only the
0343 /// information that is requested. These bits also can indicate what
0344 /// actually did get resolved during query function calls.
0345 ///
0346 /// Each definition corresponds to a one of the member variables
0347 /// in this class, and requests that that item be resolved, or
0348 /// indicates that the member did get resolved.
0349 FLAGS_ENUM(SymbolContextItem){
0350     /// Set when \a target is requested from a query, or was located
0351     /// in query results
0352     eSymbolContextTarget = (1u << 0),
0353     /// Set when \a module is requested from a query, or was located
0354     /// in query results
0355     eSymbolContextModule = (1u << 1),
0356     /// Set when \a comp_unit is requested from a query, or was
0357     /// located in query results
0358     eSymbolContextCompUnit = (1u << 2),
0359     /// Set when \a function is requested from a query, or was located
0360     /// in query results
0361     eSymbolContextFunction = (1u << 3),
0362     /// Set when the deepest \a block is requested from a query, or
0363     /// was located in query results
0364     eSymbolContextBlock = (1u << 4),
0365     /// Set when \a line_entry is requested from a query, or was
0366     /// located in query results
0367     eSymbolContextLineEntry = (1u << 5),
0368     /// Set when \a symbol is requested from a query, or was located
0369     /// in query results
0370     eSymbolContextSymbol = (1u << 6),
0371     /// Indicates to try and lookup everything up during a routine
0372     /// symbol context query.
0373     eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u),
0374     /// Set when \a global or static variable is requested from a
0375     /// query, or was located in query results.
0376     /// eSymbolContextVariable is potentially expensive to lookup so
0377     /// it isn't included in eSymbolContextEverything which stops it
0378     /// from being used during frame PC lookups and many other
0379     /// potential address to symbol context lookups.
0380     eSymbolContextVariable = (1u << 7),
0381 
0382     // Keep this last and up-to-date for what the last enum value is.
0383     eSymbolContextLastItem = eSymbolContextVariable,
0384 };
0385 LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem)
0386 
0387 FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0),
0388                         ePermissionsReadable = (1u << 1),
0389                         ePermissionsExecutable = (1u << 2)};
0390 LLDB_MARK_AS_BITMASK_ENUM(Permissions)
0391 
0392 enum InputReaderAction {
0393   eInputReaderActivate, ///< reader is newly pushed onto the reader stack
0394   eInputReaderAsynchronousOutputWritten, ///< an async output event occurred;
0395                                          ///< the reader may want to do
0396                                          ///< something
0397   eInputReaderReactivate, ///< reader is on top of the stack again after another
0398                           ///< reader was popped off
0399   eInputReaderDeactivate, ///< another reader was pushed on the stack
0400   eInputReaderGotToken,   ///< reader got one of its tokens (granularity)
0401   eInputReaderInterrupt, ///< reader received an interrupt signal (probably from
0402                          ///< a control-c)
0403   eInputReaderEndOfFile, ///< reader received an EOF char (probably from a
0404                          ///< control-d)
0405   eInputReaderDone       ///< reader was just popped off the stack and is done
0406 };
0407 
0408 FLAGS_ENUM(BreakpointEventType){
0409     eBreakpointEventTypeInvalidType = (1u << 0),
0410     eBreakpointEventTypeAdded = (1u << 1),
0411     eBreakpointEventTypeRemoved = (1u << 2),
0412     eBreakpointEventTypeLocationsAdded = (1u << 3), ///< Locations added doesn't
0413                                                     ///< get sent when the
0414                                                     ///< breakpoint is created
0415     eBreakpointEventTypeLocationsRemoved = (1u << 4),
0416     eBreakpointEventTypeLocationsResolved = (1u << 5),
0417     eBreakpointEventTypeEnabled = (1u << 6),
0418     eBreakpointEventTypeDisabled = (1u << 7),
0419     eBreakpointEventTypeCommandChanged = (1u << 8),
0420     eBreakpointEventTypeConditionChanged = (1u << 9),
0421     eBreakpointEventTypeIgnoreChanged = (1u << 10),
0422     eBreakpointEventTypeThreadChanged = (1u << 11),
0423     eBreakpointEventTypeAutoContinueChanged = (1u << 12)};
0424 
0425 FLAGS_ENUM(WatchpointEventType){
0426     eWatchpointEventTypeInvalidType = (1u << 0),
0427     eWatchpointEventTypeAdded = (1u << 1),
0428     eWatchpointEventTypeRemoved = (1u << 2),
0429     eWatchpointEventTypeEnabled = (1u << 6),
0430     eWatchpointEventTypeDisabled = (1u << 7),
0431     eWatchpointEventTypeCommandChanged = (1u << 8),
0432     eWatchpointEventTypeConditionChanged = (1u << 9),
0433     eWatchpointEventTypeIgnoreChanged = (1u << 10),
0434     eWatchpointEventTypeThreadChanged = (1u << 11),
0435     eWatchpointEventTypeTypeChanged = (1u << 12)};
0436 
0437 enum WatchpointWriteType {
0438   /// Don't stop when the watched memory region is written to.
0439   eWatchpointWriteTypeDisabled,
0440   /// Stop on any write access to the memory region, even if
0441   /// the value doesn't change.  On some architectures, a write
0442   /// near the memory region may be falsely reported as a match,
0443   /// and notify this spurious stop as a watchpoint trap.
0444   eWatchpointWriteTypeAlways,
0445   /// Stop on a write to the memory region that changes its value.
0446   /// This is most likely the behavior a user expects, and is the
0447   /// behavior in gdb.  lldb can silently ignore writes near the
0448   /// watched memory region that are reported as accesses to lldb.
0449   eWatchpointWriteTypeOnModify
0450 };
0451 
0452 /// Programming language type.
0453 ///
0454 /// These enumerations use the same language enumerations as the DWARF
0455 /// specification for ease of use and consistency.
0456 /// The enum -> string code is in Language.cpp, don't change this
0457 /// table without updating that code as well.
0458 ///
0459 /// This datatype is used in SBExpressionOptions::SetLanguage() which
0460 /// makes this type API. Do not change its underlying storage type!
0461 enum LanguageType {
0462   eLanguageTypeUnknown = 0x0000,        ///< Unknown or invalid language value.
0463   eLanguageTypeC89 = 0x0001,            ///< ISO C:1989.
0464   eLanguageTypeC = 0x0002,              ///< Non-standardized C, such as K&R.
0465   eLanguageTypeAda83 = 0x0003,          ///< ISO Ada:1983.
0466   eLanguageTypeC_plus_plus = 0x0004,    ///< ISO C++:1998.
0467   eLanguageTypeCobol74 = 0x0005,        ///< ISO Cobol:1974.
0468   eLanguageTypeCobol85 = 0x0006,        ///< ISO Cobol:1985.
0469   eLanguageTypeFortran77 = 0x0007,      ///< ISO Fortran 77.
0470   eLanguageTypeFortran90 = 0x0008,      ///< ISO Fortran 90.
0471   eLanguageTypePascal83 = 0x0009,       ///< ISO Pascal:1983.
0472   eLanguageTypeModula2 = 0x000a,        ///< ISO Modula-2:1996.
0473   eLanguageTypeJava = 0x000b,           ///< Java.
0474   eLanguageTypeC99 = 0x000c,            ///< ISO C:1999.
0475   eLanguageTypeAda95 = 0x000d,          ///< ISO Ada:1995.
0476   eLanguageTypeFortran95 = 0x000e,      ///< ISO Fortran 95.
0477   eLanguageTypePLI = 0x000f,            ///< ANSI PL/I:1976.
0478   eLanguageTypeObjC = 0x0010,           ///< Objective-C.
0479   eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
0480   eLanguageTypeUPC = 0x0012,            ///< Unified Parallel C.
0481   eLanguageTypeD = 0x0013,              ///< D.
0482   eLanguageTypePython = 0x0014,         ///< Python.
0483   // NOTE: The below are DWARF5 constants, subject to change upon
0484   // completion of the DWARF5 specification
0485   eLanguageTypeOpenCL = 0x0015,         ///< OpenCL.
0486   eLanguageTypeGo = 0x0016,             ///< Go.
0487   eLanguageTypeModula3 = 0x0017,        ///< Modula 3.
0488   eLanguageTypeHaskell = 0x0018,        ///< Haskell.
0489   eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
0490   eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
0491   eLanguageTypeOCaml = 0x001b,          ///< OCaml.
0492   eLanguageTypeRust = 0x001c,           ///< Rust.
0493   eLanguageTypeC11 = 0x001d,            ///< ISO C:2011.
0494   eLanguageTypeSwift = 0x001e,          ///< Swift.
0495   eLanguageTypeJulia = 0x001f,          ///< Julia.
0496   eLanguageTypeDylan = 0x0020,          ///< Dylan.
0497   eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
0498   eLanguageTypeFortran03 = 0x0022,      ///< ISO Fortran 2003.
0499   eLanguageTypeFortran08 = 0x0023,      ///< ISO Fortran 2008.
0500   eLanguageTypeRenderScript = 0x0024,
0501   eLanguageTypeBLISS = 0x0025,
0502   eLanguageTypeKotlin = 0x0026,
0503   eLanguageTypeZig = 0x0027,
0504   eLanguageTypeCrystal = 0x0028,
0505   eLanguageTypeC_plus_plus_17 = 0x002a, ///< ISO C++:2017.
0506   eLanguageTypeC_plus_plus_20 = 0x002b, ///< ISO C++:2020.
0507   eLanguageTypeC17 = 0x002c,
0508   eLanguageTypeFortran18 = 0x002d,
0509   eLanguageTypeAda2005 = 0x002e,
0510   eLanguageTypeAda2012 = 0x002f,
0511   eLanguageTypeHIP = 0x0030,
0512   eLanguageTypeAssembly = 0x0031,
0513   eLanguageTypeC_sharp = 0x0032,
0514   eLanguageTypeMojo = 0x0033,
0515 
0516   // Vendor Extensions
0517   // Note: Language::GetNameForLanguageType
0518   // assumes these can be used as indexes into array language_names, and
0519   // Language::SetLanguageFromCString and Language::AsCString assume these can
0520   // be used as indexes into array g_languages.
0521   eLanguageTypeMipsAssembler, ///< Mips_Assembler.
0522   // Mojo will move to the common list of languages once the DWARF committee
0523   // creates a language code for it.
0524   eNumLanguageTypes
0525 };
0526 
0527 enum InstrumentationRuntimeType {
0528   eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
0529   eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
0530   eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002,
0531   eInstrumentationRuntimeTypeMainThreadChecker = 0x0003,
0532   eInstrumentationRuntimeTypeSwiftRuntimeReporting = 0x0004,
0533   eInstrumentationRuntimeTypeLibsanitizersAsan = 0x0005,
0534   eNumInstrumentationRuntimeTypes
0535 };
0536 
0537 enum DynamicValueType {
0538   eNoDynamicValues = 0,
0539   eDynamicCanRunTarget = 1,
0540   eDynamicDontRunTarget = 2
0541 };
0542 
0543 enum StopShowColumn {
0544   eStopShowColumnAnsiOrCaret = 0,
0545   eStopShowColumnAnsi = 1,
0546   eStopShowColumnCaret = 2,
0547   eStopShowColumnNone = 3
0548 };
0549 
0550 enum AccessType {
0551   eAccessNone,
0552   eAccessPublic,
0553   eAccessPrivate,
0554   eAccessProtected,
0555   eAccessPackage
0556 };
0557 
0558 enum CommandArgumentType {
0559   eArgTypeAddress = 0,
0560   eArgTypeAddressOrExpression,
0561   eArgTypeAliasName,
0562   eArgTypeAliasOptions,
0563   eArgTypeArchitecture,
0564   eArgTypeBoolean,
0565   eArgTypeBreakpointID,
0566   eArgTypeBreakpointIDRange,
0567   eArgTypeBreakpointName,
0568   eArgTypeByteSize,
0569   eArgTypeClassName,
0570   eArgTypeCommandName,
0571   eArgTypeCount,
0572   eArgTypeDescriptionVerbosity,
0573   eArgTypeDirectoryName,
0574   eArgTypeDisassemblyFlavor,
0575   eArgTypeEndAddress,
0576   eArgTypeExpression,
0577   eArgTypeExpressionPath,
0578   eArgTypeExprFormat,
0579   eArgTypeFileLineColumn,
0580   eArgTypeFilename,
0581   eArgTypeFormat,
0582   eArgTypeFrameIndex,
0583   eArgTypeFullName,
0584   eArgTypeFunctionName,
0585   eArgTypeFunctionOrSymbol,
0586   eArgTypeGDBFormat,
0587   eArgTypeHelpText,
0588   eArgTypeIndex,
0589   eArgTypeLanguage,
0590   eArgTypeLineNum,
0591   eArgTypeLogCategory,
0592   eArgTypeLogChannel,
0593   eArgTypeMethod,
0594   eArgTypeName,
0595   eArgTypeNewPathPrefix,
0596   eArgTypeNumLines,
0597   eArgTypeNumberPerLine,
0598   eArgTypeOffset,
0599   eArgTypeOldPathPrefix,
0600   eArgTypeOneLiner,
0601   eArgTypePath,
0602   eArgTypePermissionsNumber,
0603   eArgTypePermissionsString,
0604   eArgTypePid,
0605   eArgTypePlugin,
0606   eArgTypeProcessName,
0607   eArgTypePythonClass,
0608   eArgTypePythonFunction,
0609   eArgTypePythonScript,
0610   eArgTypeQueueName,
0611   eArgTypeRegisterName,
0612   eArgTypeRegularExpression,
0613   eArgTypeRunArgs,
0614   eArgTypeRunMode,
0615   eArgTypeScriptedCommandSynchronicity,
0616   eArgTypeScriptLang,
0617   eArgTypeSearchWord,
0618   eArgTypeSelector,
0619   eArgTypeSettingIndex,
0620   eArgTypeSettingKey,
0621   eArgTypeSettingPrefix,
0622   eArgTypeSettingVariableName,
0623   eArgTypeShlibName,
0624   eArgTypeSourceFile,
0625   eArgTypeSortOrder,
0626   eArgTypeStartAddress,
0627   eArgTypeSummaryString,
0628   eArgTypeSymbol,
0629   eArgTypeThreadID,
0630   eArgTypeThreadIndex,
0631   eArgTypeThreadName,
0632   eArgTypeTypeName,
0633   eArgTypeUnsignedInteger,
0634   eArgTypeUnixSignal,
0635   eArgTypeVarName,
0636   eArgTypeValue,
0637   eArgTypeWidth,
0638   eArgTypeNone,
0639   eArgTypePlatform,
0640   eArgTypeWatchpointID,
0641   eArgTypeWatchpointIDRange,
0642   eArgTypeWatchType,
0643   eArgRawInput,
0644   eArgTypeCommand,
0645   eArgTypeColumnNum,
0646   eArgTypeModuleUUID,
0647   eArgTypeSaveCoreStyle,
0648   eArgTypeLogHandler,
0649   eArgTypeSEDStylePair,
0650   eArgTypeRecognizerID,
0651   eArgTypeConnectURL,
0652   eArgTypeTargetID,
0653   eArgTypeStopHookID,
0654   eArgTypeCompletionType,
0655   eArgTypeRemotePath,
0656   eArgTypeRemoteFilename,
0657   eArgTypeModule,
0658   eArgTypeCPUName,
0659   eArgTypeCPUFeatures,
0660   eArgTypeLastArg // Always keep this entry as the last entry in this
0661                   // enumeration!!
0662 };
0663 
0664 /// Symbol types.
0665 // Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63
0666 // entries you will have to resize that field.
0667 enum SymbolType {
0668   eSymbolTypeAny = 0,
0669   eSymbolTypeInvalid = 0,
0670   eSymbolTypeAbsolute,
0671   eSymbolTypeCode,
0672   eSymbolTypeResolver,
0673   eSymbolTypeData,
0674   eSymbolTypeTrampoline,
0675   eSymbolTypeRuntime,
0676   eSymbolTypeException,
0677   eSymbolTypeSourceFile,
0678   eSymbolTypeHeaderFile,
0679   eSymbolTypeObjectFile,
0680   eSymbolTypeCommonBlock,
0681   eSymbolTypeBlock,
0682   eSymbolTypeLocal,
0683   eSymbolTypeParam,
0684   eSymbolTypeVariable,
0685   eSymbolTypeVariableType,
0686   eSymbolTypeLineEntry,
0687   eSymbolTypeLineHeader,
0688   eSymbolTypeScopeBegin,
0689   eSymbolTypeScopeEnd,
0690   eSymbolTypeAdditional, ///< When symbols take more than one entry, the extra
0691                          ///< entries get this type
0692   eSymbolTypeCompiler,
0693   eSymbolTypeInstrumentation,
0694   eSymbolTypeUndefined,
0695   eSymbolTypeObjCClass,
0696   eSymbolTypeObjCMetaClass,
0697   eSymbolTypeObjCIVar,
0698   eSymbolTypeReExported
0699 };
0700 
0701 enum SectionType {
0702   eSectionTypeInvalid,
0703   eSectionTypeCode,
0704   eSectionTypeContainer, ///< The section contains child sections
0705   eSectionTypeData,
0706   eSectionTypeDataCString,         ///< Inlined C string data
0707   eSectionTypeDataCStringPointers, ///< Pointers to C string data
0708   eSectionTypeDataSymbolAddress,   ///< Address of a symbol in the symbol table
0709   eSectionTypeData4,
0710   eSectionTypeData8,
0711   eSectionTypeData16,
0712   eSectionTypeDataPointers,
0713   eSectionTypeDebug,
0714   eSectionTypeZeroFill,
0715   eSectionTypeDataObjCMessageRefs, ///< Pointer to function pointer + selector
0716   eSectionTypeDataObjCCFStrings,   ///< Objective-C const CFString/NSString
0717                                    ///< objects
0718   eSectionTypeDWARFDebugAbbrev,
0719   eSectionTypeDWARFDebugAddr,
0720   eSectionTypeDWARFDebugAranges,
0721   eSectionTypeDWARFDebugCuIndex,
0722   eSectionTypeDWARFDebugFrame,
0723   eSectionTypeDWARFDebugInfo,
0724   eSectionTypeDWARFDebugLine,
0725   eSectionTypeDWARFDebugLoc,
0726   eSectionTypeDWARFDebugMacInfo,
0727   eSectionTypeDWARFDebugMacro,
0728   eSectionTypeDWARFDebugPubNames,
0729   eSectionTypeDWARFDebugPubTypes,
0730   eSectionTypeDWARFDebugRanges,
0731   eSectionTypeDWARFDebugStr,
0732   eSectionTypeDWARFDebugStrOffsets,
0733   eSectionTypeDWARFAppleNames,
0734   eSectionTypeDWARFAppleTypes,
0735   eSectionTypeDWARFAppleNamespaces,
0736   eSectionTypeDWARFAppleObjC,
0737   eSectionTypeELFSymbolTable,       ///< Elf SHT_SYMTAB section
0738   eSectionTypeELFDynamicSymbols,    ///< Elf SHT_DYNSYM section
0739   eSectionTypeELFRelocationEntries, ///< Elf SHT_REL or SHT_REL section
0740   eSectionTypeELFDynamicLinkInfo,   ///< Elf SHT_DYNAMIC section
0741   eSectionTypeEHFrame,
0742   eSectionTypeARMexidx,
0743   eSectionTypeARMextab,
0744   eSectionTypeCompactUnwind, ///< compact unwind section in Mach-O,
0745                              ///< __TEXT,__unwind_info
0746   eSectionTypeGoSymtab,
0747   eSectionTypeAbsoluteAddress, ///< Dummy section for symbols with absolute
0748                                ///< address
0749   eSectionTypeDWARFGNUDebugAltLink,
0750   eSectionTypeDWARFDebugTypes, ///< DWARF .debug_types section
0751   eSectionTypeDWARFDebugNames, ///< DWARF v5 .debug_names
0752   eSectionTypeOther,
0753   eSectionTypeDWARFDebugLineStr,  ///< DWARF v5 .debug_line_str
0754   eSectionTypeDWARFDebugRngLists, ///< DWARF v5 .debug_rnglists
0755   eSectionTypeDWARFDebugLocLists, ///< DWARF v5 .debug_loclists
0756   eSectionTypeDWARFDebugAbbrevDwo,
0757   eSectionTypeDWARFDebugInfoDwo,
0758   eSectionTypeDWARFDebugStrDwo,
0759   eSectionTypeDWARFDebugStrOffsetsDwo,
0760   eSectionTypeDWARFDebugTypesDwo,
0761   eSectionTypeDWARFDebugRngListsDwo,
0762   eSectionTypeDWARFDebugLocDwo,
0763   eSectionTypeDWARFDebugLocListsDwo,
0764   eSectionTypeDWARFDebugTuIndex,
0765   eSectionTypeCTF,
0766   eSectionTypeLLDBTypeSummaries,
0767   eSectionTypeLLDBFormatters,
0768   eSectionTypeSwiftModules,
0769 };
0770 
0771 FLAGS_ENUM(EmulateInstructionOptions){
0772     eEmulateInstructionOptionNone = (0u),
0773     eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
0774     eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
0775 
0776 FLAGS_ENUM(FunctionNameType){
0777     eFunctionNameTypeNone = 0u,
0778     eFunctionNameTypeAuto =
0779         (1u << 1), ///< Automatically figure out which FunctionNameType
0780                    ///< bits to set based on the function name.
0781     eFunctionNameTypeFull = (1u << 2), ///< The function name.
0782     ///< For C this is the same as just the name of the function For C++ this is
0783     ///< the mangled or demangled version of the mangled name. For ObjC this is
0784     ///< the full function signature with the + or - and the square brackets and
0785     ///< the class and selector
0786     eFunctionNameTypeBase = (1u
0787                              << 3), ///< The function name only, no namespaces
0788                                     ///< or arguments and no class
0789                                     ///< methods or selectors will be searched.
0790     eFunctionNameTypeMethod = (1u << 4), ///< Find function by method name (C++)
0791                                          ///< with no namespace or arguments
0792     eFunctionNameTypeSelector =
0793         (1u << 5), ///< Find function by selector name (ObjC) names
0794     eFunctionNameTypeAny =
0795         eFunctionNameTypeAuto ///< DEPRECATED: use eFunctionNameTypeAuto
0796 };
0797 LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType)
0798 
0799 /// Basic types enumeration for the public API SBType::GetBasicType().
0800 enum BasicType {
0801   eBasicTypeInvalid = 0,
0802   eBasicTypeVoid = 1,
0803   eBasicTypeChar,
0804   eBasicTypeSignedChar,
0805   eBasicTypeUnsignedChar,
0806   eBasicTypeWChar,
0807   eBasicTypeSignedWChar,
0808   eBasicTypeUnsignedWChar,
0809   eBasicTypeChar16,
0810   eBasicTypeChar32,
0811   eBasicTypeChar8,
0812   eBasicTypeShort,
0813   eBasicTypeUnsignedShort,
0814   eBasicTypeInt,
0815   eBasicTypeUnsignedInt,
0816   eBasicTypeLong,
0817   eBasicTypeUnsignedLong,
0818   eBasicTypeLongLong,
0819   eBasicTypeUnsignedLongLong,
0820   eBasicTypeInt128,
0821   eBasicTypeUnsignedInt128,
0822   eBasicTypeBool,
0823   eBasicTypeHalf,
0824   eBasicTypeFloat,
0825   eBasicTypeDouble,
0826   eBasicTypeLongDouble,
0827   eBasicTypeFloatComplex,
0828   eBasicTypeDoubleComplex,
0829   eBasicTypeLongDoubleComplex,
0830   eBasicTypeObjCID,
0831   eBasicTypeObjCClass,
0832   eBasicTypeObjCSel,
0833   eBasicTypeNullPtr,
0834   eBasicTypeOther
0835 };
0836 
0837 /// Deprecated
0838 enum TraceType {
0839   eTraceTypeNone = 0,
0840 
0841   /// Intel Processor Trace
0842   eTraceTypeProcessorTrace
0843 };
0844 
0845 enum StructuredDataType {
0846   eStructuredDataTypeInvalid = -1,
0847   eStructuredDataTypeNull = 0,
0848   eStructuredDataTypeGeneric,
0849   eStructuredDataTypeArray,
0850   eStructuredDataTypeInteger,
0851   eStructuredDataTypeFloat,
0852   eStructuredDataTypeBoolean,
0853   eStructuredDataTypeString,
0854   eStructuredDataTypeDictionary,
0855   eStructuredDataTypeSignedInteger,
0856   eStructuredDataTypeUnsignedInteger = eStructuredDataTypeInteger,
0857 };
0858 
0859 FLAGS_ENUM(TypeClass){
0860     eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
0861     eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
0862     eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
0863     eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
0864     eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
0865     eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
0866     eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
0867     eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
0868     eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
0869     eTypeClassVector = (1u << 17),
0870     // Define the last type class as the MSBit of a 32 bit value
0871     eTypeClassOther = (1u << 31),
0872     // Define a mask that can be used for any type when finding types
0873     eTypeClassAny = (0xffffffffu)};
0874 LLDB_MARK_AS_BITMASK_ENUM(TypeClass)
0875 
0876 enum TemplateArgumentKind {
0877   eTemplateArgumentKindNull = 0,
0878   eTemplateArgumentKindType,
0879   eTemplateArgumentKindDeclaration,
0880   eTemplateArgumentKindIntegral,
0881   eTemplateArgumentKindTemplate,
0882   eTemplateArgumentKindTemplateExpansion,
0883   eTemplateArgumentKindExpression,
0884   eTemplateArgumentKindPack,
0885   eTemplateArgumentKindNullPtr,
0886   eTemplateArgumentKindStructuralValue,
0887 };
0888 
0889 /// Type of match to be performed when looking for a formatter for a data type.
0890 /// Used by classes like SBTypeNameSpecifier or lldb_private::TypeMatcher.
0891 enum FormatterMatchType {
0892   eFormatterMatchExact,
0893   eFormatterMatchRegex,
0894   eFormatterMatchCallback,
0895 
0896   eLastFormatterMatchType = eFormatterMatchCallback,
0897 };
0898 
0899 /// Options that can be set for a formatter to alter its behavior. Not
0900 /// all of these are applicable to all formatter types.
0901 FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
0902                         eTypeOptionCascade = (1u << 0),
0903                         eTypeOptionSkipPointers = (1u << 1),
0904                         eTypeOptionSkipReferences = (1u << 2),
0905                         eTypeOptionHideChildren = (1u << 3),
0906                         eTypeOptionHideValue = (1u << 4),
0907                         eTypeOptionShowOneLiner = (1u << 5),
0908                         eTypeOptionHideNames = (1u << 6),
0909                         eTypeOptionNonCacheable = (1u << 7),
0910                         eTypeOptionHideEmptyAggregates = (1u << 8),
0911                         eTypeOptionFrontEndWantsDereference = (1u << 9)};
0912 
0913 /// This is the return value for frame comparisons.  If you are comparing frame
0914 /// A to frame B the following cases arise:
0915 ///
0916 ///    1) When frame A pushes frame B (or a frame that ends up pushing
0917 ///       B) A is Older than B.
0918 ///
0919 ///    2) When frame A pushed frame B (or if frameA is on the stack
0920 ///       but B is not) A is Younger than B.
0921 ///
0922 ///    3) When frame A and frame B have the same StackID, they are
0923 ///       Equal.
0924 ///
0925 ///    4) When frame A and frame B have the same immediate parent
0926 ///       frame, but are not equal, the comparison yields SameParent.
0927 ///
0928 ///    5) If the two frames are on different threads or processes the
0929 ///       comparison is Invalid.
0930 ///
0931 ///    6) If for some reason we can't figure out what went on, we
0932 ///       return Unknown.
0933 enum FrameComparison {
0934   eFrameCompareInvalid,
0935   eFrameCompareUnknown,
0936   eFrameCompareEqual,
0937   eFrameCompareSameParent,
0938   eFrameCompareYounger,
0939   eFrameCompareOlder
0940 };
0941 
0942 /// File Permissions.
0943 ///
0944 /// Designed to mimic the unix file permission bits so they can be used with
0945 /// functions that set 'mode_t' to certain values for permissions.
0946 FLAGS_ENUM(FilePermissions){
0947     eFilePermissionsUserRead = (1u << 8),
0948     eFilePermissionsUserWrite = (1u << 7),
0949     eFilePermissionsUserExecute = (1u << 6),
0950     eFilePermissionsGroupRead = (1u << 5),
0951     eFilePermissionsGroupWrite = (1u << 4),
0952     eFilePermissionsGroupExecute = (1u << 3),
0953     eFilePermissionsWorldRead = (1u << 2),
0954     eFilePermissionsWorldWrite = (1u << 1),
0955     eFilePermissionsWorldExecute = (1u << 0),
0956 
0957     eFilePermissionsUserRW = (eFilePermissionsUserRead |
0958                               eFilePermissionsUserWrite | 0),
0959     eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
0960                                   eFilePermissionsUserExecute),
0961     eFilePermissionsUserRWX = (eFilePermissionsUserRead |
0962                                eFilePermissionsUserWrite |
0963                                eFilePermissionsUserExecute),
0964 
0965     eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
0966                                eFilePermissionsGroupWrite | 0),
0967     eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
0968                                eFilePermissionsGroupExecute),
0969     eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
0970                                 eFilePermissionsGroupWrite |
0971                                 eFilePermissionsGroupExecute),
0972 
0973     eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
0974                                eFilePermissionsWorldWrite | 0),
0975     eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
0976                                eFilePermissionsWorldExecute),
0977     eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
0978                                 eFilePermissionsWorldWrite |
0979                                 eFilePermissionsWorldExecute),
0980 
0981     eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
0982                                  eFilePermissionsGroupRead |
0983                                  eFilePermissionsWorldRead),
0984     eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
0985                                  eFilePermissionsGroupWrite |
0986                                  eFilePermissionsWorldWrite),
0987     eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
0988                                  eFilePermissionsGroupExecute |
0989                                  eFilePermissionsWorldExecute),
0990 
0991     eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
0992                                   eFilePermissionsEveryoneW | 0),
0993     eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
0994                                   eFilePermissionsEveryoneX),
0995     eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
0996                                    eFilePermissionsEveryoneW |
0997                                    eFilePermissionsEveryoneX),
0998     eFilePermissionsFileDefault = eFilePermissionsUserRW,
0999     eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
1000 };
1001 
1002 /// Queue work item types.
1003 ///
1004 /// The different types of work that can be enqueued on a libdispatch aka Grand
1005 /// Central Dispatch (GCD) queue.
1006 enum QueueItemKind {
1007   eQueueItemKindUnknown = 0,
1008   eQueueItemKindFunction,
1009   eQueueItemKindBlock
1010 };
1011 
1012 /// Queue type.
1013 ///
1014 /// libdispatch aka Grand Central Dispatch (GCD) queues can be either
1015 /// serial (executing on one thread) or concurrent (executing on
1016 /// multiple threads).
1017 enum QueueKind {
1018   eQueueKindUnknown = 0,
1019   eQueueKindSerial,
1020   eQueueKindConcurrent
1021 };
1022 
1023 /// Expression Evaluation Stages.
1024 ///
1025 /// These are the cancellable stages of expression evaluation, passed
1026 /// to the expression evaluation callback, so that you can interrupt
1027 /// expression evaluation at the various points in its lifecycle.
1028 enum ExpressionEvaluationPhase {
1029   eExpressionEvaluationParse = 0,
1030   eExpressionEvaluationIRGen,
1031   eExpressionEvaluationExecution,
1032   eExpressionEvaluationComplete
1033 };
1034 
1035 /// Architecture-agnostic categorization of instructions for traversing the
1036 /// control flow of a trace.
1037 ///
1038 /// A single instruction can match one or more of these categories.
1039 enum InstructionControlFlowKind {
1040   /// The instruction could not be classified.
1041   eInstructionControlFlowKindUnknown = 0,
1042   /// The instruction is something not listed below, i.e. it's a sequential
1043   /// instruction that doesn't affect the control flow of the program.
1044   eInstructionControlFlowKindOther,
1045   /// The instruction is a near (function) call.
1046   eInstructionControlFlowKindCall,
1047   /// The instruction is a near (function) return.
1048   eInstructionControlFlowKindReturn,
1049   /// The instruction is a near unconditional jump.
1050   eInstructionControlFlowKindJump,
1051   /// The instruction is a near conditional jump.
1052   eInstructionControlFlowKindCondJump,
1053   /// The instruction is a call-like far transfer.
1054   /// E.g. SYSCALL, SYSENTER, or FAR CALL.
1055   eInstructionControlFlowKindFarCall,
1056   /// The instruction is a return-like far transfer.
1057   /// E.g. SYSRET, SYSEXIT, IRET, or FAR RET.
1058   eInstructionControlFlowKindFarReturn,
1059   /// The instruction is a jump-like far transfer.
1060   /// E.g. FAR JMP.
1061   eInstructionControlFlowKindFarJump
1062 };
1063 
1064 /// Watchpoint Kind.
1065 ///
1066 /// Indicates what types of events cause the watchpoint to fire. Used by Native
1067 /// *Protocol-related classes.
1068 FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
1069                            eWatchpointKindRead = (1u << 1)};
1070 
1071 enum GdbSignal {
1072   eGdbSignalBadAccess = 0x91,
1073   eGdbSignalBadInstruction = 0x92,
1074   eGdbSignalArithmetic = 0x93,
1075   eGdbSignalEmulation = 0x94,
1076   eGdbSignalSoftware = 0x95,
1077   eGdbSignalBreakpoint = 0x96
1078 };
1079 
1080 /// Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are
1081 /// related to LLDB on the current host machine. Most files are
1082 /// relative to LLDB or are in known locations.
1083 enum PathType {
1084   ePathTypeLLDBShlibDir, ///< The directory where the lldb.so (unix) or LLDB
1085                          ///< mach-o file in LLDB.framework (MacOSX) exists
1086   ePathTypeSupportExecutableDir, ///< Find LLDB support executable directory
1087                                  ///< (debugserver, etc)
1088   ePathTypeHeaderDir,            ///< Find LLDB header file directory
1089   ePathTypePythonDir,            ///< Find Python modules (PYTHONPATH) directory
1090   ePathTypeLLDBSystemPlugins,    ///< System plug-ins directory
1091   ePathTypeLLDBUserPlugins,      ///< User plug-ins directory
1092   ePathTypeLLDBTempSystemDir, ///< The LLDB temp directory for this system that
1093                               ///< will be cleaned up on exit
1094   ePathTypeGlobalLLDBTempSystemDir, ///< The LLDB temp directory for this
1095                                     ///< system, NOT cleaned up on a process
1096                                     ///< exit.
1097   ePathTypeClangDir ///< Find path to Clang builtin headers
1098 };
1099 
1100 /// Kind of member function.
1101 ///
1102 /// Used by the type system.
1103 enum MemberFunctionKind {
1104   eMemberFunctionKindUnknown = 0,    ///< Not sure what the type of this is
1105   eMemberFunctionKindConstructor,    ///< A function used to create instances
1106   eMemberFunctionKindDestructor,     ///< A function used to tear down existing
1107                                      ///< instances
1108   eMemberFunctionKindInstanceMethod, ///< A function that applies to a specific
1109                                      ///< instance
1110   eMemberFunctionKindStaticMethod ///< A function that applies to a type rather
1111                                   ///< than any instance
1112 };
1113 
1114 /// String matching algorithm used by SBTarget.
1115 enum MatchType {
1116   eMatchTypeNormal,
1117   eMatchTypeRegex,
1118   eMatchTypeStartsWith,
1119   eMatchTypeRegexInsensitive
1120 };
1121 
1122 /// Bitmask that describes details about a type.
1123 FLAGS_ENUM(TypeFlags){
1124     eTypeHasChildren = (1u << 0),       eTypeHasValue = (1u << 1),
1125     eTypeIsArray = (1u << 2),           eTypeIsBlock = (1u << 3),
1126     eTypeIsBuiltIn = (1u << 4),         eTypeIsClass = (1u << 5),
1127     eTypeIsCPlusPlus = (1u << 6),       eTypeIsEnumeration = (1u << 7),
1128     eTypeIsFuncPrototype = (1u << 8),   eTypeIsMember = (1u << 9),
1129     eTypeIsObjC = (1u << 10),           eTypeIsPointer = (1u << 11),
1130     eTypeIsReference = (1u << 12),      eTypeIsStructUnion = (1u << 13),
1131     eTypeIsTemplate = (1u << 14),       eTypeIsTypedef = (1u << 15),
1132     eTypeIsVector = (1u << 16),         eTypeIsScalar = (1u << 17),
1133     eTypeIsInteger = (1u << 18),        eTypeIsFloat = (1u << 19),
1134     eTypeIsComplex = (1u << 20),        eTypeIsSigned = (1u << 21),
1135     eTypeInstanceIsPointer = (1u << 22)};
1136 
1137 FLAGS_ENUM(CommandFlags){
1138     /// eCommandRequiresTarget
1139     ///
1140     /// Ensures a valid target is contained in m_exe_ctx prior to executing the
1141     /// command. If a target doesn't exist or is invalid, the command will fail
1142     /// and CommandObject::GetInvalidTargetDescription() will be returned as the
1143     /// error. CommandObject subclasses can override the virtual function for
1144     /// GetInvalidTargetDescription() to provide custom strings when needed.
1145     eCommandRequiresTarget = (1u << 0),
1146     /// eCommandRequiresProcess
1147     ///
1148     /// Ensures a valid process is contained in m_exe_ctx prior to executing the
1149     /// command. If a process doesn't exist or is invalid, the command will fail
1150     /// and CommandObject::GetInvalidProcessDescription() will be returned as
1151     /// the error. CommandObject subclasses can override the virtual function
1152     /// for GetInvalidProcessDescription() to provide custom strings when
1153     /// needed.
1154     eCommandRequiresProcess = (1u << 1),
1155     /// eCommandRequiresThread
1156     ///
1157     /// Ensures a valid thread is contained in m_exe_ctx prior to executing the
1158     /// command. If a thread doesn't exist or is invalid, the command will fail
1159     /// and CommandObject::GetInvalidThreadDescription() will be returned as the
1160     /// error. CommandObject subclasses can override the virtual function for
1161     /// GetInvalidThreadDescription() to provide custom strings when needed.
1162     eCommandRequiresThread = (1u << 2),
1163     /// eCommandRequiresFrame
1164     ///
1165     /// Ensures a valid frame is contained in m_exe_ctx prior to executing the
1166     /// command. If a frame doesn't exist or is invalid, the command will fail
1167     /// and CommandObject::GetInvalidFrameDescription() will be returned as the
1168     /// error. CommandObject subclasses can override the virtual function for
1169     /// GetInvalidFrameDescription() to provide custom strings when needed.
1170     eCommandRequiresFrame = (1u << 3),
1171     /// eCommandRequiresRegContext
1172     ///
1173     /// Ensures a valid register context (from the selected frame if there is a
1174     /// frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is
1175     /// available from m_exe_ctx prior to executing the command. If a target
1176     /// doesn't exist or is invalid, the command will fail and
1177     /// CommandObject::GetInvalidRegContextDescription() will be returned as the
1178     /// error. CommandObject subclasses can override the virtual function for
1179     /// GetInvalidRegContextDescription() to provide custom strings when needed.
1180     eCommandRequiresRegContext = (1u << 4),
1181     /// eCommandTryTargetAPILock
1182     ///
1183     /// Attempts to acquire the target lock if a target is selected in the
1184     /// command interpreter. If the command object fails to acquire the API
1185     /// lock, the command will fail with an appropriate error message.
1186     eCommandTryTargetAPILock = (1u << 5),
1187     /// eCommandProcessMustBeLaunched
1188     ///
1189     /// Verifies that there is a launched process in m_exe_ctx, if there isn't,
1190     /// the command will fail with an appropriate error message.
1191     eCommandProcessMustBeLaunched = (1u << 6),
1192     /// eCommandProcessMustBePaused
1193     ///
1194     /// Verifies that there is a paused process in m_exe_ctx, if there isn't,
1195     /// the command will fail with an appropriate error message.
1196     eCommandProcessMustBePaused = (1u << 7),
1197     /// eCommandProcessMustBeTraced
1198     ///
1199     /// Verifies that the process is being traced by a Trace plug-in, if it
1200     /// isn't the command will fail with an appropriate error message.
1201     eCommandProcessMustBeTraced = (1u << 8)};
1202 
1203 /// Whether a summary should cap how much data it returns to users or not.
1204 enum TypeSummaryCapping {
1205   eTypeSummaryCapped = true,
1206   eTypeSummaryUncapped = false
1207 };
1208 
1209 /// The result from a command interpreter run.
1210 enum CommandInterpreterResult {
1211   /// Command interpreter finished successfully.
1212   eCommandInterpreterResultSuccess,
1213   /// Stopped because the corresponding option was set and the inferior
1214   /// crashed.
1215   eCommandInterpreterResultInferiorCrash,
1216   /// Stopped because the corresponding option was set and a command returned
1217   /// an error.
1218   eCommandInterpreterResultCommandError,
1219   /// Stopped because quit was requested.
1220   eCommandInterpreterResultQuitRequested,
1221 };
1222 
1223 // Style of core file to create when calling SaveCore.
1224 enum SaveCoreStyle {
1225   eSaveCoreUnspecified = 0,
1226   eSaveCoreFull = 1,
1227   eSaveCoreDirtyOnly = 2,
1228   eSaveCoreStackOnly = 3,
1229   eSaveCoreCustomOnly = 4,
1230 };
1231 
1232 /// Events that might happen during a trace session.
1233 enum TraceEvent {
1234   /// Tracing was disabled for some time due to a software trigger.
1235   eTraceEventDisabledSW,
1236   /// Tracing was disable for some time due to a hardware trigger.
1237   eTraceEventDisabledHW,
1238   /// Event due to CPU change for a thread. This event is also fired when
1239   /// suddenly it's not possible to identify the cpu of a given thread.
1240   eTraceEventCPUChanged,
1241   /// Event due to a CPU HW clock tick.
1242   eTraceEventHWClockTick,
1243   /// The underlying tracing technology emitted a synchronization event used by
1244   /// trace processors.
1245   eTraceEventSyncPoint,
1246 };
1247 
1248 // Enum used to identify which kind of item a \a TraceCursor is pointing at
1249 enum TraceItemKind {
1250   eTraceItemKindError = 0,
1251   eTraceItemKindEvent,
1252   eTraceItemKindInstruction,
1253 };
1254 
1255 /// Enum to indicate the reference point when invoking
1256 /// \a TraceCursor::Seek().
1257 /// The following values are inspired by \a std::istream::seekg.
1258 enum TraceCursorSeekType {
1259   /// The beginning of the trace, i.e the oldest item.
1260   eTraceCursorSeekTypeBeginning = 0,
1261   /// The current position in the trace.
1262   eTraceCursorSeekTypeCurrent,
1263   /// The end of the trace, i.e the most recent item.
1264   eTraceCursorSeekTypeEnd
1265 };
1266 
1267 /// Enum to control the verbosity level of `dwim-print` execution.
1268 enum DWIMPrintVerbosity {
1269   /// Run `dwim-print` with no verbosity.
1270   eDWIMPrintVerbosityNone,
1271   /// Print a message when `dwim-print` uses `expression` evaluation.
1272   eDWIMPrintVerbosityExpression,
1273   /// Always print a message indicating how `dwim-print` is evaluating its
1274   /// expression.
1275   eDWIMPrintVerbosityFull,
1276 };
1277 
1278 enum WatchpointValueKind {
1279   eWatchPointValueKindInvalid = 0,
1280   ///< Watchpoint was created watching a variable
1281   eWatchPointValueKindVariable = 1,
1282   ///< Watchpoint was created watching the result of an expression that was
1283   ///< evaluated at creation time.
1284   eWatchPointValueKindExpression = 2,
1285 };
1286 
1287 enum CompletionType {
1288   eNoCompletion = 0ul,
1289   eSourceFileCompletion = (1ul << 0),
1290   eDiskFileCompletion = (1ul << 1),
1291   eDiskDirectoryCompletion = (1ul << 2),
1292   eSymbolCompletion = (1ul << 3),
1293   eModuleCompletion = (1ul << 4),
1294   eSettingsNameCompletion = (1ul << 5),
1295   ePlatformPluginCompletion = (1ul << 6),
1296   eArchitectureCompletion = (1ul << 7),
1297   eVariablePathCompletion = (1ul << 8),
1298   eRegisterCompletion = (1ul << 9),
1299   eBreakpointCompletion = (1ul << 10),
1300   eProcessPluginCompletion = (1ul << 11),
1301   eDisassemblyFlavorCompletion = (1ul << 12),
1302   eTypeLanguageCompletion = (1ul << 13),
1303   eFrameIndexCompletion = (1ul << 14),
1304   eModuleUUIDCompletion = (1ul << 15),
1305   eStopHookIDCompletion = (1ul << 16),
1306   eThreadIndexCompletion = (1ul << 17),
1307   eWatchpointIDCompletion = (1ul << 18),
1308   eBreakpointNameCompletion = (1ul << 19),
1309   eProcessIDCompletion = (1ul << 20),
1310   eProcessNameCompletion = (1ul << 21),
1311   eRemoteDiskFileCompletion = (1ul << 22),
1312   eRemoteDiskDirectoryCompletion = (1ul << 23),
1313   eTypeCategoryNameCompletion = (1ul << 24),
1314   eCustomCompletion = (1ul << 25),
1315   eThreadIDCompletion = (1ul << 26),
1316   // This last enum element is just for input validation.
1317   // Add new completions before this element,
1318   // and then increment eTerminatorCompletion's shift value
1319   eTerminatorCompletion = (1ul << 27)
1320 };
1321 
1322 /// Specifies if children need to be re-computed
1323 /// after a call to \ref SyntheticChildrenFrontEnd::Update.
1324 enum ChildCacheState {
1325   eRefetch = 0, ///< Children need to be recomputed dynamically.
1326 
1327   eReuse = 1, ///< Children did not change and don't need to be recomputed;
1328               ///< re-use what we computed the last time we called Update.
1329 };
1330 
1331 enum SymbolDownload {
1332   eSymbolDownloadOff = 0,
1333   eSymbolDownloadBackground = 1,
1334   eSymbolDownloadForeground = 2,
1335 };
1336 
1337 /// Used in the SBProcess AddressMask/FixAddress methods.
1338 enum AddressMaskType {
1339   eAddressMaskTypeCode = 0,
1340   eAddressMaskTypeData,
1341   eAddressMaskTypeAny,
1342   eAddressMaskTypeAll = eAddressMaskTypeAny
1343 };
1344 
1345 /// Used in the SBProcess AddressMask/FixAddress methods.
1346 enum AddressMaskRange {
1347   eAddressMaskRangeLow = 0,
1348   eAddressMaskRangeHigh,
1349   eAddressMaskRangeAny,
1350   eAddressMaskRangeAll = eAddressMaskRangeAny,
1351 };
1352 
1353 /// Used by the debugger to indicate which events are being broadcasted.
1354 enum DebuggerBroadcastBit {
1355   eBroadcastBitProgress = (1 << 0),
1356   eBroadcastBitWarning = (1 << 1),
1357   eBroadcastBitError = (1 << 2),
1358   eBroadcastSymbolChange = (1 << 3),
1359   eBroadcastBitProgressCategory = (1 << 4),
1360   eBroadcastBitExternalProgress = (1 << 5),
1361   eBroadcastBitExternalProgressCategory = (1 << 6),
1362 };
1363 
1364 /// Used for expressing severity in logs and diagnostics.
1365 enum Severity {
1366   eSeverityError,
1367   eSeverityWarning,
1368   eSeverityInfo, // Equivalent to Remark used in clang.
1369 };
1370 
1371 } // namespace lldb
1372 
1373 #endif // LLDB_LLDB_ENUMERATIONS_H