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 //----------------------------------------------------------------------
42 eStateUnloaded, ///< Process is object is valid, but not currently loaded
43 eStateConnected, ///< Process is connected to remote debug services, but not
44 ///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
51 eStateCrashed, ///< Process or thread has crashed and can be examined.
52 eStateDetached, ///< Process has been detached and can't be examined.
53 eStateExited, ///< Process has exited and can't be examined.
54 eStateSuspended ///< Process or thread is in a suspended state as far
55 ///< as the debugger is concerned while other processes
56 ///< or threads get the chance to run.
59 //----------------------------------------------------------------------
61 //----------------------------------------------------------------------
62 FLAGS_ENUM(LaunchFlags){
64 eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling
65 ///process into a new process
66 eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to
67 ///allow the process to be debugged
68 eLaunchFlagStopAtEntry = (1u << 2), ///< Stop at the program entry point
69 ///instead of auto-continuing when
70 ///launching or attaching at entry point
71 eLaunchFlagDisableASLR =
72 (1u << 3), ///< Disable Address Space Layout Randomization
73 eLaunchFlagDisableSTDIO =
74 (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
75 eLaunchFlagLaunchInTTY =
76 (1u << 5), ///< Launch the process in a new TTY if supported by the host
77 eLaunchFlagLaunchInShell =
78 (1u << 6), ///< Launch the process inside a shell to get shell expansion
79 eLaunchFlagLaunchInSeparateProcessGroup =
80 (1u << 7), ///< Launch the process in a separate process group
81 eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the
82 ///process off (e.g. to
84 ///< set this flag so lldb & the handee don't race to set its exit status.
85 eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub
86 ///should detach rather than killing
88 ///< if it loses connection with lldb.
89 eLaunchFlagShellExpandArguments =
90 (1u << 10), ///< Perform shell-style argument expansion
91 eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
94 //----------------------------------------------------------------------
96 //----------------------------------------------------------------------
97 enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping };
99 //----------------------------------------------------------------------
100 // Byte ordering definitions
101 //----------------------------------------------------------------------
103 eByteOrderInvalid = 0,
109 //----------------------------------------------------------------------
110 // Register encoding definitions
111 //----------------------------------------------------------------------
113 eEncodingInvalid = 0,
114 eEncodingUint, // unsigned integer
115 eEncodingSint, // signed integer
116 eEncodingIEEE754, // float
117 eEncodingVector // vector registers
120 //----------------------------------------------------------------------
121 // Display format definitions
122 //----------------------------------------------------------------------
129 eFormatBytesWithASCII,
131 eFormatCharPrintable, // Only printable characters, space if not printable
132 eFormatComplex, // Floating point complex type
133 eFormatComplexFloat = eFormatComplex,
134 eFormatCString, // NULL terminated C strings
141 eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text'
148 eFormatVectorOfSInt8,
149 eFormatVectorOfUInt8,
150 eFormatVectorOfSInt16,
151 eFormatVectorOfUInt16,
152 eFormatVectorOfSInt32,
153 eFormatVectorOfUInt32,
154 eFormatVectorOfSInt64,
155 eFormatVectorOfUInt64,
156 eFormatVectorOfFloat16,
157 eFormatVectorOfFloat32,
158 eFormatVectorOfFloat64,
159 eFormatVectorOfUInt128,
160 eFormatComplexInteger, // Integer complex type
161 eFormatCharArray, // Print characters with no single quotes, used for
162 // character arrays that can contain non printable
164 eFormatAddressInfo, // Describe what an address points to (func + offset with
165 // file/line, symbol + offset, data, etc)
166 eFormatHexFloat, // ISO C99 hex float string
167 eFormatInstruction, // Disassemble an opcode
168 eFormatVoid, // Do not print this
172 //----------------------------------------------------------------------
173 // Description levels for "void GetDescription(Stream *, DescriptionLevel)"
175 //----------------------------------------------------------------------
176 enum DescriptionLevel {
177 eDescriptionLevelBrief = 0,
178 eDescriptionLevelFull,
179 eDescriptionLevelVerbose,
180 eDescriptionLevelInitial,
181 kNumDescriptionLevels
184 //----------------------------------------------------------------------
185 // Script interpreter types
186 //----------------------------------------------------------------------
187 enum ScriptLanguage {
189 eScriptLanguagePython,
190 eScriptLanguageDefault = eScriptLanguagePython,
191 eScriptLanguageUnknown
194 //----------------------------------------------------------------------
195 // Register numbering types
196 // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
197 // any of these to the lldb internal register numbering scheme
198 // (eRegisterKindLLDB).
199 //----------------------------------------------------------------------
201 eRegisterKindEHFrame = 0, // the register numbers seen in eh_frame
202 eRegisterKindDWARF, // the register numbers seen DWARF
203 eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any
205 eRegisterKindProcessPlugin, // num used by the process plugin - e.g. by the
206 // remote gdb-protocol stub program
207 eRegisterKindLLDB, // lldb's internal register numbers
211 //----------------------------------------------------------------------
212 // Thread stop reasons
213 //----------------------------------------------------------------------
215 eStopReasonInvalid = 0,
218 eStopReasonBreakpoint,
219 eStopReasonWatchpoint,
221 eStopReasonException,
222 eStopReasonExec, // Program was re-exec'ed
223 eStopReasonPlanComplete,
224 eStopReasonThreadExiting,
225 eStopReasonInstrumentation
228 //----------------------------------------------------------------------
229 // Command Return Status Types
230 //----------------------------------------------------------------------
232 eReturnStatusInvalid,
233 eReturnStatusSuccessFinishNoResult,
234 eReturnStatusSuccessFinishResult,
235 eReturnStatusSuccessContinuingNoResult,
236 eReturnStatusSuccessContinuingResult,
237 eReturnStatusStarted,
242 //----------------------------------------------------------------------
243 // The results of expression evaluation:
244 //----------------------------------------------------------------------
245 enum ExpressionResults {
246 eExpressionCompleted = 0,
247 eExpressionSetupError,
248 eExpressionParseError,
249 eExpressionDiscarded,
250 eExpressionInterrupted,
251 eExpressionHitBreakpoint,
253 eExpressionResultUnavailable,
254 eExpressionStoppedForDebug
257 //----------------------------------------------------------------------
258 // Connection Status Types
259 //----------------------------------------------------------------------
260 enum ConnectionStatus {
261 eConnectionStatusSuccess, // Success
262 eConnectionStatusEndOfFile, // End-of-file encountered
263 eConnectionStatusError, // Check GetError() for details
264 eConnectionStatusTimedOut, // Request timed out
265 eConnectionStatusNoConnection, // No connection
266 eConnectionStatusLostConnection, // Lost connection while connected to a valid
268 eConnectionStatusInterrupted // Interrupted read
273 eErrorTypeGeneric, ///< Generic errors that can be any value.
274 eErrorTypeMachKernel, ///< Mach kernel error codes.
275 eErrorTypePOSIX, ///< POSIX error codes.
276 eErrorTypeExpression, ///< These are from the ExpressionResults enum.
277 eErrorTypeWin32 ///< Standard Win32 error codes.
281 eValueTypeInvalid = 0,
282 eValueTypeVariableGlobal = 1, // globals variable
283 eValueTypeVariableStatic = 2, // static variable
284 eValueTypeVariableArgument = 3, // function argument variables
285 eValueTypeVariableLocal = 4, // function local variables
286 eValueTypeRegister = 5, // stack frame register value
287 eValueTypeRegisterSet = 6, // A collection of stack frame register values
288 eValueTypeConstResult = 7, // constant result variables
289 eValueTypeVariableThreadLocal = 8 // thread local storage variable
292 //----------------------------------------------------------------------
293 // Token size/granularities for Input Readers
294 //----------------------------------------------------------------------
296 enum InputReaderGranularity {
297 eInputReaderGranularityInvalid = 0,
298 eInputReaderGranularityByte,
299 eInputReaderGranularityWord,
300 eInputReaderGranularityLine,
301 eInputReaderGranularityAll
304 //------------------------------------------------------------------
305 /// These mask bits allow a common interface for queries that can
306 /// limit the amount of information that gets parsed to only the
307 /// information that is requested. These bits also can indicate what
308 /// actually did get resolved during query function calls.
310 /// Each definition corresponds to a one of the member variables
311 /// in this class, and requests that that item be resolved, or
312 /// indicates that the member did get resolved.
313 //------------------------------------------------------------------
314 FLAGS_ENUM(SymbolContextItem){
315 eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from
316 ///a query, or was located in query
318 eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from
319 ///a query, or was located in query
321 eSymbolContextCompUnit = (1u << 2), ///< Set when \a comp_unit is requested
322 ///from a query, or was located in query
324 eSymbolContextFunction = (1u << 3), ///< Set when \a function is requested
325 ///from a query, or was located in query
327 eSymbolContextBlock = (1u << 4), ///< Set when the deepest \a block is
328 ///requested from a query, or was located
330 eSymbolContextLineEntry = (1u << 5), ///< Set when \a line_entry is
331 ///requested from a query, or was
332 ///located in query results
333 eSymbolContextSymbol = (1u << 6), ///< Set when \a symbol is requested from
334 ///a query, or was located in query
336 eSymbolContextEverything = ((eSymbolContextSymbol << 1) -
337 1u), ///< Indicates to try and lookup everything
338 ///up during a routine symbol context
340 eSymbolContextVariable = (1u << 7) ///< Set when \a global or static
341 ///variable is requested from a query, or
342 ///was located in query results.
343 ///< eSymbolContextVariable is potentially expensive to lookup so it isn't
345 ///< eSymbolContextEverything which stops it from being used during frame PC
347 ///< many other potential address to symbol context lookups.
350 FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0),
351 ePermissionsReadable = (1u << 1),
352 ePermissionsExecutable = (1u << 2)};
354 enum InputReaderAction {
355 eInputReaderActivate, // reader is newly pushed onto the reader stack
356 eInputReaderAsynchronousOutputWritten, // an async output event occurred; the
357 // reader may want to do something
358 eInputReaderReactivate, // reader is on top of the stack again after another
359 // reader was popped off
360 eInputReaderDeactivate, // another reader was pushed on the stack
361 eInputReaderGotToken, // reader got one of its tokens (granularity)
362 eInputReaderInterrupt, // reader received an interrupt signal (probably from a
364 eInputReaderEndOfFile, // reader received an EOF char (probably from a
366 eInputReaderDone // reader was just popped off the stack and is done
369 FLAGS_ENUM(BreakpointEventType){
370 eBreakpointEventTypeInvalidType = (1u << 0),
371 eBreakpointEventTypeAdded = (1u << 1),
372 eBreakpointEventTypeRemoved = (1u << 2),
373 eBreakpointEventTypeLocationsAdded = (1u << 3), // Locations added doesn't
375 // breakpoint is created
376 eBreakpointEventTypeLocationsRemoved = (1u << 4),
377 eBreakpointEventTypeLocationsResolved = (1u << 5),
378 eBreakpointEventTypeEnabled = (1u << 6),
379 eBreakpointEventTypeDisabled = (1u << 7),
380 eBreakpointEventTypeCommandChanged = (1u << 8),
381 eBreakpointEventTypeConditionChanged = (1u << 9),
382 eBreakpointEventTypeIgnoreChanged = (1u << 10),
383 eBreakpointEventTypeThreadChanged = (1u << 11)};
385 FLAGS_ENUM(WatchpointEventType){
386 eWatchpointEventTypeInvalidType = (1u << 0),
387 eWatchpointEventTypeAdded = (1u << 1),
388 eWatchpointEventTypeRemoved = (1u << 2),
389 eWatchpointEventTypeEnabled = (1u << 6),
390 eWatchpointEventTypeDisabled = (1u << 7),
391 eWatchpointEventTypeCommandChanged = (1u << 8),
392 eWatchpointEventTypeConditionChanged = (1u << 9),
393 eWatchpointEventTypeIgnoreChanged = (1u << 10),
394 eWatchpointEventTypeThreadChanged = (1u << 11),
395 eWatchpointEventTypeTypeChanged = (1u << 12)};
397 //----------------------------------------------------------------------
398 /// Programming language type.
400 /// These enumerations use the same language enumerations as the DWARF
401 /// specification for ease of use and consistency.
402 /// The enum -> string code is in Language.cpp, don't change this
403 /// table without updating that code as well.
404 //----------------------------------------------------------------------
406 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
407 eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
408 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
409 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
410 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
411 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
412 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
413 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
414 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
415 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
416 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
417 eLanguageTypeJava = 0x000b, ///< Java.
418 eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
419 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
420 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
421 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
422 eLanguageTypeObjC = 0x0010, ///< Objective-C.
423 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
424 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
425 eLanguageTypeD = 0x0013, ///< D.
426 eLanguageTypePython = 0x0014, ///< Python.
427 // NOTE: The below are DWARF5 constants, subject to change upon
428 // completion of the DWARF5 specification
429 eLanguageTypeOpenCL = 0x0015, ///< OpenCL.
430 eLanguageTypeGo = 0x0016, ///< Go.
431 eLanguageTypeModula3 = 0x0017, ///< Modula 3.
432 eLanguageTypeHaskell = 0x0018, ///< Haskell.
433 eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
434 eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
435 eLanguageTypeOCaml = 0x001b, ///< OCaml.
436 eLanguageTypeRust = 0x001c, ///< Rust.
437 eLanguageTypeC11 = 0x001d, ///< ISO C:2011.
438 eLanguageTypeSwift = 0x001e, ///< Swift.
439 eLanguageTypeJulia = 0x001f, ///< Julia.
440 eLanguageTypeDylan = 0x0020, ///< Dylan.
441 eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
442 eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003.
443 eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008.
445 // Note: Language::GetNameForLanguageType
446 // assumes these can be used as indexes into array language_names, and
447 // Language::SetLanguageFromCString and Language::AsCString
448 // assume these can be used as indexes into array g_languages.
449 eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler.
450 eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript.
454 enum InstrumentationRuntimeType {
455 eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
456 eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
457 eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002,
458 eInstrumentationRuntimeTypeMainThreadChecker = 0x0003,
459 eNumInstrumentationRuntimeTypes
462 enum DynamicValueType {
463 eNoDynamicValues = 0,
464 eDynamicCanRunTarget = 1,
465 eDynamicDontRunTarget = 2
468 enum StopShowColumn {
469 eStopShowColumnAnsiOrCaret = 0,
470 eStopShowColumnAnsi = 1,
471 eStopShowColumnCaret = 2,
472 eStopShowColumnNone = 3
483 enum CommandArgumentType {
485 eArgTypeAddressOrExpression,
487 eArgTypeAliasOptions,
488 eArgTypeArchitecture,
490 eArgTypeBreakpointID,
491 eArgTypeBreakpointIDRange,
492 eArgTypeBreakpointName,
497 eArgTypeDescriptionVerbosity,
498 eArgTypeDirectoryName,
499 eArgTypeDisassemblyFlavor,
502 eArgTypeExpressionPath,
508 eArgTypeFunctionName,
509 eArgTypeFunctionOrSymbol,
519 eArgTypeNewPathPrefix,
521 eArgTypeNumberPerLine,
523 eArgTypeOldPathPrefix,
526 eArgTypePermissionsNumber,
527 eArgTypePermissionsString,
532 eArgTypePythonFunction,
533 eArgTypePythonScript,
535 eArgTypeRegisterName,
536 eArgTypeRegularExpression,
539 eArgTypeScriptedCommandSynchronicity,
543 eArgTypeSettingIndex,
545 eArgTypeSettingPrefix,
546 eArgTypeSettingVariableName,
550 eArgTypeStartAddress,
551 eArgTypeSummaryString,
557 eArgTypeUnsignedInteger,
564 eArgTypeWatchpointID,
565 eArgTypeWatchpointIDRange,
568 eArgTypeLastArg // Always keep this entry as the last entry in this
572 //----------------------------------------------------------------------
574 //----------------------------------------------------------------------
577 eSymbolTypeInvalid = 0,
582 eSymbolTypeTrampoline,
584 eSymbolTypeException,
585 eSymbolTypeSourceFile,
586 eSymbolTypeHeaderFile,
587 eSymbolTypeObjectFile,
588 eSymbolTypeCommonBlock,
593 eSymbolTypeVariableType,
594 eSymbolTypeLineEntry,
595 eSymbolTypeLineHeader,
596 eSymbolTypeScopeBegin,
598 eSymbolTypeAdditional, // When symbols take more than one entry, the extra
599 // entries get this type
601 eSymbolTypeInstrumentation,
602 eSymbolTypeUndefined,
603 eSymbolTypeObjCClass,
604 eSymbolTypeObjCMetaClass,
606 eSymbolTypeReExported
612 eSectionTypeContainer, // The section contains child sections
614 eSectionTypeDataCString, // Inlined C string data
615 eSectionTypeDataCStringPointers, // Pointers to C string data
616 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
620 eSectionTypeDataPointers,
622 eSectionTypeZeroFill,
623 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
624 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
625 eSectionTypeDWARFDebugAbbrev,
626 eSectionTypeDWARFDebugAddr,
627 eSectionTypeDWARFDebugAranges,
628 eSectionTypeDWARFDebugFrame,
629 eSectionTypeDWARFDebugInfo,
630 eSectionTypeDWARFDebugLine,
631 eSectionTypeDWARFDebugLoc,
632 eSectionTypeDWARFDebugMacInfo,
633 eSectionTypeDWARFDebugMacro,
634 eSectionTypeDWARFDebugPubNames,
635 eSectionTypeDWARFDebugPubTypes,
636 eSectionTypeDWARFDebugRanges,
637 eSectionTypeDWARFDebugStr,
638 eSectionTypeDWARFDebugStrOffsets,
639 eSectionTypeDWARFAppleNames,
640 eSectionTypeDWARFAppleTypes,
641 eSectionTypeDWARFAppleNamespaces,
642 eSectionTypeDWARFAppleObjC,
643 eSectionTypeELFSymbolTable, // Elf SHT_SYMTAB section
644 eSectionTypeELFDynamicSymbols, // Elf SHT_DYNSYM section
645 eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
646 eSectionTypeELFDynamicLinkInfo, // Elf SHT_DYNAMIC section
648 eSectionTypeARMexidx,
649 eSectionTypeARMextab,
650 eSectionTypeCompactUnwind, // compact unwind section in Mach-O,
651 // __TEXT,__unwind_info
652 eSectionTypeGoSymtab,
653 eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute
658 FLAGS_ENUM(EmulateInstructionOptions){
659 eEmulateInstructionOptionNone = (0u),
660 eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
661 eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
663 FLAGS_ENUM(FunctionNameType){
664 eFunctionNameTypeNone = 0u,
665 eFunctionNameTypeAuto =
666 (1u << 1), // Automatically figure out which FunctionNameType
667 // bits to set based on the function name.
668 eFunctionNameTypeFull = (1u << 2), // The function name.
669 // For C this is the same as just the name of the function
670 // For C++ this is the mangled or demangled version of the mangled name.
671 // For ObjC this is the full function signature with the + or
672 // - and the square brackets and the class and selector
673 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces
674 // or arguments and no class
675 // methods or selectors will be searched.
676 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++)
677 // with no namespace or arguments
678 eFunctionNameTypeSelector =
679 (1u << 5), // Find function by selector name (ObjC) names
680 eFunctionNameTypeAny =
681 eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
684 //----------------------------------------------------------------------
685 // Basic types enumeration for the public API SBType::GetBasicType()
686 //----------------------------------------------------------------------
688 eBasicTypeInvalid = 0,
691 eBasicTypeSignedChar,
692 eBasicTypeUnsignedChar,
694 eBasicTypeSignedWChar,
695 eBasicTypeUnsignedWChar,
699 eBasicTypeUnsignedShort,
701 eBasicTypeUnsignedInt,
703 eBasicTypeUnsignedLong,
705 eBasicTypeUnsignedLongLong,
707 eBasicTypeUnsignedInt128,
712 eBasicTypeLongDouble,
713 eBasicTypeFloatComplex,
714 eBasicTypeDoubleComplex,
715 eBasicTypeLongDoubleComplex,
726 // Hardware Trace generated by the processor.
727 eTraceTypeProcessorTrace
730 enum StructuredDataType {
731 eStructuredDataTypeInvalid = -1,
732 eStructuredDataTypeNull = 0,
733 eStructuredDataTypeGeneric,
734 eStructuredDataTypeArray,
735 eStructuredDataTypeInteger,
736 eStructuredDataTypeFloat,
737 eStructuredDataTypeBoolean,
738 eStructuredDataTypeString,
739 eStructuredDataTypeDictionary
742 FLAGS_ENUM(TypeClass){
743 eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
744 eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
745 eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
746 eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
747 eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
748 eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
749 eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
750 eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
751 eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
752 eTypeClassVector = (1u << 17),
753 // Define the last type class as the MSBit of a 32 bit value
754 eTypeClassOther = (1u << 31),
755 // Define a mask that can be used for any type when finding types
756 eTypeClassAny = (0xffffffffu)};
758 enum TemplateArgumentKind {
759 eTemplateArgumentKindNull = 0,
760 eTemplateArgumentKindType,
761 eTemplateArgumentKindDeclaration,
762 eTemplateArgumentKindIntegral,
763 eTemplateArgumentKindTemplate,
764 eTemplateArgumentKindTemplateExpansion,
765 eTemplateArgumentKindExpression,
766 eTemplateArgumentKindPack
770 //----------------------------------------------------------------------
771 // Options that can be set for a formatter to alter its behavior
772 // Not all of these are applicable to all formatter types
773 //----------------------------------------------------------------------
774 FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
775 eTypeOptionCascade = (1u << 0),
776 eTypeOptionSkipPointers = (1u << 1),
777 eTypeOptionSkipReferences = (1u << 2),
778 eTypeOptionHideChildren = (1u << 3),
779 eTypeOptionHideValue = (1u << 4),
780 eTypeOptionShowOneLiner = (1u << 5),
781 eTypeOptionHideNames = (1u << 6),
782 eTypeOptionNonCacheable = (1u << 7),
783 eTypeOptionHideEmptyAggregates = (1u << 8)};
785 //----------------------------------------------------------------------
786 // This is the return value for frame comparisons. If you are comparing frame A
788 // the following cases arise:
789 // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older
791 // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A
793 // 3) When frame A and frame B have the same StackID, they are Equal.
794 // 4) When frame A and frame B have the same immediate parent frame, but are not
795 // equal, the comparison yields
797 // 5) If the two frames are on different threads or processes the comparison is
799 // 6) If for some reason we can't figure out what went on, we return Unknown.
800 //----------------------------------------------------------------------
801 enum FrameComparison {
802 eFrameCompareInvalid,
803 eFrameCompareUnknown,
805 eFrameCompareSameParent,
806 eFrameCompareYounger,
810 //----------------------------------------------------------------------
813 // A way of classifying an address used for disassembling and setting
814 // breakpoints. Many object files can track exactly what parts of their
815 // object files are code, data and other information. This is of course
816 // above and beyond just looking at the section types. For example, code
817 // might contain PC relative data and the object file might be able to
818 // tell us that an address in code is data.
819 //----------------------------------------------------------------------
821 eAddressClassInvalid,
822 eAddressClassUnknown,
824 eAddressClassCodeAlternateISA,
830 //----------------------------------------------------------------------
833 // Designed to mimic the unix file permission bits so they can be
834 // used with functions that set 'mode_t' to certain values for
836 //----------------------------------------------------------------------
837 FLAGS_ENUM(FilePermissions){
838 eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7),
839 eFilePermissionsUserExecute = (1u << 6),
840 eFilePermissionsGroupRead = (1u << 5),
841 eFilePermissionsGroupWrite = (1u << 4),
842 eFilePermissionsGroupExecute = (1u << 3),
843 eFilePermissionsWorldRead = (1u << 2),
844 eFilePermissionsWorldWrite = (1u << 1),
845 eFilePermissionsWorldExecute = (1u << 0),
847 eFilePermissionsUserRW = (eFilePermissionsUserRead |
848 eFilePermissionsUserWrite | 0),
849 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
850 eFilePermissionsUserExecute),
851 eFilePermissionsUserRWX = (eFilePermissionsUserRead |
852 eFilePermissionsUserWrite |
853 eFilePermissionsUserExecute),
855 eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
856 eFilePermissionsGroupWrite | 0),
857 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
858 eFilePermissionsGroupExecute),
859 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
860 eFilePermissionsGroupWrite |
861 eFilePermissionsGroupExecute),
863 eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
864 eFilePermissionsWorldWrite | 0),
865 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
866 eFilePermissionsWorldExecute),
867 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
868 eFilePermissionsWorldWrite |
869 eFilePermissionsWorldExecute),
871 eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
872 eFilePermissionsGroupRead |
873 eFilePermissionsWorldRead),
874 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
875 eFilePermissionsGroupWrite |
876 eFilePermissionsWorldWrite),
877 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
878 eFilePermissionsGroupExecute |
879 eFilePermissionsWorldExecute),
881 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
882 eFilePermissionsEveryoneW | 0),
883 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
884 eFilePermissionsEveryoneX),
885 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
886 eFilePermissionsEveryoneW |
887 eFilePermissionsEveryoneX),
888 eFilePermissionsFileDefault = eFilePermissionsUserRW,
889 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
892 //----------------------------------------------------------------------
893 // Queue work item types
895 // The different types of work that can be enqueued on a libdispatch
896 // aka Grand Central Dispatch (GCD) queue.
897 //----------------------------------------------------------------------
899 eQueueItemKindUnknown = 0,
900 eQueueItemKindFunction,
904 //----------------------------------------------------------------------
906 // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
907 // (executing on one thread) or concurrent (executing on multiple threads).
908 //----------------------------------------------------------------------
910 eQueueKindUnknown = 0,
915 //----------------------------------------------------------------------
916 // Expression Evaluation Stages
917 // These are the cancellable stages of expression evaluation, passed to the
918 // expression evaluation callback, so that you can interrupt expression
919 // evaluation at the various points in its lifecycle.
920 //----------------------------------------------------------------------
921 enum ExpressionEvaluationPhase {
922 eExpressionEvaluationParse = 0,
923 eExpressionEvaluationIRGen,
924 eExpressionEvaluationExecution,
925 eExpressionEvaluationComplete
928 //----------------------------------------------------------------------
930 // Indicates what types of events cause the watchpoint to fire.
931 // Used by Native*Protocol-related classes.
932 //----------------------------------------------------------------------
933 FLAGS_ENUM(WatchpointKind){eWatchpointKindRead = (1u << 0),
934 eWatchpointKindWrite = (1u << 1)};
937 eGdbSignalBadAccess = 0x91,
938 eGdbSignalBadInstruction = 0x92,
939 eGdbSignalArithmetic = 0x93,
940 eGdbSignalEmulation = 0x94,
941 eGdbSignalSoftware = 0x95,
942 eGdbSignalBreakpoint = 0x96
945 //----------------------------------------------------------------------
946 // Used with SBHost::GetPath (lldb::PathType) to find files that are
947 // related to LLDB on the current host machine. Most files are relative
948 // to LLDB or are in known locations.
949 //----------------------------------------------------------------------
951 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB
952 // mach-o file in LLDB.framework (MacOSX) exists
953 ePathTypeSupportExecutableDir, // Find LLDB support executable directory
954 // (debugserver, etc)
955 ePathTypeHeaderDir, // Find LLDB header file directory
956 ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory
957 ePathTypeLLDBSystemPlugins, // System plug-ins directory
958 ePathTypeLLDBUserPlugins, // User plug-ins directory
959 ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that
960 // will be cleaned up on exit
961 ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system,
962 // NOT cleaned up on a process exit.
963 ePathTypeClangDir // Find path to Clang builtin headers
966 //----------------------------------------------------------------------
967 // Kind of member function
968 // Used by the type system
969 //----------------------------------------------------------------------
970 enum MemberFunctionKind {
971 eMemberFunctionKindUnknown = 0, // Not sure what the type of this is
972 eMemberFunctionKindConstructor, // A function used to create instances
973 eMemberFunctionKindDestructor, // A function used to tear down existing
975 eMemberFunctionKindInstanceMethod, // A function that applies to a specific
977 eMemberFunctionKindStaticMethod // A function that applies to a type rather
981 //----------------------------------------------------------------------
982 // String matching algorithm used by SBTarget
983 //----------------------------------------------------------------------
984 enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith };
986 //----------------------------------------------------------------------
987 // Bitmask that describes details about a type
988 //----------------------------------------------------------------------
989 FLAGS_ENUM(TypeFlags){
990 eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1),
991 eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3),
992 eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5),
993 eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7),
994 eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9),
995 eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11),
996 eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13),
997 eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15),
998 eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17),
999 eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19),
1000 eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21),
1001 eTypeInstanceIsPointer = (1u << 22)};
1003 FLAGS_ENUM(CommandFlags){
1004 //----------------------------------------------------------------------
1005 // eCommandRequiresTarget
1007 // Ensures a valid target is contained in m_exe_ctx prior to executing
1008 // the command. If a target doesn't exist or is invalid, the command
1009 // will fail and CommandObject::GetInvalidTargetDescription() will be
1010 // returned as the error. CommandObject subclasses can override the
1011 // virtual function for GetInvalidTargetDescription() to provide custom
1012 // strings when needed.
1013 //----------------------------------------------------------------------
1014 eCommandRequiresTarget = (1u << 0),
1015 //----------------------------------------------------------------------
1016 // eCommandRequiresProcess
1018 // Ensures a valid process is contained in m_exe_ctx prior to executing
1019 // the command. If a process doesn't exist or is invalid, the command
1020 // will fail and CommandObject::GetInvalidProcessDescription() will be
1021 // returned as the error. CommandObject subclasses can override the
1022 // virtual function for GetInvalidProcessDescription() to provide custom
1023 // strings when needed.
1024 //----------------------------------------------------------------------
1025 eCommandRequiresProcess = (1u << 1),
1026 //----------------------------------------------------------------------
1027 // eCommandRequiresThread
1029 // Ensures a valid thread is contained in m_exe_ctx prior to executing
1030 // the command. If a thread doesn't exist or is invalid, the command
1031 // will fail and CommandObject::GetInvalidThreadDescription() will be
1032 // returned as the error. CommandObject subclasses can override the
1033 // virtual function for GetInvalidThreadDescription() to provide custom
1034 // strings when needed.
1035 //----------------------------------------------------------------------
1036 eCommandRequiresThread = (1u << 2),
1037 //----------------------------------------------------------------------
1038 // eCommandRequiresFrame
1040 // Ensures a valid frame is contained in m_exe_ctx prior to executing
1041 // the command. If a frame doesn't exist or is invalid, the command
1042 // will fail and CommandObject::GetInvalidFrameDescription() will be
1043 // returned as the error. CommandObject subclasses can override the
1044 // virtual function for GetInvalidFrameDescription() to provide custom
1045 // strings when needed.
1046 //----------------------------------------------------------------------
1047 eCommandRequiresFrame = (1u << 3),
1048 //----------------------------------------------------------------------
1049 // eCommandRequiresRegContext
1051 // Ensures a valid register context (from the selected frame if there
1052 // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
1053 // is available from m_exe_ctx prior to executing the command. If a
1054 // target doesn't exist or is invalid, the command will fail and
1055 // CommandObject::GetInvalidRegContextDescription() will be returned as
1056 // the error. CommandObject subclasses can override the virtual function
1057 // for GetInvalidRegContextDescription() to provide custom strings when
1059 //----------------------------------------------------------------------
1060 eCommandRequiresRegContext = (1u << 4),
1061 //----------------------------------------------------------------------
1062 // eCommandTryTargetAPILock
1064 // Attempts to acquire the target lock if a target is selected in the
1065 // command interpreter. If the command object fails to acquire the API
1066 // lock, the command will fail with an appropriate error message.
1067 //----------------------------------------------------------------------
1068 eCommandTryTargetAPILock = (1u << 5),
1069 //----------------------------------------------------------------------
1070 // eCommandProcessMustBeLaunched
1072 // Verifies that there is a launched process in m_exe_ctx, if there
1073 // isn't, the command will fail with an appropriate error message.
1074 //----------------------------------------------------------------------
1075 eCommandProcessMustBeLaunched = (1u << 6),
1076 //----------------------------------------------------------------------
1077 // eCommandProcessMustBePaused
1079 // Verifies that there is a paused process in m_exe_ctx, if there
1080 // isn't, the command will fail with an appropriate error message.
1081 //----------------------------------------------------------------------
1082 eCommandProcessMustBePaused = (1u << 7)};
1084 //----------------------------------------------------------------------
1085 // Whether a summary should cap how much data it returns to users or not
1086 //----------------------------------------------------------------------
1087 enum TypeSummaryCapping {
1088 eTypeSummaryCapped = true,
1089 eTypeSummaryUncapped = false
1094 #endif // LLDB_lldb_enumerations_h_