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 eNumInstrumentationRuntimeTypes
460 enum DynamicValueType {
461 eNoDynamicValues = 0,
462 eDynamicCanRunTarget = 1,
463 eDynamicDontRunTarget = 2
466 enum StopShowColumn {
467 eStopShowColumnAnsiOrCaret = 0,
468 eStopShowColumnAnsi = 1,
469 eStopShowColumnCaret = 2,
470 eStopShowColumnNone = 3
481 enum CommandArgumentType {
483 eArgTypeAddressOrExpression,
485 eArgTypeAliasOptions,
486 eArgTypeArchitecture,
488 eArgTypeBreakpointID,
489 eArgTypeBreakpointIDRange,
490 eArgTypeBreakpointName,
495 eArgTypeDescriptionVerbosity,
496 eArgTypeDirectoryName,
497 eArgTypeDisassemblyFlavor,
500 eArgTypeExpressionPath,
506 eArgTypeFunctionName,
507 eArgTypeFunctionOrSymbol,
517 eArgTypeNewPathPrefix,
519 eArgTypeNumberPerLine,
521 eArgTypeOldPathPrefix,
524 eArgTypePermissionsNumber,
525 eArgTypePermissionsString,
530 eArgTypePythonFunction,
531 eArgTypePythonScript,
533 eArgTypeRegisterName,
534 eArgTypeRegularExpression,
537 eArgTypeScriptedCommandSynchronicity,
541 eArgTypeSettingIndex,
543 eArgTypeSettingPrefix,
544 eArgTypeSettingVariableName,
548 eArgTypeStartAddress,
549 eArgTypeSummaryString,
555 eArgTypeUnsignedInteger,
562 eArgTypeWatchpointID,
563 eArgTypeWatchpointIDRange,
566 eArgTypeLastArg // Always keep this entry as the last entry in this
570 //----------------------------------------------------------------------
572 //----------------------------------------------------------------------
575 eSymbolTypeInvalid = 0,
580 eSymbolTypeTrampoline,
582 eSymbolTypeException,
583 eSymbolTypeSourceFile,
584 eSymbolTypeHeaderFile,
585 eSymbolTypeObjectFile,
586 eSymbolTypeCommonBlock,
591 eSymbolTypeVariableType,
592 eSymbolTypeLineEntry,
593 eSymbolTypeLineHeader,
594 eSymbolTypeScopeBegin,
596 eSymbolTypeAdditional, // When symbols take more than one entry, the extra
597 // entries get this type
599 eSymbolTypeInstrumentation,
600 eSymbolTypeUndefined,
601 eSymbolTypeObjCClass,
602 eSymbolTypeObjCMetaClass,
604 eSymbolTypeReExported
610 eSectionTypeContainer, // The section contains child sections
612 eSectionTypeDataCString, // Inlined C string data
613 eSectionTypeDataCStringPointers, // Pointers to C string data
614 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
618 eSectionTypeDataPointers,
620 eSectionTypeZeroFill,
621 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
622 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
623 eSectionTypeDWARFDebugAbbrev,
624 eSectionTypeDWARFDebugAddr,
625 eSectionTypeDWARFDebugAranges,
626 eSectionTypeDWARFDebugFrame,
627 eSectionTypeDWARFDebugInfo,
628 eSectionTypeDWARFDebugLine,
629 eSectionTypeDWARFDebugLoc,
630 eSectionTypeDWARFDebugMacInfo,
631 eSectionTypeDWARFDebugMacro,
632 eSectionTypeDWARFDebugPubNames,
633 eSectionTypeDWARFDebugPubTypes,
634 eSectionTypeDWARFDebugRanges,
635 eSectionTypeDWARFDebugStr,
636 eSectionTypeDWARFDebugStrOffsets,
637 eSectionTypeDWARFAppleNames,
638 eSectionTypeDWARFAppleTypes,
639 eSectionTypeDWARFAppleNamespaces,
640 eSectionTypeDWARFAppleObjC,
641 eSectionTypeELFSymbolTable, // Elf SHT_SYMTAB section
642 eSectionTypeELFDynamicSymbols, // Elf SHT_DYNSYM section
643 eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
644 eSectionTypeELFDynamicLinkInfo, // Elf SHT_DYNAMIC section
646 eSectionTypeARMexidx,
647 eSectionTypeARMextab,
648 eSectionTypeCompactUnwind, // compact unwind section in Mach-O,
649 // __TEXT,__unwind_info
650 eSectionTypeGoSymtab,
651 eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute
656 FLAGS_ENUM(EmulateInstructionOptions){
657 eEmulateInstructionOptionNone = (0u),
658 eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
659 eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
661 FLAGS_ENUM(FunctionNameType){
662 eFunctionNameTypeNone = 0u,
663 eFunctionNameTypeAuto =
664 (1u << 1), // Automatically figure out which FunctionNameType
665 // bits to set based on the function name.
666 eFunctionNameTypeFull = (1u << 2), // The function name.
667 // For C this is the same as just the name of the function
668 // For C++ this is the mangled or demangled version of the mangled name.
669 // For ObjC this is the full function signature with the + or
670 // - and the square brackets and the class and selector
671 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces
672 // or arguments and no class
673 // methods or selectors will be searched.
674 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++)
675 // with no namespace or arguments
676 eFunctionNameTypeSelector =
677 (1u << 5), // Find function by selector name (ObjC) names
678 eFunctionNameTypeAny =
679 eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
682 //----------------------------------------------------------------------
683 // Basic types enumeration for the public API SBType::GetBasicType()
684 //----------------------------------------------------------------------
686 eBasicTypeInvalid = 0,
689 eBasicTypeSignedChar,
690 eBasicTypeUnsignedChar,
692 eBasicTypeSignedWChar,
693 eBasicTypeUnsignedWChar,
697 eBasicTypeUnsignedShort,
699 eBasicTypeUnsignedInt,
701 eBasicTypeUnsignedLong,
703 eBasicTypeUnsignedLongLong,
705 eBasicTypeUnsignedInt128,
710 eBasicTypeLongDouble,
711 eBasicTypeFloatComplex,
712 eBasicTypeDoubleComplex,
713 eBasicTypeLongDoubleComplex,
724 // Hardware Trace generated by the processor.
725 eTraceTypeProcessorTrace
728 enum StructuredDataType {
729 eStructuredDataTypeInvalid = -1,
730 eStructuredDataTypeNull = 0,
731 eStructuredDataTypeGeneric,
732 eStructuredDataTypeArray,
733 eStructuredDataTypeInteger,
734 eStructuredDataTypeFloat,
735 eStructuredDataTypeBoolean,
736 eStructuredDataTypeString,
737 eStructuredDataTypeDictionary
740 FLAGS_ENUM(TypeClass){
741 eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
742 eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
743 eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
744 eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
745 eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
746 eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
747 eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
748 eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
749 eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
750 eTypeClassVector = (1u << 17),
751 // Define the last type class as the MSBit of a 32 bit value
752 eTypeClassOther = (1u << 31),
753 // Define a mask that can be used for any type when finding types
754 eTypeClassAny = (0xffffffffu)};
756 enum TemplateArgumentKind {
757 eTemplateArgumentKindNull = 0,
758 eTemplateArgumentKindType,
759 eTemplateArgumentKindDeclaration,
760 eTemplateArgumentKindIntegral,
761 eTemplateArgumentKindTemplate,
762 eTemplateArgumentKindTemplateExpansion,
763 eTemplateArgumentKindExpression,
764 eTemplateArgumentKindPack
768 //----------------------------------------------------------------------
769 // Options that can be set for a formatter to alter its behavior
770 // Not all of these are applicable to all formatter types
771 //----------------------------------------------------------------------
772 FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
773 eTypeOptionCascade = (1u << 0),
774 eTypeOptionSkipPointers = (1u << 1),
775 eTypeOptionSkipReferences = (1u << 2),
776 eTypeOptionHideChildren = (1u << 3),
777 eTypeOptionHideValue = (1u << 4),
778 eTypeOptionShowOneLiner = (1u << 5),
779 eTypeOptionHideNames = (1u << 6),
780 eTypeOptionNonCacheable = (1u << 7),
781 eTypeOptionHideEmptyAggregates = (1u << 8)};
783 //----------------------------------------------------------------------
784 // This is the return value for frame comparisons. If you are comparing frame A
786 // the following cases arise:
787 // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older
789 // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A
791 // 3) When frame A and frame B have the same StackID, they are Equal.
792 // 4) When frame A and frame B have the same immediate parent frame, but are not
793 // equal, the comparison yields
795 // 5) If the two frames are on different threads or processes the comparison is
797 // 6) If for some reason we can't figure out what went on, we return Unknown.
798 //----------------------------------------------------------------------
799 enum FrameComparison {
800 eFrameCompareInvalid,
801 eFrameCompareUnknown,
803 eFrameCompareSameParent,
804 eFrameCompareYounger,
808 //----------------------------------------------------------------------
811 // A way of classifying an address used for disassembling and setting
812 // breakpoints. Many object files can track exactly what parts of their
813 // object files are code, data and other information. This is of course
814 // above and beyond just looking at the section types. For example, code
815 // might contain PC relative data and the object file might be able to
816 // tell us that an address in code is data.
817 //----------------------------------------------------------------------
819 eAddressClassInvalid,
820 eAddressClassUnknown,
822 eAddressClassCodeAlternateISA,
828 //----------------------------------------------------------------------
831 // Designed to mimic the unix file permission bits so they can be
832 // used with functions that set 'mode_t' to certain values for
834 //----------------------------------------------------------------------
835 FLAGS_ENUM(FilePermissions){
836 eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7),
837 eFilePermissionsUserExecute = (1u << 6),
838 eFilePermissionsGroupRead = (1u << 5),
839 eFilePermissionsGroupWrite = (1u << 4),
840 eFilePermissionsGroupExecute = (1u << 3),
841 eFilePermissionsWorldRead = (1u << 2),
842 eFilePermissionsWorldWrite = (1u << 1),
843 eFilePermissionsWorldExecute = (1u << 0),
845 eFilePermissionsUserRW = (eFilePermissionsUserRead |
846 eFilePermissionsUserWrite | 0),
847 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
848 eFilePermissionsUserExecute),
849 eFilePermissionsUserRWX = (eFilePermissionsUserRead |
850 eFilePermissionsUserWrite |
851 eFilePermissionsUserExecute),
853 eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
854 eFilePermissionsGroupWrite | 0),
855 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
856 eFilePermissionsGroupExecute),
857 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
858 eFilePermissionsGroupWrite |
859 eFilePermissionsGroupExecute),
861 eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
862 eFilePermissionsWorldWrite | 0),
863 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
864 eFilePermissionsWorldExecute),
865 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
866 eFilePermissionsWorldWrite |
867 eFilePermissionsWorldExecute),
869 eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
870 eFilePermissionsGroupRead |
871 eFilePermissionsWorldRead),
872 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
873 eFilePermissionsGroupWrite |
874 eFilePermissionsWorldWrite),
875 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
876 eFilePermissionsGroupExecute |
877 eFilePermissionsWorldExecute),
879 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
880 eFilePermissionsEveryoneW | 0),
881 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
882 eFilePermissionsEveryoneX),
883 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
884 eFilePermissionsEveryoneW |
885 eFilePermissionsEveryoneX),
886 eFilePermissionsFileDefault = eFilePermissionsUserRW,
887 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
890 //----------------------------------------------------------------------
891 // Queue work item types
893 // The different types of work that can be enqueued on a libdispatch
894 // aka Grand Central Dispatch (GCD) queue.
895 //----------------------------------------------------------------------
897 eQueueItemKindUnknown = 0,
898 eQueueItemKindFunction,
902 //----------------------------------------------------------------------
904 // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
905 // (executing on one thread) or concurrent (executing on multiple threads).
906 //----------------------------------------------------------------------
908 eQueueKindUnknown = 0,
913 //----------------------------------------------------------------------
914 // Expression Evaluation Stages
915 // These are the cancellable stages of expression evaluation, passed to the
916 // expression evaluation callback, so that you can interrupt expression
917 // evaluation at the various points in its lifecycle.
918 //----------------------------------------------------------------------
919 enum ExpressionEvaluationPhase {
920 eExpressionEvaluationParse = 0,
921 eExpressionEvaluationIRGen,
922 eExpressionEvaluationExecution,
923 eExpressionEvaluationComplete
926 //----------------------------------------------------------------------
928 // Indicates what types of events cause the watchpoint to fire.
929 // Used by Native*Protocol-related classes.
930 //----------------------------------------------------------------------
931 FLAGS_ENUM(WatchpointKind){eWatchpointKindRead = (1u << 0),
932 eWatchpointKindWrite = (1u << 1)};
935 eGdbSignalBadAccess = 0x91,
936 eGdbSignalBadInstruction = 0x92,
937 eGdbSignalArithmetic = 0x93,
938 eGdbSignalEmulation = 0x94,
939 eGdbSignalSoftware = 0x95,
940 eGdbSignalBreakpoint = 0x96
943 //----------------------------------------------------------------------
944 // Used with SBHost::GetPath (lldb::PathType) to find files that are
945 // related to LLDB on the current host machine. Most files are relative
946 // to LLDB or are in known locations.
947 //----------------------------------------------------------------------
949 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB
950 // mach-o file in LLDB.framework (MacOSX) exists
951 ePathTypeSupportExecutableDir, // Find LLDB support executable directory
952 // (debugserver, etc)
953 ePathTypeHeaderDir, // Find LLDB header file directory
954 ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory
955 ePathTypeLLDBSystemPlugins, // System plug-ins directory
956 ePathTypeLLDBUserPlugins, // User plug-ins directory
957 ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that
958 // will be cleaned up on exit
959 ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system,
960 // NOT cleaned up on a process exit.
961 ePathTypeClangDir // Find path to Clang builtin headers
964 //----------------------------------------------------------------------
965 // Kind of member function
966 // Used by the type system
967 //----------------------------------------------------------------------
968 enum MemberFunctionKind {
969 eMemberFunctionKindUnknown = 0, // Not sure what the type of this is
970 eMemberFunctionKindConstructor, // A function used to create instances
971 eMemberFunctionKindDestructor, // A function used to tear down existing
973 eMemberFunctionKindInstanceMethod, // A function that applies to a specific
975 eMemberFunctionKindStaticMethod // A function that applies to a type rather
979 //----------------------------------------------------------------------
980 // String matching algorithm used by SBTarget
981 //----------------------------------------------------------------------
982 enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith };
984 //----------------------------------------------------------------------
985 // Bitmask that describes details about a type
986 //----------------------------------------------------------------------
987 FLAGS_ENUM(TypeFlags){
988 eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1),
989 eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3),
990 eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5),
991 eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7),
992 eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9),
993 eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11),
994 eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13),
995 eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15),
996 eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17),
997 eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19),
998 eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21),
999 eTypeInstanceIsPointer = (1u << 22)};
1001 FLAGS_ENUM(CommandFlags){
1002 //----------------------------------------------------------------------
1003 // eCommandRequiresTarget
1005 // Ensures a valid target is contained in m_exe_ctx prior to executing
1006 // the command. If a target doesn't exist or is invalid, the command
1007 // will fail and CommandObject::GetInvalidTargetDescription() will be
1008 // returned as the error. CommandObject subclasses can override the
1009 // virtual function for GetInvalidTargetDescription() to provide custom
1010 // strings when needed.
1011 //----------------------------------------------------------------------
1012 eCommandRequiresTarget = (1u << 0),
1013 //----------------------------------------------------------------------
1014 // eCommandRequiresProcess
1016 // Ensures a valid process is contained in m_exe_ctx prior to executing
1017 // the command. If a process doesn't exist or is invalid, the command
1018 // will fail and CommandObject::GetInvalidProcessDescription() will be
1019 // returned as the error. CommandObject subclasses can override the
1020 // virtual function for GetInvalidProcessDescription() to provide custom
1021 // strings when needed.
1022 //----------------------------------------------------------------------
1023 eCommandRequiresProcess = (1u << 1),
1024 //----------------------------------------------------------------------
1025 // eCommandRequiresThread
1027 // Ensures a valid thread is contained in m_exe_ctx prior to executing
1028 // the command. If a thread doesn't exist or is invalid, the command
1029 // will fail and CommandObject::GetInvalidThreadDescription() will be
1030 // returned as the error. CommandObject subclasses can override the
1031 // virtual function for GetInvalidThreadDescription() to provide custom
1032 // strings when needed.
1033 //----------------------------------------------------------------------
1034 eCommandRequiresThread = (1u << 2),
1035 //----------------------------------------------------------------------
1036 // eCommandRequiresFrame
1038 // Ensures a valid frame is contained in m_exe_ctx prior to executing
1039 // the command. If a frame doesn't exist or is invalid, the command
1040 // will fail and CommandObject::GetInvalidFrameDescription() will be
1041 // returned as the error. CommandObject subclasses can override the
1042 // virtual function for GetInvalidFrameDescription() to provide custom
1043 // strings when needed.
1044 //----------------------------------------------------------------------
1045 eCommandRequiresFrame = (1u << 3),
1046 //----------------------------------------------------------------------
1047 // eCommandRequiresRegContext
1049 // Ensures a valid register context (from the selected frame if there
1050 // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
1051 // is available from m_exe_ctx prior to executing the command. If a
1052 // target doesn't exist or is invalid, the command will fail and
1053 // CommandObject::GetInvalidRegContextDescription() will be returned as
1054 // the error. CommandObject subclasses can override the virtual function
1055 // for GetInvalidRegContextDescription() to provide custom strings when
1057 //----------------------------------------------------------------------
1058 eCommandRequiresRegContext = (1u << 4),
1059 //----------------------------------------------------------------------
1060 // eCommandTryTargetAPILock
1062 // Attempts to acquire the target lock if a target is selected in the
1063 // command interpreter. If the command object fails to acquire the API
1064 // lock, the command will fail with an appropriate error message.
1065 //----------------------------------------------------------------------
1066 eCommandTryTargetAPILock = (1u << 5),
1067 //----------------------------------------------------------------------
1068 // eCommandProcessMustBeLaunched
1070 // Verifies that there is a launched process in m_exe_ctx, if there
1071 // isn't, the command will fail with an appropriate error message.
1072 //----------------------------------------------------------------------
1073 eCommandProcessMustBeLaunched = (1u << 6),
1074 //----------------------------------------------------------------------
1075 // eCommandProcessMustBePaused
1077 // Verifies that there is a paused process in m_exe_ctx, if there
1078 // isn't, the command will fail with an appropriate error message.
1079 //----------------------------------------------------------------------
1080 eCommandProcessMustBePaused = (1u << 7)};
1082 //----------------------------------------------------------------------
1083 // Whether a summary should cap how much data it returns to users or not
1084 //----------------------------------------------------------------------
1085 enum TypeSummaryCapping {
1086 eTypeSummaryCapped = true,
1087 eTypeSummaryUncapped = false
1092 #endif // LLDB_lldb_enumerations_h_