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),
384 eBreakpointEventTypeAutoContinueChanged = (1u << 12)};
386 FLAGS_ENUM(WatchpointEventType){
387 eWatchpointEventTypeInvalidType = (1u << 0),
388 eWatchpointEventTypeAdded = (1u << 1),
389 eWatchpointEventTypeRemoved = (1u << 2),
390 eWatchpointEventTypeEnabled = (1u << 6),
391 eWatchpointEventTypeDisabled = (1u << 7),
392 eWatchpointEventTypeCommandChanged = (1u << 8),
393 eWatchpointEventTypeConditionChanged = (1u << 9),
394 eWatchpointEventTypeIgnoreChanged = (1u << 10),
395 eWatchpointEventTypeThreadChanged = (1u << 11),
396 eWatchpointEventTypeTypeChanged = (1u << 12)};
398 //----------------------------------------------------------------------
399 /// Programming language type.
401 /// These enumerations use the same language enumerations as the DWARF
402 /// specification for ease of use and consistency.
403 /// The enum -> string code is in Language.cpp, don't change this
404 /// table without updating that code as well.
405 //----------------------------------------------------------------------
407 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
408 eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
409 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
410 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
411 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
412 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
413 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
414 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
415 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
416 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
417 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
418 eLanguageTypeJava = 0x000b, ///< Java.
419 eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
420 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
421 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
422 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
423 eLanguageTypeObjC = 0x0010, ///< Objective-C.
424 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
425 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
426 eLanguageTypeD = 0x0013, ///< D.
427 eLanguageTypePython = 0x0014, ///< Python.
428 // NOTE: The below are DWARF5 constants, subject to change upon
429 // completion of the DWARF5 specification
430 eLanguageTypeOpenCL = 0x0015, ///< OpenCL.
431 eLanguageTypeGo = 0x0016, ///< Go.
432 eLanguageTypeModula3 = 0x0017, ///< Modula 3.
433 eLanguageTypeHaskell = 0x0018, ///< Haskell.
434 eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
435 eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
436 eLanguageTypeOCaml = 0x001b, ///< OCaml.
437 eLanguageTypeRust = 0x001c, ///< Rust.
438 eLanguageTypeC11 = 0x001d, ///< ISO C:2011.
439 eLanguageTypeSwift = 0x001e, ///< Swift.
440 eLanguageTypeJulia = 0x001f, ///< Julia.
441 eLanguageTypeDylan = 0x0020, ///< Dylan.
442 eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
443 eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003.
444 eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008.
446 // Note: Language::GetNameForLanguageType
447 // assumes these can be used as indexes into array language_names, and
448 // Language::SetLanguageFromCString and Language::AsCString
449 // assume these can be used as indexes into array g_languages.
450 eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler.
451 eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript.
455 enum InstrumentationRuntimeType {
456 eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
457 eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
458 eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002,
459 eInstrumentationRuntimeTypeMainThreadChecker = 0x0003,
460 eInstrumentationRuntimeTypeSwiftRuntimeReporting = 0x0004,
461 eNumInstrumentationRuntimeTypes
464 enum DynamicValueType {
465 eNoDynamicValues = 0,
466 eDynamicCanRunTarget = 1,
467 eDynamicDontRunTarget = 2
470 enum StopShowColumn {
471 eStopShowColumnAnsiOrCaret = 0,
472 eStopShowColumnAnsi = 1,
473 eStopShowColumnCaret = 2,
474 eStopShowColumnNone = 3
485 enum CommandArgumentType {
487 eArgTypeAddressOrExpression,
489 eArgTypeAliasOptions,
490 eArgTypeArchitecture,
492 eArgTypeBreakpointID,
493 eArgTypeBreakpointIDRange,
494 eArgTypeBreakpointName,
499 eArgTypeDescriptionVerbosity,
500 eArgTypeDirectoryName,
501 eArgTypeDisassemblyFlavor,
504 eArgTypeExpressionPath,
510 eArgTypeFunctionName,
511 eArgTypeFunctionOrSymbol,
521 eArgTypeNewPathPrefix,
523 eArgTypeNumberPerLine,
525 eArgTypeOldPathPrefix,
528 eArgTypePermissionsNumber,
529 eArgTypePermissionsString,
534 eArgTypePythonFunction,
535 eArgTypePythonScript,
537 eArgTypeRegisterName,
538 eArgTypeRegularExpression,
541 eArgTypeScriptedCommandSynchronicity,
545 eArgTypeSettingIndex,
547 eArgTypeSettingPrefix,
548 eArgTypeSettingVariableName,
552 eArgTypeStartAddress,
553 eArgTypeSummaryString,
559 eArgTypeUnsignedInteger,
566 eArgTypeWatchpointID,
567 eArgTypeWatchpointIDRange,
571 eArgTypeLastArg // Always keep this entry as the last entry in this
575 //----------------------------------------------------------------------
577 //----------------------------------------------------------------------
580 eSymbolTypeInvalid = 0,
585 eSymbolTypeTrampoline,
587 eSymbolTypeException,
588 eSymbolTypeSourceFile,
589 eSymbolTypeHeaderFile,
590 eSymbolTypeObjectFile,
591 eSymbolTypeCommonBlock,
596 eSymbolTypeVariableType,
597 eSymbolTypeLineEntry,
598 eSymbolTypeLineHeader,
599 eSymbolTypeScopeBegin,
601 eSymbolTypeAdditional, // When symbols take more than one entry, the extra
602 // entries get this type
604 eSymbolTypeInstrumentation,
605 eSymbolTypeUndefined,
606 eSymbolTypeObjCClass,
607 eSymbolTypeObjCMetaClass,
609 eSymbolTypeReExported
615 eSectionTypeContainer, // The section contains child sections
617 eSectionTypeDataCString, // Inlined C string data
618 eSectionTypeDataCStringPointers, // Pointers to C string data
619 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
623 eSectionTypeDataPointers,
625 eSectionTypeZeroFill,
626 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
627 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
628 eSectionTypeDWARFDebugAbbrev,
629 eSectionTypeDWARFDebugAddr,
630 eSectionTypeDWARFDebugAranges,
631 eSectionTypeDWARFDebugCuIndex,
632 eSectionTypeDWARFDebugFrame,
633 eSectionTypeDWARFDebugInfo,
634 eSectionTypeDWARFDebugLine,
635 eSectionTypeDWARFDebugLoc,
636 eSectionTypeDWARFDebugMacInfo,
637 eSectionTypeDWARFDebugMacro,
638 eSectionTypeDWARFDebugPubNames,
639 eSectionTypeDWARFDebugPubTypes,
640 eSectionTypeDWARFDebugRanges,
641 eSectionTypeDWARFDebugStr,
642 eSectionTypeDWARFDebugStrOffsets,
643 eSectionTypeDWARFAppleNames,
644 eSectionTypeDWARFAppleTypes,
645 eSectionTypeDWARFAppleNamespaces,
646 eSectionTypeDWARFAppleObjC,
647 eSectionTypeELFSymbolTable, // Elf SHT_SYMTAB section
648 eSectionTypeELFDynamicSymbols, // Elf SHT_DYNSYM section
649 eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
650 eSectionTypeELFDynamicLinkInfo, // Elf SHT_DYNAMIC section
652 eSectionTypeARMexidx,
653 eSectionTypeARMextab,
654 eSectionTypeCompactUnwind, // compact unwind section in Mach-O,
655 // __TEXT,__unwind_info
656 eSectionTypeGoSymtab,
657 eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute
662 FLAGS_ENUM(EmulateInstructionOptions){
663 eEmulateInstructionOptionNone = (0u),
664 eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
665 eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
667 FLAGS_ENUM(FunctionNameType){
668 eFunctionNameTypeNone = 0u,
669 eFunctionNameTypeAuto =
670 (1u << 1), // Automatically figure out which FunctionNameType
671 // bits to set based on the function name.
672 eFunctionNameTypeFull = (1u << 2), // The function name.
673 // For C this is the same as just the name of the function
674 // For C++ this is the mangled or demangled version of the mangled name.
675 // For ObjC this is the full function signature with the + or
676 // - and the square brackets and the class and selector
677 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces
678 // or arguments and no class
679 // methods or selectors will be searched.
680 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++)
681 // with no namespace or arguments
682 eFunctionNameTypeSelector =
683 (1u << 5), // Find function by selector name (ObjC) names
684 eFunctionNameTypeAny =
685 eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
688 //----------------------------------------------------------------------
689 // Basic types enumeration for the public API SBType::GetBasicType()
690 //----------------------------------------------------------------------
692 eBasicTypeInvalid = 0,
695 eBasicTypeSignedChar,
696 eBasicTypeUnsignedChar,
698 eBasicTypeSignedWChar,
699 eBasicTypeUnsignedWChar,
703 eBasicTypeUnsignedShort,
705 eBasicTypeUnsignedInt,
707 eBasicTypeUnsignedLong,
709 eBasicTypeUnsignedLongLong,
711 eBasicTypeUnsignedInt128,
716 eBasicTypeLongDouble,
717 eBasicTypeFloatComplex,
718 eBasicTypeDoubleComplex,
719 eBasicTypeLongDoubleComplex,
730 // Hardware Trace generated by the processor.
731 eTraceTypeProcessorTrace
734 enum StructuredDataType {
735 eStructuredDataTypeInvalid = -1,
736 eStructuredDataTypeNull = 0,
737 eStructuredDataTypeGeneric,
738 eStructuredDataTypeArray,
739 eStructuredDataTypeInteger,
740 eStructuredDataTypeFloat,
741 eStructuredDataTypeBoolean,
742 eStructuredDataTypeString,
743 eStructuredDataTypeDictionary
746 FLAGS_ENUM(TypeClass){
747 eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
748 eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
749 eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
750 eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
751 eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
752 eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
753 eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
754 eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
755 eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
756 eTypeClassVector = (1u << 17),
757 // Define the last type class as the MSBit of a 32 bit value
758 eTypeClassOther = (1u << 31),
759 // Define a mask that can be used for any type when finding types
760 eTypeClassAny = (0xffffffffu)};
762 enum TemplateArgumentKind {
763 eTemplateArgumentKindNull = 0,
764 eTemplateArgumentKindType,
765 eTemplateArgumentKindDeclaration,
766 eTemplateArgumentKindIntegral,
767 eTemplateArgumentKindTemplate,
768 eTemplateArgumentKindTemplateExpansion,
769 eTemplateArgumentKindExpression,
770 eTemplateArgumentKindPack,
771 eTemplateArgumentKindNullPtr,
774 //----------------------------------------------------------------------
775 // Options that can be set for a formatter to alter its behavior
776 // Not all of these are applicable to all formatter types
777 //----------------------------------------------------------------------
778 FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
779 eTypeOptionCascade = (1u << 0),
780 eTypeOptionSkipPointers = (1u << 1),
781 eTypeOptionSkipReferences = (1u << 2),
782 eTypeOptionHideChildren = (1u << 3),
783 eTypeOptionHideValue = (1u << 4),
784 eTypeOptionShowOneLiner = (1u << 5),
785 eTypeOptionHideNames = (1u << 6),
786 eTypeOptionNonCacheable = (1u << 7),
787 eTypeOptionHideEmptyAggregates = (1u << 8)};
789 //----------------------------------------------------------------------
790 // This is the return value for frame comparisons. If you are comparing frame A
792 // the following cases arise:
793 // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older
795 // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A
797 // 3) When frame A and frame B have the same StackID, they are Equal.
798 // 4) When frame A and frame B have the same immediate parent frame, but are not
799 // equal, the comparison yields
801 // 5) If the two frames are on different threads or processes the comparison is
803 // 6) If for some reason we can't figure out what went on, we return Unknown.
804 //----------------------------------------------------------------------
805 enum FrameComparison {
806 eFrameCompareInvalid,
807 eFrameCompareUnknown,
809 eFrameCompareSameParent,
810 eFrameCompareYounger,
814 //----------------------------------------------------------------------
817 // A way of classifying an address used for disassembling and setting
818 // breakpoints. Many object files can track exactly what parts of their
819 // object files are code, data and other information. This is of course
820 // above and beyond just looking at the section types. For example, code
821 // might contain PC relative data and the object file might be able to
822 // tell us that an address in code is data.
823 //----------------------------------------------------------------------
825 eAddressClassInvalid,
826 eAddressClassUnknown,
828 eAddressClassCodeAlternateISA,
834 //----------------------------------------------------------------------
837 // Designed to mimic the unix file permission bits so they can be
838 // used with functions that set 'mode_t' to certain values for
840 //----------------------------------------------------------------------
841 FLAGS_ENUM(FilePermissions){
842 eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7),
843 eFilePermissionsUserExecute = (1u << 6),
844 eFilePermissionsGroupRead = (1u << 5),
845 eFilePermissionsGroupWrite = (1u << 4),
846 eFilePermissionsGroupExecute = (1u << 3),
847 eFilePermissionsWorldRead = (1u << 2),
848 eFilePermissionsWorldWrite = (1u << 1),
849 eFilePermissionsWorldExecute = (1u << 0),
851 eFilePermissionsUserRW = (eFilePermissionsUserRead |
852 eFilePermissionsUserWrite | 0),
853 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
854 eFilePermissionsUserExecute),
855 eFilePermissionsUserRWX = (eFilePermissionsUserRead |
856 eFilePermissionsUserWrite |
857 eFilePermissionsUserExecute),
859 eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
860 eFilePermissionsGroupWrite | 0),
861 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
862 eFilePermissionsGroupExecute),
863 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
864 eFilePermissionsGroupWrite |
865 eFilePermissionsGroupExecute),
867 eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
868 eFilePermissionsWorldWrite | 0),
869 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
870 eFilePermissionsWorldExecute),
871 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
872 eFilePermissionsWorldWrite |
873 eFilePermissionsWorldExecute),
875 eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
876 eFilePermissionsGroupRead |
877 eFilePermissionsWorldRead),
878 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
879 eFilePermissionsGroupWrite |
880 eFilePermissionsWorldWrite),
881 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
882 eFilePermissionsGroupExecute |
883 eFilePermissionsWorldExecute),
885 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
886 eFilePermissionsEveryoneW | 0),
887 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
888 eFilePermissionsEveryoneX),
889 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
890 eFilePermissionsEveryoneW |
891 eFilePermissionsEveryoneX),
892 eFilePermissionsFileDefault = eFilePermissionsUserRW,
893 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
896 //----------------------------------------------------------------------
897 // Queue work item types
899 // The different types of work that can be enqueued on a libdispatch
900 // aka Grand Central Dispatch (GCD) queue.
901 //----------------------------------------------------------------------
903 eQueueItemKindUnknown = 0,
904 eQueueItemKindFunction,
908 //----------------------------------------------------------------------
910 // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
911 // (executing on one thread) or concurrent (executing on multiple threads).
912 //----------------------------------------------------------------------
914 eQueueKindUnknown = 0,
919 //----------------------------------------------------------------------
920 // Expression Evaluation Stages
921 // These are the cancellable stages of expression evaluation, passed to the
922 // expression evaluation callback, so that you can interrupt expression
923 // evaluation at the various points in its lifecycle.
924 //----------------------------------------------------------------------
925 enum ExpressionEvaluationPhase {
926 eExpressionEvaluationParse = 0,
927 eExpressionEvaluationIRGen,
928 eExpressionEvaluationExecution,
929 eExpressionEvaluationComplete
932 //----------------------------------------------------------------------
934 // Indicates what types of events cause the watchpoint to fire.
935 // Used by Native*Protocol-related classes.
936 //----------------------------------------------------------------------
937 FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
938 eWatchpointKindRead = (1u << 1)};
941 eGdbSignalBadAccess = 0x91,
942 eGdbSignalBadInstruction = 0x92,
943 eGdbSignalArithmetic = 0x93,
944 eGdbSignalEmulation = 0x94,
945 eGdbSignalSoftware = 0x95,
946 eGdbSignalBreakpoint = 0x96
949 //----------------------------------------------------------------------
950 // Used with SBHost::GetPath (lldb::PathType) to find files that are
951 // related to LLDB on the current host machine. Most files are relative
952 // to LLDB or are in known locations.
953 //----------------------------------------------------------------------
955 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB
956 // mach-o file in LLDB.framework (MacOSX) exists
957 ePathTypeSupportExecutableDir, // Find LLDB support executable directory
958 // (debugserver, etc)
959 ePathTypeHeaderDir, // Find LLDB header file directory
960 ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory
961 ePathTypeLLDBSystemPlugins, // System plug-ins directory
962 ePathTypeLLDBUserPlugins, // User plug-ins directory
963 ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that
964 // will be cleaned up on exit
965 ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system,
966 // NOT cleaned up on a process exit.
967 ePathTypeClangDir // Find path to Clang builtin headers
970 //----------------------------------------------------------------------
971 // Kind of member function
972 // Used by the type system
973 //----------------------------------------------------------------------
974 enum MemberFunctionKind {
975 eMemberFunctionKindUnknown = 0, // Not sure what the type of this is
976 eMemberFunctionKindConstructor, // A function used to create instances
977 eMemberFunctionKindDestructor, // A function used to tear down existing
979 eMemberFunctionKindInstanceMethod, // A function that applies to a specific
981 eMemberFunctionKindStaticMethod // A function that applies to a type rather
985 //----------------------------------------------------------------------
986 // String matching algorithm used by SBTarget
987 //----------------------------------------------------------------------
988 enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith };
990 //----------------------------------------------------------------------
991 // Bitmask that describes details about a type
992 //----------------------------------------------------------------------
993 FLAGS_ENUM(TypeFlags){
994 eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1),
995 eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3),
996 eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5),
997 eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7),
998 eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9),
999 eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11),
1000 eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13),
1001 eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15),
1002 eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17),
1003 eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19),
1004 eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21),
1005 eTypeInstanceIsPointer = (1u << 22)};
1007 FLAGS_ENUM(CommandFlags){
1008 //----------------------------------------------------------------------
1009 // eCommandRequiresTarget
1011 // Ensures a valid target is contained in m_exe_ctx prior to executing
1012 // the command. If a target doesn't exist or is invalid, the command
1013 // will fail and CommandObject::GetInvalidTargetDescription() will be
1014 // returned as the error. CommandObject subclasses can override the
1015 // virtual function for GetInvalidTargetDescription() to provide custom
1016 // strings when needed.
1017 //----------------------------------------------------------------------
1018 eCommandRequiresTarget = (1u << 0),
1019 //----------------------------------------------------------------------
1020 // eCommandRequiresProcess
1022 // Ensures a valid process is contained in m_exe_ctx prior to executing
1023 // the command. If a process doesn't exist or is invalid, the command
1024 // will fail and CommandObject::GetInvalidProcessDescription() will be
1025 // returned as the error. CommandObject subclasses can override the
1026 // virtual function for GetInvalidProcessDescription() to provide custom
1027 // strings when needed.
1028 //----------------------------------------------------------------------
1029 eCommandRequiresProcess = (1u << 1),
1030 //----------------------------------------------------------------------
1031 // eCommandRequiresThread
1033 // Ensures a valid thread is contained in m_exe_ctx prior to executing
1034 // the command. If a thread doesn't exist or is invalid, the command
1035 // will fail and CommandObject::GetInvalidThreadDescription() will be
1036 // returned as the error. CommandObject subclasses can override the
1037 // virtual function for GetInvalidThreadDescription() to provide custom
1038 // strings when needed.
1039 //----------------------------------------------------------------------
1040 eCommandRequiresThread = (1u << 2),
1041 //----------------------------------------------------------------------
1042 // eCommandRequiresFrame
1044 // Ensures a valid frame is contained in m_exe_ctx prior to executing
1045 // the command. If a frame doesn't exist or is invalid, the command
1046 // will fail and CommandObject::GetInvalidFrameDescription() will be
1047 // returned as the error. CommandObject subclasses can override the
1048 // virtual function for GetInvalidFrameDescription() to provide custom
1049 // strings when needed.
1050 //----------------------------------------------------------------------
1051 eCommandRequiresFrame = (1u << 3),
1052 //----------------------------------------------------------------------
1053 // eCommandRequiresRegContext
1055 // Ensures a valid register context (from the selected frame if there
1056 // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
1057 // is available from m_exe_ctx prior to executing the command. If a
1058 // target doesn't exist or is invalid, the command will fail and
1059 // CommandObject::GetInvalidRegContextDescription() will be returned as
1060 // the error. CommandObject subclasses can override the virtual function
1061 // for GetInvalidRegContextDescription() to provide custom strings when
1063 //----------------------------------------------------------------------
1064 eCommandRequiresRegContext = (1u << 4),
1065 //----------------------------------------------------------------------
1066 // eCommandTryTargetAPILock
1068 // Attempts to acquire the target lock if a target is selected in the
1069 // command interpreter. If the command object fails to acquire the API
1070 // lock, the command will fail with an appropriate error message.
1071 //----------------------------------------------------------------------
1072 eCommandTryTargetAPILock = (1u << 5),
1073 //----------------------------------------------------------------------
1074 // eCommandProcessMustBeLaunched
1076 // Verifies that there is a launched process in m_exe_ctx, if there
1077 // isn't, the command will fail with an appropriate error message.
1078 //----------------------------------------------------------------------
1079 eCommandProcessMustBeLaunched = (1u << 6),
1080 //----------------------------------------------------------------------
1081 // eCommandProcessMustBePaused
1083 // Verifies that there is a paused process in m_exe_ctx, if there
1084 // isn't, the command will fail with an appropriate error message.
1085 //----------------------------------------------------------------------
1086 eCommandProcessMustBePaused = (1u << 7)};
1088 //----------------------------------------------------------------------
1089 // Whether a summary should cap how much data it returns to users or not
1090 //----------------------------------------------------------------------
1091 enum TypeSummaryCapping {
1092 eTypeSummaryCapped = true,
1093 eTypeSummaryUncapped = false
1098 #endif // LLDB_lldb_enumerations_h_