1 //===-- lldb-enumerations.h -------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_lldb_enumerations_h_
11 #define LLDB_lldb_enumerations_h_
14 // With MSVC, the default type of an enum is always signed, even if one of the
15 // enumerator values is too large to fit into a signed integer but would
16 // otherwise fit into an unsigned integer. As a result of this, all of LLDB's
17 // flag-style enumerations that specify something like eValueFoo = 1u << 31
18 // result in negative values. This usually just results in a benign warning,
19 // but in a few places we actually do comparisons on the enum values, which
20 // would cause a real bug. Furthermore, there's no way to silence only this
21 // warning, as it's part of -Wmicrosoft which also catches a whole slew of
22 // other useful issues.
24 // To make matters worse, early versions of SWIG don't recognize the syntax
25 // of specifying the underlying type of an enum (and Python doesn't care anyway)
26 // so we need a way to specify the underlying type when the enum is being used
27 // from C++ code, but just use a regular enum when swig is pre-processing.
28 #define FLAGS_ENUM(Name) enum Name : unsigned
29 #define FLAGS_ANONYMOUS_ENUM() enum : unsigned
31 #define FLAGS_ENUM(Name) enum Name
32 #define FLAGS_ANONYMOUS_ENUM() enum
37 //----------------------------------------------------------------------
38 // Process and Thread States
39 //----------------------------------------------------------------------
43 eStateUnloaded, ///< Process is object is valid, but not currently loaded
44 eStateConnected, ///< Process is connected to remote debug services, but not launched or attached to anything yet
45 eStateAttaching, ///< Process is currently trying to attach
46 eStateLaunching, ///< Process is in the process of launching
47 eStateStopped, ///< Process or thread is stopped and can be examined.
48 eStateRunning, ///< Process or thread is running and can't be examined.
49 eStateStepping, ///< Process or thread is in the process of stepping and can not be examined.
50 eStateCrashed, ///< Process or thread has crashed and can be examined.
51 eStateDetached, ///< Process has been detached and can't be examined.
52 eStateExited, ///< Process has exited and can't be examined.
53 eStateSuspended ///< Process or thread is in a suspended state as far
54 ///< as the debugger is concerned while other processes
55 ///< or threads get the chance to run.
58 //----------------------------------------------------------------------
60 //----------------------------------------------------------------------
61 FLAGS_ENUM(LaunchFlags)
64 eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling process into a new process
65 eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to allow the process to be debugged
66 eLaunchFlagStopAtEntry = (1u << 2), ///< Stop at the program entry point instead of auto-continuing when launching or attaching at entry point
67 eLaunchFlagDisableASLR = (1u << 3), ///< Disable Address Space Layout Randomization
68 eLaunchFlagDisableSTDIO = (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
69 eLaunchFlagLaunchInTTY = (1u << 5), ///< Launch the process in a new TTY if supported by the host
70 eLaunchFlagLaunchInShell= (1u << 6), ///< Launch the process inside a shell to get shell expansion
71 eLaunchFlagLaunchInSeparateProcessGroup = (1u << 7), ///< Launch the process in a separate process group
72 eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the process off (e.g. to debugserver)
73 ///< set this flag so lldb & the handee don't race to set its exit status.
74 eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub should detach rather than killing the debugee
75 ///< if it loses connection with lldb.
76 eLaunchFlagShellExpandArguments = (1u << 10), ///< Perform shell-style argument expansion
77 eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
80 //----------------------------------------------------------------------
82 //----------------------------------------------------------------------
90 //----------------------------------------------------------------------
91 // Byte ordering definitions
92 //----------------------------------------------------------------------
95 eByteOrderInvalid = 0,
101 //----------------------------------------------------------------------
102 // Register encoding definitions
103 //----------------------------------------------------------------------
106 eEncodingInvalid = 0,
107 eEncodingUint, // unsigned integer
108 eEncodingSint, // signed integer
109 eEncodingIEEE754, // float
110 eEncodingVector // vector registers
113 //----------------------------------------------------------------------
114 // Display format definitions
115 //----------------------------------------------------------------------
123 eFormatBytesWithASCII,
125 eFormatCharPrintable, // Only printable characters, space if not printable
126 eFormatComplex, // Floating point complex type
127 eFormatComplexFloat = eFormatComplex,
128 eFormatCString, // NULL terminated C strings
135 eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc...
141 eFormatVectorOfSInt8,
142 eFormatVectorOfUInt8,
143 eFormatVectorOfSInt16,
144 eFormatVectorOfUInt16,
145 eFormatVectorOfSInt32,
146 eFormatVectorOfUInt32,
147 eFormatVectorOfSInt64,
148 eFormatVectorOfUInt64,
149 eFormatVectorOfFloat16,
150 eFormatVectorOfFloat32,
151 eFormatVectorOfFloat64,
152 eFormatVectorOfUInt128,
153 eFormatComplexInteger, // Integer complex type
154 eFormatCharArray, // Print characters with no single quotes, used for character arrays that can contain non printable characters
155 eFormatAddressInfo, // Describe what an address points to (func + offset with file/line, symbol + offset, data, etc)
156 eFormatHexFloat, // ISO C99 hex float string
157 eFormatInstruction, // Disassemble an opcode
158 eFormatVoid, // Do not print this
162 //----------------------------------------------------------------------
163 // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
164 //----------------------------------------------------------------------
165 enum DescriptionLevel
167 eDescriptionLevelBrief = 0,
168 eDescriptionLevelFull,
169 eDescriptionLevelVerbose,
170 eDescriptionLevelInitial,
171 kNumDescriptionLevels
174 //----------------------------------------------------------------------
175 // Script interpreter types
176 //----------------------------------------------------------------------
180 eScriptLanguagePython,
181 eScriptLanguageDefault = eScriptLanguagePython
184 //----------------------------------------------------------------------
185 // Register numbering types
186 // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
187 // any of these to the lldb internal register numbering scheme
188 // (eRegisterKindLLDB).
189 //----------------------------------------------------------------------
192 eRegisterKindEHFrame = 0, // the register numbers seen in eh_frame
193 eRegisterKindDWARF, // the register numbers seen DWARF
194 eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target
195 eRegisterKindProcessPlugin, // num used by the process plugin - e.g. by the remote gdb-protocol stub program
196 eRegisterKindLLDB, // lldb's internal register numbers
200 //----------------------------------------------------------------------
201 // Thread stop reasons
202 //----------------------------------------------------------------------
205 eStopReasonInvalid = 0,
208 eStopReasonBreakpoint,
209 eStopReasonWatchpoint,
211 eStopReasonException,
212 eStopReasonExec, // Program was re-exec'ed
213 eStopReasonPlanComplete,
214 eStopReasonThreadExiting,
215 eStopReasonInstrumentation
218 //----------------------------------------------------------------------
219 // Command Return Status Types
220 //----------------------------------------------------------------------
223 eReturnStatusInvalid,
224 eReturnStatusSuccessFinishNoResult,
225 eReturnStatusSuccessFinishResult,
226 eReturnStatusSuccessContinuingNoResult,
227 eReturnStatusSuccessContinuingResult,
228 eReturnStatusStarted,
234 //----------------------------------------------------------------------
235 // The results of expression evaluation:
236 //----------------------------------------------------------------------
237 enum ExpressionResults
239 eExpressionCompleted = 0,
240 eExpressionSetupError,
241 eExpressionParseError,
242 eExpressionDiscarded,
243 eExpressionInterrupted,
244 eExpressionHitBreakpoint,
246 eExpressionResultUnavailable,
247 eExpressionStoppedForDebug
250 //----------------------------------------------------------------------
251 // Connection Status Types
252 //----------------------------------------------------------------------
253 enum ConnectionStatus
255 eConnectionStatusSuccess, // Success
256 eConnectionStatusEndOfFile, // End-of-file encountered
257 eConnectionStatusError, // Check GetError() for details
258 eConnectionStatusTimedOut, // Request timed out
259 eConnectionStatusNoConnection, // No connection
260 eConnectionStatusLostConnection, // Lost connection while connected to a valid connection
261 eConnectionStatusInterrupted // Interrupted read
267 eErrorTypeGeneric, ///< Generic errors that can be any value.
268 eErrorTypeMachKernel, ///< Mach kernel error codes.
269 eErrorTypePOSIX, ///< POSIX error codes.
270 eErrorTypeExpression, ///< These are from the ExpressionResults enum.
271 eErrorTypeWin32 ///< Standard Win32 error codes.
277 eValueTypeInvalid = 0,
278 eValueTypeVariableGlobal = 1, // globals variable
279 eValueTypeVariableStatic = 2, // static variable
280 eValueTypeVariableArgument = 3, // function argument variables
281 eValueTypeVariableLocal = 4, // function local variables
282 eValueTypeRegister = 5, // stack frame register value
283 eValueTypeRegisterSet = 6, // A collection of stack frame register values
284 eValueTypeConstResult = 7 // constant result variables
287 //----------------------------------------------------------------------
288 // Token size/granularities for Input Readers
289 //----------------------------------------------------------------------
291 enum InputReaderGranularity
293 eInputReaderGranularityInvalid = 0,
294 eInputReaderGranularityByte,
295 eInputReaderGranularityWord,
296 eInputReaderGranularityLine,
297 eInputReaderGranularityAll
300 //------------------------------------------------------------------
301 /// These mask bits allow a common interface for queries that can
302 /// limit the amount of information that gets parsed to only the
303 /// information that is requested. These bits also can indicate what
304 /// actually did get resolved during query function calls.
306 /// Each definition corresponds to a one of the member variables
307 /// in this class, and requests that that item be resolved, or
308 /// indicates that the member did get resolved.
309 //------------------------------------------------------------------
310 FLAGS_ENUM(SymbolContextItem)
312 eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from a query, or was located in query results
313 eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from a query, or was located in query results
314 eSymbolContextCompUnit = (1u << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
315 eSymbolContextFunction = (1u << 3), ///< Set when \a function is requested from a query, or was located in query results
316 eSymbolContextBlock = (1u << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
317 eSymbolContextLineEntry = (1u << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
318 eSymbolContextSymbol = (1u << 6), ///< Set when \a symbol is requested from a query, or was located in query results
319 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u), ///< Indicates to try and lookup everything up during a routine symbol context query.
320 eSymbolContextVariable = (1u << 7) ///< Set when \a global or static variable is requested from a query, or was located in query results.
321 ///< eSymbolContextVariable is potentially expensive to lookup so it isn't included in
322 ///< eSymbolContextEverything which stops it from being used during frame PC lookups and
323 ///< many other potential address to symbol context lookups.
326 FLAGS_ENUM(Permissions)
328 ePermissionsWritable = (1u << 0),
329 ePermissionsReadable = (1u << 1),
330 ePermissionsExecutable = (1u << 2)
333 enum InputReaderAction
335 eInputReaderActivate, // reader is newly pushed onto the reader stack
336 eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something
337 eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off
338 eInputReaderDeactivate, // another reader was pushed on the stack
339 eInputReaderGotToken, // reader got one of its tokens (granularity)
340 eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c)
341 eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d)
342 eInputReaderDone // reader was just popped off the stack and is done
345 FLAGS_ENUM(BreakpointEventType)
347 eBreakpointEventTypeInvalidType = (1u << 0),
348 eBreakpointEventTypeAdded = (1u << 1),
349 eBreakpointEventTypeRemoved = (1u << 2),
350 eBreakpointEventTypeLocationsAdded = (1u << 3), // Locations added doesn't get sent when the breakpoint is created
351 eBreakpointEventTypeLocationsRemoved = (1u << 4),
352 eBreakpointEventTypeLocationsResolved = (1u << 5),
353 eBreakpointEventTypeEnabled = (1u << 6),
354 eBreakpointEventTypeDisabled = (1u << 7),
355 eBreakpointEventTypeCommandChanged = (1u << 8),
356 eBreakpointEventTypeConditionChanged = (1u << 9),
357 eBreakpointEventTypeIgnoreChanged = (1u << 10),
358 eBreakpointEventTypeThreadChanged = (1u << 11)
361 FLAGS_ENUM(WatchpointEventType)
363 eWatchpointEventTypeInvalidType = (1u << 0),
364 eWatchpointEventTypeAdded = (1u << 1),
365 eWatchpointEventTypeRemoved = (1u << 2),
366 eWatchpointEventTypeEnabled = (1u << 6),
367 eWatchpointEventTypeDisabled = (1u << 7),
368 eWatchpointEventTypeCommandChanged = (1u << 8),
369 eWatchpointEventTypeConditionChanged = (1u << 9),
370 eWatchpointEventTypeIgnoreChanged = (1u << 10),
371 eWatchpointEventTypeThreadChanged = (1u << 11),
372 eWatchpointEventTypeTypeChanged = (1u << 12)
376 //----------------------------------------------------------------------
377 /// Programming language type.
379 /// These enumerations use the same language enumerations as the DWARF
380 /// specification for ease of use and consistency.
381 /// The enum -> string code is in LanguageRuntime.cpp, don't change this
382 /// table without updating that code as well.
383 //----------------------------------------------------------------------
386 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
387 eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
388 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
389 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
390 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
391 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
392 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
393 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
394 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
395 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
396 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
397 eLanguageTypeJava = 0x000b, ///< Java.
398 eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
399 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
400 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
401 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
402 eLanguageTypeObjC = 0x0010, ///< Objective-C.
403 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
404 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
405 eLanguageTypeD = 0x0013, ///< D.
406 eLanguageTypePython = 0x0014, ///< Python.
407 // NOTE: The below are DWARF5 constants, subject to change upon
408 // completion of the DWARF5 specification
409 eLanguageTypeOpenCL = 0x0015, ///< OpenCL.
410 eLanguageTypeGo = 0x0016, ///< Go.
411 eLanguageTypeModula3 = 0x0017, ///< Modula 3.
412 eLanguageTypeHaskell = 0x0018, ///< Haskell.
413 eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
414 eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
415 eLanguageTypeOCaml = 0x001b, ///< OCaml.
416 eLanguageTypeRust = 0x001c, ///< Rust.
417 eLanguageTypeC11 = 0x001d, ///< ISO C:2011.
418 eLanguageTypeSwift = 0x001e, ///< Swift.
419 eLanguageTypeJulia = 0x001f, ///< Julia.
420 eLanguageTypeDylan = 0x0020, ///< Dylan.
421 eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
422 eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003.
423 eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008.
425 // Note: Language::GetNameForLanguageType
426 // assumes these can be used as indexes into array language_names, and
427 // Language::SetLanguageFromCString and Language::AsCString
428 // assume these can be used as indexes into array g_languages.
429 eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler.
430 eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript.
434 enum InstrumentationRuntimeType
436 eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
437 eNumInstrumentationRuntimeTypes
440 enum DynamicValueType
442 eNoDynamicValues = 0,
443 eDynamicCanRunTarget = 1,
444 eDynamicDontRunTarget = 2
456 enum CommandArgumentType
459 eArgTypeAddressOrExpression,
461 eArgTypeAliasOptions,
462 eArgTypeArchitecture,
464 eArgTypeBreakpointID,
465 eArgTypeBreakpointIDRange,
466 eArgTypeBreakpointName,
471 eArgTypeDescriptionVerbosity,
472 eArgTypeDirectoryName,
473 eArgTypeDisassemblyFlavor,
476 eArgTypeExpressionPath,
482 eArgTypeFunctionName,
483 eArgTypeFunctionOrSymbol,
493 eArgTypeNewPathPrefix,
495 eArgTypeNumberPerLine,
497 eArgTypeOldPathPrefix,
500 eArgTypePermissionsNumber,
501 eArgTypePermissionsString,
506 eArgTypePythonFunction,
507 eArgTypePythonScript,
509 eArgTypeRegisterName,
510 eArgTypeRegularExpression,
513 eArgTypeScriptedCommandSynchronicity,
517 eArgTypeSettingIndex,
519 eArgTypeSettingPrefix,
520 eArgTypeSettingVariableName,
524 eArgTypeStartAddress,
525 eArgTypeSummaryString,
531 eArgTypeUnsignedInteger,
538 eArgTypeWatchpointID,
539 eArgTypeWatchpointIDRange,
541 eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
544 //----------------------------------------------------------------------
546 //----------------------------------------------------------------------
550 eSymbolTypeInvalid = 0,
555 eSymbolTypeTrampoline,
557 eSymbolTypeException,
558 eSymbolTypeSourceFile,
559 eSymbolTypeHeaderFile,
560 eSymbolTypeObjectFile,
561 eSymbolTypeCommonBlock,
566 eSymbolTypeVariableType,
567 eSymbolTypeLineEntry,
568 eSymbolTypeLineHeader,
569 eSymbolTypeScopeBegin,
571 eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
573 eSymbolTypeInstrumentation,
574 eSymbolTypeUndefined,
575 eSymbolTypeObjCClass,
576 eSymbolTypeObjCMetaClass,
578 eSymbolTypeReExported
585 eSectionTypeContainer, // The section contains child sections
587 eSectionTypeDataCString, // Inlined C string data
588 eSectionTypeDataCStringPointers, // Pointers to C string data
589 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
593 eSectionTypeDataPointers,
595 eSectionTypeZeroFill,
596 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
597 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
598 eSectionTypeDWARFDebugAbbrev,
599 eSectionTypeDWARFDebugAddr,
600 eSectionTypeDWARFDebugAranges,
601 eSectionTypeDWARFDebugFrame,
602 eSectionTypeDWARFDebugInfo,
603 eSectionTypeDWARFDebugLine,
604 eSectionTypeDWARFDebugLoc,
605 eSectionTypeDWARFDebugMacInfo,
606 eSectionTypeDWARFDebugMacro,
607 eSectionTypeDWARFDebugPubNames,
608 eSectionTypeDWARFDebugPubTypes,
609 eSectionTypeDWARFDebugRanges,
610 eSectionTypeDWARFDebugStr,
611 eSectionTypeDWARFDebugStrOffsets,
612 eSectionTypeDWARFAppleNames,
613 eSectionTypeDWARFAppleTypes,
614 eSectionTypeDWARFAppleNamespaces,
615 eSectionTypeDWARFAppleObjC,
616 eSectionTypeELFSymbolTable, // Elf SHT_SYMTAB section
617 eSectionTypeELFDynamicSymbols, // Elf SHT_DYNSYM section
618 eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
619 eSectionTypeELFDynamicLinkInfo, // Elf SHT_DYNAMIC section
621 eSectionTypeARMexidx,
622 eSectionTypeARMextab,
623 eSectionTypeCompactUnwind, // compact unwind section in Mach-O, __TEXT,__unwind_info
624 eSectionTypeGoSymtab,
628 FLAGS_ENUM(EmulateInstructionOptions)
630 eEmulateInstructionOptionNone = (0u),
631 eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
632 eEmulateInstructionOptionIgnoreConditions = (1u << 1)
635 FLAGS_ENUM(FunctionNameType)
637 eFunctionNameTypeNone = 0u,
638 eFunctionNameTypeAuto = (1u << 1), // Automatically figure out which FunctionNameType
639 // bits to set based on the function name.
640 eFunctionNameTypeFull = (1u << 2), // The function name.
641 // For C this is the same as just the name of the function
642 // For C++ this is the mangled or demangled version of the mangled name.
643 // For ObjC this is the full function signature with the + or
644 // - and the square brackets and the class and selector
645 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces or arguments and no class
646 // methods or selectors will be searched.
647 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++) with no namespace or arguments
648 eFunctionNameTypeSelector = (1u << 5), // Find function by selector name (ObjC) names
649 eFunctionNameTypeAny = eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
653 //----------------------------------------------------------------------
654 // Basic types enumeration for the public API SBType::GetBasicType()
655 //----------------------------------------------------------------------
658 eBasicTypeInvalid = 0,
661 eBasicTypeSignedChar,
662 eBasicTypeUnsignedChar,
664 eBasicTypeSignedWChar,
665 eBasicTypeUnsignedWChar,
669 eBasicTypeUnsignedShort,
671 eBasicTypeUnsignedInt,
673 eBasicTypeUnsignedLong,
675 eBasicTypeUnsignedLongLong,
677 eBasicTypeUnsignedInt128,
682 eBasicTypeLongDouble,
683 eBasicTypeFloatComplex,
684 eBasicTypeDoubleComplex,
685 eBasicTypeLongDoubleComplex,
693 FLAGS_ENUM(TypeClass)
695 eTypeClassInvalid = (0u),
696 eTypeClassArray = (1u << 0),
697 eTypeClassBlockPointer = (1u << 1),
698 eTypeClassBuiltin = (1u << 2),
699 eTypeClassClass = (1u << 3),
700 eTypeClassComplexFloat = (1u << 4),
701 eTypeClassComplexInteger = (1u << 5),
702 eTypeClassEnumeration = (1u << 6),
703 eTypeClassFunction = (1u << 7),
704 eTypeClassMemberPointer = (1u << 8),
705 eTypeClassObjCObject = (1u << 9),
706 eTypeClassObjCInterface = (1u << 10),
707 eTypeClassObjCObjectPointer = (1u << 11),
708 eTypeClassPointer = (1u << 12),
709 eTypeClassReference = (1u << 13),
710 eTypeClassStruct = (1u << 14),
711 eTypeClassTypedef = (1u << 15),
712 eTypeClassUnion = (1u << 16),
713 eTypeClassVector = (1u << 17),
714 // Define the last type class as the MSBit of a 32 bit value
715 eTypeClassOther = (1u << 31),
716 // Define a mask that can be used for any type when finding types
717 eTypeClassAny = (0xffffffffu)
720 enum TemplateArgumentKind
722 eTemplateArgumentKindNull = 0,
723 eTemplateArgumentKindType,
724 eTemplateArgumentKindDeclaration,
725 eTemplateArgumentKindIntegral,
726 eTemplateArgumentKindTemplate,
727 eTemplateArgumentKindTemplateExpansion,
728 eTemplateArgumentKindExpression,
729 eTemplateArgumentKindPack
733 //----------------------------------------------------------------------
734 // Options that can be set for a formatter to alter its behavior
735 // Not all of these are applicable to all formatter types
736 //----------------------------------------------------------------------
737 FLAGS_ENUM(TypeOptions)
739 eTypeOptionNone = (0u),
740 eTypeOptionCascade = (1u << 0),
741 eTypeOptionSkipPointers = (1u << 1),
742 eTypeOptionSkipReferences = (1u << 2),
743 eTypeOptionHideChildren = (1u << 3),
744 eTypeOptionHideValue = (1u << 4),
745 eTypeOptionShowOneLiner = (1u << 5),
746 eTypeOptionHideNames = (1u << 6),
747 eTypeOptionNonCacheable = (1u << 7),
748 eTypeOptionHideEmptyAggregates = (1u << 8)
751 //----------------------------------------------------------------------
752 // This is the return value for frame comparisons. If you are comparing frame A to frame B
753 // the following cases arise:
754 // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older than B.
755 // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A is Younger than B
756 // 3) When frame A and frame B have the same StackID, they are Equal.
757 // 4) When frame A and frame B have the same immediate parent frame, but are not equal, the comparision yields
759 // 5) If the two frames are on different threads or processes the comparision is Invalid
760 // 6) If for some reason we can't figure out what went on, we return Unknown.
761 //----------------------------------------------------------------------
764 eFrameCompareInvalid,
765 eFrameCompareUnknown,
767 eFrameCompareSameParent,
768 eFrameCompareYounger,
772 //----------------------------------------------------------------------
775 // A way of classifying an address used for disassembling and setting
776 // breakpoints. Many object files can track exactly what parts of their
777 // object files are code, data and other information. This is of course
778 // above and beyond just looking at the section types. For example, code
779 // might contain PC relative data and the object file might be able to
780 // tell us that an address in code is data.
781 //----------------------------------------------------------------------
784 eAddressClassInvalid,
785 eAddressClassUnknown,
787 eAddressClassCodeAlternateISA,
793 //----------------------------------------------------------------------
796 // Designed to mimic the unix file permission bits so they can be
797 // used with functions that set 'mode_t' to certain values for
799 //----------------------------------------------------------------------
800 FLAGS_ENUM(FilePermissions)
802 eFilePermissionsUserRead = (1u << 8),
803 eFilePermissionsUserWrite = (1u << 7),
804 eFilePermissionsUserExecute = (1u << 6),
805 eFilePermissionsGroupRead = (1u << 5),
806 eFilePermissionsGroupWrite = (1u << 4),
807 eFilePermissionsGroupExecute = (1u << 3),
808 eFilePermissionsWorldRead = (1u << 2),
809 eFilePermissionsWorldWrite = (1u << 1),
810 eFilePermissionsWorldExecute = (1u << 0),
812 eFilePermissionsUserRW = (eFilePermissionsUserRead | eFilePermissionsUserWrite | 0 ),
813 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 | eFilePermissionsUserExecute ),
814 eFilePermissionsUserRWX = (eFilePermissionsUserRead | eFilePermissionsUserWrite | eFilePermissionsUserExecute ),
816 eFilePermissionsGroupRW = (eFilePermissionsGroupRead | eFilePermissionsGroupWrite | 0 ),
817 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 | eFilePermissionsGroupExecute ),
818 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead | eFilePermissionsGroupWrite | eFilePermissionsGroupExecute ),
820 eFilePermissionsWorldRW = (eFilePermissionsWorldRead | eFilePermissionsWorldWrite | 0 ),
821 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 | eFilePermissionsWorldExecute ),
822 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead | eFilePermissionsWorldWrite | eFilePermissionsWorldExecute ),
824 eFilePermissionsEveryoneR = (eFilePermissionsUserRead | eFilePermissionsGroupRead | eFilePermissionsWorldRead ),
825 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite | eFilePermissionsGroupWrite | eFilePermissionsWorldWrite ),
826 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute | eFilePermissionsGroupExecute | eFilePermissionsWorldExecute ),
828 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR | eFilePermissionsEveryoneW | 0 ),
829 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 | eFilePermissionsEveryoneX ),
830 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR | eFilePermissionsEveryoneW | eFilePermissionsEveryoneX ),
831 eFilePermissionsFileDefault = eFilePermissionsUserRW,
832 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
835 //----------------------------------------------------------------------
836 // Queue work item types
838 // The different types of work that can be enqueued on a libdispatch
839 // aka Grand Central Dispatch (GCD) queue.
840 //----------------------------------------------------------------------
843 eQueueItemKindUnknown = 0,
844 eQueueItemKindFunction,
848 //----------------------------------------------------------------------
850 // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
851 // (executing on one thread) or concurrent (executing on multiple threads).
852 //----------------------------------------------------------------------
855 eQueueKindUnknown = 0,
860 //----------------------------------------------------------------------
861 // Expression Evaluation Stages
862 // These are the cancellable stages of expression evaluation, passed to the
863 // expression evaluation callback, so that you can interrupt expression
864 // evaluation at the various points in its lifecycle.
865 //----------------------------------------------------------------------
866 enum ExpressionEvaluationPhase
868 eExpressionEvaluationParse = 0,
869 eExpressionEvaluationIRGen,
870 eExpressionEvaluationExecution,
871 eExpressionEvaluationComplete
875 //----------------------------------------------------------------------
877 // Indicates what types of events cause the watchpoint to fire.
878 // Used by Native*Protocol-related classes.
879 //----------------------------------------------------------------------
880 FLAGS_ENUM(WatchpointKind)
882 eWatchpointKindRead = (1u << 0),
883 eWatchpointKindWrite = (1u << 1)
888 eGdbSignalBadAccess = 0x91,
889 eGdbSignalBadInstruction = 0x92,
890 eGdbSignalArithmetic = 0x93,
891 eGdbSignalEmulation = 0x94,
892 eGdbSignalSoftware = 0x95,
893 eGdbSignalBreakpoint = 0x96
896 //----------------------------------------------------------------------
897 // Used with SBHost::GetPath (lldb::PathType) to find files that are
898 // related to LLDB on the current host machine. Most files are relative
899 // to LLDB or are in known locations.
900 //----------------------------------------------------------------------
903 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
904 ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc)
905 ePathTypeHeaderDir, // Find LLDB header file directory
906 ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory
907 ePathTypeLLDBSystemPlugins, // System plug-ins directory
908 ePathTypeLLDBUserPlugins, // User plug-ins directory
909 ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that will be cleaned up on exit
910 ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system, NOT cleaned up on a process exit.
911 ePathTypeClangDir // Find path to Clang builtin headers
914 //----------------------------------------------------------------------
915 // Kind of member function
916 // Used by the type system
917 //----------------------------------------------------------------------
918 enum MemberFunctionKind
920 eMemberFunctionKindUnknown = 0, // Not sure what the type of this is
921 eMemberFunctionKindConstructor, // A function used to create instances
922 eMemberFunctionKindDestructor, // A function used to tear down existing instances
923 eMemberFunctionKindInstanceMethod, // A function that applies to a specific instance
924 eMemberFunctionKindStaticMethod // A function that applies to a type rather than any instance
928 //----------------------------------------------------------------------
929 // String matching algorithm used by SBTarget
930 //----------------------------------------------------------------------
938 //----------------------------------------------------------------------
939 // Bitmask that describes details about a type
940 //----------------------------------------------------------------------
941 FLAGS_ENUM(TypeFlags)
943 eTypeHasChildren = (1u << 0),
944 eTypeHasValue = (1u << 1),
945 eTypeIsArray = (1u << 2),
946 eTypeIsBlock = (1u << 3),
947 eTypeIsBuiltIn = (1u << 4),
948 eTypeIsClass = (1u << 5),
949 eTypeIsCPlusPlus = (1u << 6),
950 eTypeIsEnumeration = (1u << 7),
951 eTypeIsFuncPrototype = (1u << 8),
952 eTypeIsMember = (1u << 9),
953 eTypeIsObjC = (1u << 10),
954 eTypeIsPointer = (1u << 11),
955 eTypeIsReference = (1u << 12),
956 eTypeIsStructUnion = (1u << 13),
957 eTypeIsTemplate = (1u << 14),
958 eTypeIsTypedef = (1u << 15),
959 eTypeIsVector = (1u << 16),
960 eTypeIsScalar = (1u << 17),
961 eTypeIsInteger = (1u << 18),
962 eTypeIsFloat = (1u << 19),
963 eTypeIsComplex = (1u << 20),
964 eTypeIsSigned = (1u << 21),
965 eTypeInstanceIsPointer = (1u << 22)
968 FLAGS_ENUM(CommandFlags)
970 //----------------------------------------------------------------------
971 // eCommandRequiresTarget
973 // Ensures a valid target is contained in m_exe_ctx prior to executing
974 // the command. If a target doesn't exist or is invalid, the command
975 // will fail and CommandObject::GetInvalidTargetDescription() will be
976 // returned as the error. CommandObject subclasses can override the
977 // virtual function for GetInvalidTargetDescription() to provide custom
978 // strings when needed.
979 //----------------------------------------------------------------------
980 eCommandRequiresTarget = (1u << 0),
981 //----------------------------------------------------------------------
982 // eCommandRequiresProcess
984 // Ensures a valid process is contained in m_exe_ctx prior to executing
985 // the command. If a process doesn't exist or is invalid, the command
986 // will fail and CommandObject::GetInvalidProcessDescription() will be
987 // returned as the error. CommandObject subclasses can override the
988 // virtual function for GetInvalidProcessDescription() to provide custom
989 // strings when needed.
990 //----------------------------------------------------------------------
991 eCommandRequiresProcess = (1u << 1),
992 //----------------------------------------------------------------------
993 // eCommandRequiresThread
995 // Ensures a valid thread is contained in m_exe_ctx prior to executing
996 // the command. If a thread doesn't exist or is invalid, the command
997 // will fail and CommandObject::GetInvalidThreadDescription() will be
998 // returned as the error. CommandObject subclasses can override the
999 // virtual function for GetInvalidThreadDescription() to provide custom
1000 // strings when needed.
1001 //----------------------------------------------------------------------
1002 eCommandRequiresThread = (1u << 2),
1003 //----------------------------------------------------------------------
1004 // eCommandRequiresFrame
1006 // Ensures a valid frame is contained in m_exe_ctx prior to executing
1007 // the command. If a frame doesn't exist or is invalid, the command
1008 // will fail and CommandObject::GetInvalidFrameDescription() will be
1009 // returned as the error. CommandObject subclasses can override the
1010 // virtual function for GetInvalidFrameDescription() to provide custom
1011 // strings when needed.
1012 //----------------------------------------------------------------------
1013 eCommandRequiresFrame = (1u << 3),
1014 //----------------------------------------------------------------------
1015 // eCommandRequiresRegContext
1017 // Ensures a valid register context (from the selected frame if there
1018 // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
1019 // is available from m_exe_ctx prior to executing the command. If a
1020 // target doesn't exist or is invalid, the command will fail and
1021 // CommandObject::GetInvalidRegContextDescription() will be returned as
1022 // the error. CommandObject subclasses can override the virtual function
1023 // for GetInvalidRegContextDescription() to provide custom strings when
1025 //----------------------------------------------------------------------
1026 eCommandRequiresRegContext = (1u << 4),
1027 //----------------------------------------------------------------------
1028 // eCommandTryTargetAPILock
1030 // Attempts to acquire the target lock if a target is selected in the
1031 // command interpreter. If the command object fails to acquire the API
1032 // lock, the command will fail with an appropriate error message.
1033 //----------------------------------------------------------------------
1034 eCommandTryTargetAPILock = (1u << 5),
1035 //----------------------------------------------------------------------
1036 // eCommandProcessMustBeLaunched
1038 // Verifies that there is a launched process in m_exe_ctx, if there
1039 // isn't, the command will fail with an appropriate error message.
1040 //----------------------------------------------------------------------
1041 eCommandProcessMustBeLaunched = (1u << 6),
1042 //----------------------------------------------------------------------
1043 // eCommandProcessMustBePaused
1045 // Verifies that there is a paused process in m_exe_ctx, if there
1046 // isn't, the command will fail with an appropriate error message.
1047 //----------------------------------------------------------------------
1048 eCommandProcessMustBePaused = (1u << 7)
1051 //----------------------------------------------------------------------
1052 // Whether a summary should cap how much data it returns to users or not
1053 //----------------------------------------------------------------------
1054 enum TypeSummaryCapping
1056 eTypeSummaryCapped = true,
1057 eTypeSummaryUncapped = false
1062 #endif // LLDB_lldb_enumerations_h_