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