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_
15 //----------------------------------------------------------------------
16 // Process and Thread States
17 //----------------------------------------------------------------------
18 typedef enum StateType
21 eStateUnloaded, ///< Process is object is valid, but not currently loaded
22 eStateConnected, ///< Process is connected to remote debug services, but not launched or attached to anything yet
23 eStateAttaching, ///< Process is currently trying to attach
24 eStateLaunching, ///< Process is in the process of launching
25 eStateStopped, ///< Process or thread is stopped and can be examined.
26 eStateRunning, ///< Process or thread is running and can't be examined.
27 eStateStepping, ///< Process or thread is in the process of stepping and can not be examined.
28 eStateCrashed, ///< Process or thread has crashed and can be examined.
29 eStateDetached, ///< Process has been detached and can't be examined.
30 eStateExited, ///< Process has exited and can't be examined.
31 eStateSuspended ///< Process or thread is in a suspended state as far
32 ///< as the debugger is concerned while other processes
33 ///< or threads get the chance to run.
36 //----------------------------------------------------------------------
38 //----------------------------------------------------------------------
39 typedef enum LaunchFlags
42 eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling process into a new process
43 eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to allow the process to be debugged
44 eLaunchFlagStopAtEntry = (1u << 2), ///< Stop at the program entry point instead of auto-continuing when launching or attaching at entry point
45 eLaunchFlagDisableASLR = (1u << 3), ///< Disable Address Space Layout Randomization
46 eLaunchFlagDisableSTDIO = (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
47 eLaunchFlagLaunchInTTY = (1u << 5), ///< Launch the process in a new TTY if supported by the host
48 eLaunchFlagLaunchInShell= (1u << 6), ///< Launch the process inside a shell to get shell expansion
49 eLaunchFlagLaunchInSeparateProcessGroup = (1u << 7), ///< Launch the process in a separate process group
50 eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the process off (e.g. to debugserver)
51 ///< set this flag so lldb & the handee don't race to set its exit status.
52 eLaunchFlagDetachOnError = (1u << 9) ///< If set, then the client stub should detach rather than killing the debugee
53 ///< if it loses connection with lldb.
56 //----------------------------------------------------------------------
58 //----------------------------------------------------------------------
59 typedef enum RunMode {
65 //----------------------------------------------------------------------
66 // Byte ordering definitions
67 //----------------------------------------------------------------------
68 typedef enum ByteOrder
70 eByteOrderInvalid = 0,
76 //----------------------------------------------------------------------
77 // Register encoding definitions
78 //----------------------------------------------------------------------
82 eEncodingUint, // unsigned integer
83 eEncodingSint, // signed integer
84 eEncodingIEEE754, // float
85 eEncodingVector // vector registers
88 //----------------------------------------------------------------------
89 // Display format definitions
90 //----------------------------------------------------------------------
98 eFormatBytesWithASCII,
100 eFormatCharPrintable, // Only printable characters, space if not printable
101 eFormatComplex, // Floating point complex type
102 eFormatComplexFloat = eFormatComplex,
103 eFormatCString, // NULL terminated C strings
110 eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc...
116 eFormatVectorOfSInt8,
117 eFormatVectorOfUInt8,
118 eFormatVectorOfSInt16,
119 eFormatVectorOfUInt16,
120 eFormatVectorOfSInt32,
121 eFormatVectorOfUInt32,
122 eFormatVectorOfSInt64,
123 eFormatVectorOfUInt64,
124 eFormatVectorOfFloat32,
125 eFormatVectorOfFloat64,
126 eFormatVectorOfUInt128,
127 eFormatComplexInteger, // Integer complex type
128 eFormatCharArray, // Print characters with no single quotes, used for character arrays that can contain non printable characters
129 eFormatAddressInfo, // Describe what an address points to (func + offset with file/line, symbol + offset, data, etc)
130 eFormatHexFloat, // ISO C99 hex float string
131 eFormatInstruction, // Disassemble an opcode
132 eFormatVoid, // Do not print this
136 //----------------------------------------------------------------------
137 // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
138 //----------------------------------------------------------------------
139 typedef enum DescriptionLevel
141 eDescriptionLevelBrief = 0,
142 eDescriptionLevelFull,
143 eDescriptionLevelVerbose,
144 eDescriptionLevelInitial,
145 kNumDescriptionLevels
148 //----------------------------------------------------------------------
149 // Script interpreter types
150 //----------------------------------------------------------------------
151 typedef enum ScriptLanguage
154 eScriptLanguagePython,
155 eScriptLanguageDefault = eScriptLanguagePython
158 //----------------------------------------------------------------------
159 // Register numbering types
160 // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
161 // any of these to the lldb internal register numbering scheme
162 // (eRegisterKindLLDB).
163 //----------------------------------------------------------------------
164 typedef enum RegisterKind
166 eRegisterKindGCC = 0, // the register numbers seen in eh_frame
167 eRegisterKindDWARF, // the register numbers seen DWARF
168 eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target
169 eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers)
170 eRegisterKindLLDB, // lldb's internal register numbers
174 //----------------------------------------------------------------------
175 // Thread stop reasons
176 //----------------------------------------------------------------------
177 typedef enum StopReason
179 eStopReasonInvalid = 0,
182 eStopReasonBreakpoint,
183 eStopReasonWatchpoint,
185 eStopReasonException,
186 eStopReasonExec, // Program was re-exec'ed
187 eStopReasonPlanComplete,
188 eStopReasonThreadExiting,
189 eStopReasonInstrumentation
192 //----------------------------------------------------------------------
193 // Command Return Status Types
194 //----------------------------------------------------------------------
195 typedef enum ReturnStatus
197 eReturnStatusInvalid,
198 eReturnStatusSuccessFinishNoResult,
199 eReturnStatusSuccessFinishResult,
200 eReturnStatusSuccessContinuingNoResult,
201 eReturnStatusSuccessContinuingResult,
202 eReturnStatusStarted,
208 //----------------------------------------------------------------------
209 // The results of expression evaluation:
210 //----------------------------------------------------------------------
211 typedef enum ExpressionResults
213 eExpressionCompleted = 0,
214 eExpressionSetupError,
215 eExpressionParseError,
216 eExpressionDiscarded,
217 eExpressionInterrupted,
218 eExpressionHitBreakpoint,
220 eExpressionResultUnavailable,
221 eExpressionStoppedForDebug
224 //----------------------------------------------------------------------
225 // Connection Status Types
226 //----------------------------------------------------------------------
227 typedef enum ConnectionStatus
229 eConnectionStatusSuccess, // Success
230 eConnectionStatusEndOfFile, // End-of-file encountered
231 eConnectionStatusError, // Check GetError() for details
232 eConnectionStatusTimedOut, // Request timed out
233 eConnectionStatusNoConnection, // No connection
234 eConnectionStatusLostConnection, // Lost connection while connected to a valid connection
235 eConnectionStatusInterrupted // Interrupted read
238 typedef enum ErrorType
241 eErrorTypeGeneric, ///< Generic errors that can be any value.
242 eErrorTypeMachKernel, ///< Mach kernel error codes.
243 eErrorTypePOSIX, ///< POSIX error codes.
244 eErrorTypeExpression, ///< These are from the ExpressionResults enum.
245 eErrorTypeWin32 ///< Standard Win32 error codes.
249 typedef enum ValueType
251 eValueTypeInvalid = 0,
252 eValueTypeVariableGlobal = 1, // globals variable
253 eValueTypeVariableStatic = 2, // static variable
254 eValueTypeVariableArgument = 3, // function argument variables
255 eValueTypeVariableLocal = 4, // function local variables
256 eValueTypeRegister = 5, // stack frame register value
257 eValueTypeRegisterSet = 6, // A collection of stack frame register values
258 eValueTypeConstResult = 7 // constant result variables
261 //----------------------------------------------------------------------
262 // Token size/granularities for Input Readers
263 //----------------------------------------------------------------------
265 typedef enum InputReaderGranularity
267 eInputReaderGranularityInvalid = 0,
268 eInputReaderGranularityByte,
269 eInputReaderGranularityWord,
270 eInputReaderGranularityLine,
271 eInputReaderGranularityAll
272 } InputReaderGranularity;
274 //------------------------------------------------------------------
275 /// These mask bits allow a common interface for queries that can
276 /// limit the amount of information that gets parsed to only the
277 /// information that is requested. These bits also can indicate what
278 /// actually did get resolved during query function calls.
280 /// Each definition corresponds to a one of the member variables
281 /// in this class, and requests that that item be resolved, or
282 /// indicates that the member did get resolved.
283 //------------------------------------------------------------------
284 typedef enum SymbolContextItem
286 eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from a query, or was located in query results
287 eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from a query, or was located in query results
288 eSymbolContextCompUnit = (1u << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
289 eSymbolContextFunction = (1u << 3), ///< Set when \a function is requested from a query, or was located in query results
290 eSymbolContextBlock = (1u << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
291 eSymbolContextLineEntry = (1u << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
292 eSymbolContextSymbol = (1u << 6), ///< Set when \a symbol is requested from a query, or was located in query results
293 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u) ///< Indicates to try and lookup everything up during a query.
296 typedef enum Permissions
298 ePermissionsWritable = (1u << 0),
299 ePermissionsReadable = (1u << 1),
300 ePermissionsExecutable = (1u << 2)
303 typedef enum InputReaderAction
305 eInputReaderActivate, // reader is newly pushed onto the reader stack
306 eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something
307 eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off
308 eInputReaderDeactivate, // another reader was pushed on the stack
309 eInputReaderGotToken, // reader got one of its tokens (granularity)
310 eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c)
311 eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d)
312 eInputReaderDone // reader was just popped off the stack and is done
315 typedef enum BreakpointEventType
317 eBreakpointEventTypeInvalidType = (1u << 0),
318 eBreakpointEventTypeAdded = (1u << 1),
319 eBreakpointEventTypeRemoved = (1u << 2),
320 eBreakpointEventTypeLocationsAdded = (1u << 3), // Locations added doesn't get sent when the breakpoint is created
321 eBreakpointEventTypeLocationsRemoved = (1u << 4),
322 eBreakpointEventTypeLocationsResolved = (1u << 5),
323 eBreakpointEventTypeEnabled = (1u << 6),
324 eBreakpointEventTypeDisabled = (1u << 7),
325 eBreakpointEventTypeCommandChanged = (1u << 8),
326 eBreakpointEventTypeConditionChanged = (1u << 9),
327 eBreakpointEventTypeIgnoreChanged = (1u << 10),
328 eBreakpointEventTypeThreadChanged = (1u << 11)
329 } BreakpointEventType;
331 typedef enum WatchpointEventType
333 eWatchpointEventTypeInvalidType = (1u << 0),
334 eWatchpointEventTypeAdded = (1u << 1),
335 eWatchpointEventTypeRemoved = (1u << 2),
336 eWatchpointEventTypeEnabled = (1u << 6),
337 eWatchpointEventTypeDisabled = (1u << 7),
338 eWatchpointEventTypeCommandChanged = (1u << 8),
339 eWatchpointEventTypeConditionChanged = (1u << 9),
340 eWatchpointEventTypeIgnoreChanged = (1u << 10),
341 eWatchpointEventTypeThreadChanged = (1u << 11),
342 eWatchpointEventTypeTypeChanged = (1u << 12)
343 } WatchpointEventType;
346 //----------------------------------------------------------------------
347 /// Programming language type.
349 /// These enumerations use the same language enumerations as the DWARF
350 /// specification for ease of use and consistency.
351 /// The enum -> string code is in LanguageRuntime.cpp, don't change this
352 /// table without updating that code as well.
353 //----------------------------------------------------------------------
354 typedef enum LanguageType
356 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
357 eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
358 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
359 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
360 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
361 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
362 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
363 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
364 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
365 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
366 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
367 eLanguageTypeJava = 0x000b, ///< Java.
368 eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
369 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
370 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
371 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
372 eLanguageTypeObjC = 0x0010, ///< Objective-C.
373 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
374 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
375 eLanguageTypeD = 0x0013, ///< D.
376 eLanguageTypePython = 0x0014, ///< Python.
377 eLanguageTypeOpenCL = 0x0015, ///< OpenCL.
378 eLanguageTypeGo = 0x0016, ///< Go.
379 eLanguageTypeModula3 = 0x0017, ///< Modula 3.
380 eLanguageTypeHaskell = 0x0018, ///< Haskell.
381 eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
382 eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
383 eLanguageTypeOCaml = 0x001b, ///< OCaml.
384 eLanguageTypeRust = 0x001c, ///< Rust.
385 eLanguageTypeC11 = 0x001d, ///< ISO C:2011.
386 eLanguageTypeSwift = 0x001e, ///< Swift.
387 eLanguageTypeJulia = 0x001f, ///< Julia.
388 eLanguageTypeDylan = 0x0020, ///< Dylan.
392 typedef enum InstrumentationRuntimeType {
393 eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
394 eNumInstrumentationRuntimeTypes
395 } InstrumentationRuntimeType;
397 typedef enum DynamicValueType
399 eNoDynamicValues = 0,
400 eDynamicCanRunTarget = 1,
401 eDynamicDontRunTarget = 2
404 typedef enum AccessType
413 typedef enum CommandArgumentType
416 eArgTypeAddressOrExpression,
418 eArgTypeAliasOptions,
419 eArgTypeArchitecture,
421 eArgTypeBreakpointID,
422 eArgTypeBreakpointIDRange,
423 eArgTypeBreakpointName,
428 eArgTypeDescriptionVerbosity,
429 eArgTypeDirectoryName,
430 eArgTypeDisassemblyFlavor,
433 eArgTypeExpressionPath,
439 eArgTypeFunctionName,
440 eArgTypeFunctionOrSymbol,
450 eArgTypeNewPathPrefix,
452 eArgTypeNumberPerLine,
454 eArgTypeOldPathPrefix,
457 eArgTypePermissionsNumber,
458 eArgTypePermissionsString,
463 eArgTypePythonFunction,
464 eArgTypePythonScript,
466 eArgTypeRegisterName,
467 eArgTypeRegularExpression,
470 eArgTypeScriptedCommandSynchronicity,
474 eArgTypeSettingIndex,
476 eArgTypeSettingPrefix,
477 eArgTypeSettingVariableName,
481 eArgTypeStartAddress,
482 eArgTypeSummaryString,
487 eArgTypeUnsignedInteger,
494 eArgTypeWatchpointID,
495 eArgTypeWatchpointIDRange,
497 eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!!
498 } CommandArgumentType;
500 //----------------------------------------------------------------------
502 //----------------------------------------------------------------------
503 typedef enum SymbolType
506 eSymbolTypeInvalid = 0,
511 eSymbolTypeTrampoline,
513 eSymbolTypeException,
514 eSymbolTypeSourceFile,
515 eSymbolTypeHeaderFile,
516 eSymbolTypeObjectFile,
517 eSymbolTypeCommonBlock,
522 eSymbolTypeVariableType,
523 eSymbolTypeLineEntry,
524 eSymbolTypeLineHeader,
525 eSymbolTypeScopeBegin,
527 eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
529 eSymbolTypeInstrumentation,
530 eSymbolTypeUndefined,
531 eSymbolTypeObjCClass,
532 eSymbolTypeObjCMetaClass,
534 eSymbolTypeReExported
537 typedef enum SectionType
541 eSectionTypeContainer, // The section contains child sections
543 eSectionTypeDataCString, // Inlined C string data
544 eSectionTypeDataCStringPointers, // Pointers to C string data
545 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table
549 eSectionTypeDataPointers,
551 eSectionTypeZeroFill,
552 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
553 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects
554 eSectionTypeDWARFDebugAbbrev,
555 eSectionTypeDWARFDebugAranges,
556 eSectionTypeDWARFDebugFrame,
557 eSectionTypeDWARFDebugInfo,
558 eSectionTypeDWARFDebugLine,
559 eSectionTypeDWARFDebugLoc,
560 eSectionTypeDWARFDebugMacInfo,
561 eSectionTypeDWARFDebugPubNames,
562 eSectionTypeDWARFDebugPubTypes,
563 eSectionTypeDWARFDebugRanges,
564 eSectionTypeDWARFDebugStr,
565 eSectionTypeDWARFAppleNames,
566 eSectionTypeDWARFAppleTypes,
567 eSectionTypeDWARFAppleNamespaces,
568 eSectionTypeDWARFAppleObjC,
569 eSectionTypeELFSymbolTable, // Elf SHT_SYMTAB section
570 eSectionTypeELFDynamicSymbols, // Elf SHT_DYNSYM section
571 eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
572 eSectionTypeELFDynamicLinkInfo, // Elf SHT_DYNAMIC section
574 eSectionTypeCompactUnwind, // compact unwind section in Mach-O, __TEXT,__unwind_info
579 typedef enum EmulateInstructionOptions
581 eEmulateInstructionOptionNone = (0u),
582 eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
583 eEmulateInstructionOptionIgnoreConditions = (1u << 1)
584 } EmulateInstructionOptions;
586 typedef enum FunctionNameType
588 eFunctionNameTypeNone = 0u,
589 eFunctionNameTypeAuto = (1u << 1), // Automatically figure out which FunctionNameType
590 // bits to set based on the function name.
591 eFunctionNameTypeFull = (1u << 2), // The function name.
592 // For C this is the same as just the name of the function
593 // For C++ this is the mangled or demangled version of the mangled name.
594 // For ObjC this is the full function signature with the + or
595 // - and the square brackets and the class and selector
596 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces or arguments and no class
597 // methods or selectors will be searched.
598 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++) with no namespace or arguments
599 eFunctionNameTypeSelector = (1u << 5), // Find function by selector name (ObjC) names
600 eFunctionNameTypeAny = eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
604 //----------------------------------------------------------------------
605 // Basic types enumeration for the public API SBType::GetBasicType()
606 //----------------------------------------------------------------------
607 typedef enum BasicType
609 eBasicTypeInvalid = 0,
612 eBasicTypeSignedChar,
613 eBasicTypeUnsignedChar,
615 eBasicTypeSignedWChar,
616 eBasicTypeUnsignedWChar,
620 eBasicTypeUnsignedShort,
622 eBasicTypeUnsignedInt,
624 eBasicTypeUnsignedLong,
626 eBasicTypeUnsignedLongLong,
628 eBasicTypeUnsignedInt128,
633 eBasicTypeLongDouble,
634 eBasicTypeFloatComplex,
635 eBasicTypeDoubleComplex,
636 eBasicTypeLongDoubleComplex,
644 typedef enum TypeClass
646 eTypeClassInvalid = (0u),
647 eTypeClassArray = (1u << 0),
648 eTypeClassBlockPointer = (1u << 1),
649 eTypeClassBuiltin = (1u << 2),
650 eTypeClassClass = (1u << 3),
651 eTypeClassComplexFloat = (1u << 4),
652 eTypeClassComplexInteger = (1u << 5),
653 eTypeClassEnumeration = (1u << 6),
654 eTypeClassFunction = (1u << 7),
655 eTypeClassMemberPointer = (1u << 8),
656 eTypeClassObjCObject = (1u << 9),
657 eTypeClassObjCInterface = (1u << 10),
658 eTypeClassObjCObjectPointer = (1u << 11),
659 eTypeClassPointer = (1u << 12),
660 eTypeClassReference = (1u << 13),
661 eTypeClassStruct = (1u << 14),
662 eTypeClassTypedef = (1u << 15),
663 eTypeClassUnion = (1u << 16),
664 eTypeClassVector = (1u << 17),
665 // Define the last type class as the MSBit of a 32 bit value
666 eTypeClassOther = (1u << 31),
667 // Define a mask that can be used for any type when finding types
668 eTypeClassAny = (0xffffffffu)
671 typedef enum TemplateArgumentKind
673 eTemplateArgumentKindNull = 0,
674 eTemplateArgumentKindType,
675 eTemplateArgumentKindDeclaration,
676 eTemplateArgumentKindIntegral,
677 eTemplateArgumentKindTemplate,
678 eTemplateArgumentKindTemplateExpansion,
679 eTemplateArgumentKindExpression,
680 eTemplateArgumentKindPack
682 } TemplateArgumentKind;
684 //----------------------------------------------------------------------
685 // Options that can be set for a formatter to alter its behavior
686 // Not all of these are applicable to all formatter types
687 //----------------------------------------------------------------------
688 typedef enum TypeOptions
690 eTypeOptionNone = (0u),
691 eTypeOptionCascade = (1u << 0),
692 eTypeOptionSkipPointers = (1u << 1),
693 eTypeOptionSkipReferences = (1u << 2),
694 eTypeOptionHideChildren = (1u << 3),
695 eTypeOptionHideValue = (1u << 4),
696 eTypeOptionShowOneLiner = (1u << 5),
697 eTypeOptionHideNames = (1u << 6)
700 //----------------------------------------------------------------------
701 // This is the return value for frame comparisons. If you are comparing frame A to frame B
702 // the following cases arise:
703 // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older than B.
704 // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A is Younger than B
705 // 3) When frame A and frame B have the same StackID, they are Equal.
706 // 4) When frame A and frame B have the same immediate parent frame, but are not equal, the comparision yields
708 // 5) If the two frames are on different threads or processes the comparision is Invalid
709 // 6) If for some reason we can't figure out what went on, we return Unknown.
710 //----------------------------------------------------------------------
711 typedef enum FrameComparison
713 eFrameCompareInvalid,
714 eFrameCompareUnknown,
716 eFrameCompareSameParent,
717 eFrameCompareYounger,
721 //----------------------------------------------------------------------
724 // A way of classifying an address used for disassembling and setting
725 // breakpoints. Many object files can track exactly what parts of their
726 // object files are code, data and other information. This is of course
727 // above and beyond just looking at the section types. For example, code
728 // might contain PC relative data and the object file might be able to
729 // tell us that an address in code is data.
730 //----------------------------------------------------------------------
731 typedef enum AddressClass
733 eAddressClassInvalid,
734 eAddressClassUnknown,
736 eAddressClassCodeAlternateISA,
742 //----------------------------------------------------------------------
745 // Designed to mimic the unix file permission bits so they can be
746 // used with functions that set 'mode_t' to certain values for
748 //----------------------------------------------------------------------
749 typedef enum FilePermissions
751 eFilePermissionsUserRead = (1u << 8),
752 eFilePermissionsUserWrite = (1u << 7),
753 eFilePermissionsUserExecute = (1u << 6),
754 eFilePermissionsGroupRead = (1u << 5),
755 eFilePermissionsGroupWrite = (1u << 4),
756 eFilePermissionsGroupExecute = (1u << 3),
757 eFilePermissionsWorldRead = (1u << 2),
758 eFilePermissionsWorldWrite = (1u << 1),
759 eFilePermissionsWorldExecute = (1u << 0),
761 eFilePermissionsUserRW = (eFilePermissionsUserRead | eFilePermissionsUserWrite | 0 ),
762 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 | eFilePermissionsUserExecute ),
763 eFilePermissionsUserRWX = (eFilePermissionsUserRead | eFilePermissionsUserWrite | eFilePermissionsUserExecute ),
765 eFilePermissionsGroupRW = (eFilePermissionsGroupRead | eFilePermissionsGroupWrite | 0 ),
766 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 | eFilePermissionsGroupExecute ),
767 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead | eFilePermissionsGroupWrite | eFilePermissionsGroupExecute ),
769 eFilePermissionsWorldRW = (eFilePermissionsWorldRead | eFilePermissionsWorldWrite | 0 ),
770 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 | eFilePermissionsWorldExecute ),
771 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead | eFilePermissionsWorldWrite | eFilePermissionsWorldExecute ),
773 eFilePermissionsEveryoneR = (eFilePermissionsUserRead | eFilePermissionsGroupRead | eFilePermissionsWorldRead ),
774 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite | eFilePermissionsGroupWrite | eFilePermissionsWorldWrite ),
775 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute | eFilePermissionsGroupExecute | eFilePermissionsWorldExecute ),
777 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR | eFilePermissionsEveryoneW | 0 ),
778 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 | eFilePermissionsEveryoneX ),
779 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR | eFilePermissionsEveryoneW | eFilePermissionsEveryoneX ),
780 eFilePermissionsFileDefault = eFilePermissionsUserRW,
781 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
784 //----------------------------------------------------------------------
785 // Queue work item types
787 // The different types of work that can be enqueued on a libdispatch
788 // aka Grand Central Dispatch (GCD) queue.
789 //----------------------------------------------------------------------
790 typedef enum QueueItemKind
792 eQueueItemKindUnknown = 0,
793 eQueueItemKindFunction,
797 //----------------------------------------------------------------------
799 // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
800 // (executing on one thread) or concurrent (executing on multiple threads).
801 //----------------------------------------------------------------------
802 typedef enum QueueKind
804 eQueueKindUnknown = 0,
809 //----------------------------------------------------------------------
810 // Expression Evaluation Stages
811 // These are the cancellable stages of expression evaluation, passed to the
812 // expression evaluation callback, so that you can interrupt expression
813 // evaluation at the various points in its lifecycle.
814 //----------------------------------------------------------------------
815 typedef enum ExpressionEvaluationPhase
817 eExpressionEvaluationParse = 0,
818 eExpressionEvaluationIRGen,
819 eExpressionEvaluationExecution,
820 eExpressionEvaluationComplete
821 } ExpressionEvaluationPhase;
824 //----------------------------------------------------------------------
826 // Indicates what types of events cause the watchpoint to fire.
827 // Used by Native*Protocol-related classes.
828 //----------------------------------------------------------------------
829 typedef enum WatchpointKind
831 eWatchpointKindRead = (1u << 0),
832 eWatchpointKindWrite = (1u << 1)
835 typedef enum GdbSignal
837 eGdbSignalBadAccess = 0x91,
838 eGdbSignalBadInstruction = 0x92,
839 eGdbSignalArithmetic = 0x93,
840 eGdbSignalEmulation = 0x94,
841 eGdbSignalSoftware = 0x95,
842 eGdbSignalBreakpoint = 0x96
845 //----------------------------------------------------------------------
846 // Used with SBHost::GetPath (lldb::PathType) to find files that are
847 // related to LLDB on the current host machine. Most files are relative
848 // to LLDB or are in known locations.
849 //----------------------------------------------------------------------
850 typedef enum PathType
852 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
853 ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc)
854 ePathTypeHeaderDir, // Find LLDB header file directory
855 ePathTypePythonDir, // Find Python modules (PYTHONPATH) directory
856 ePathTypeLLDBSystemPlugins, // System plug-ins directory
857 ePathTypeLLDBUserPlugins, // User plug-ins directory
858 ePathTypeLLDBTempSystemDir, // The LLDB temp directory for this system that will be cleaned up on exit
859 ePathTypeClangDir // Find path to Clang builtin headers
862 //----------------------------------------------------------------------
863 // Kind of member function
864 // Used by the type system
865 //----------------------------------------------------------------------
866 typedef enum MemberFunctionKind
868 eMemberFunctionKindUnknown = 0, // Not sure what the type of this is
869 eMemberFunctionKindConstructor, // A function used to create instances
870 eMemberFunctionKindDestructor, // A function used to tear down existing instances
871 eMemberFunctionKindInstanceMethod, // A function that applies to a specific instance
872 eMemberFunctionKindStaticMethod // A function that applies to a type rather than any instance
873 } MemberFunctionKind;
876 //----------------------------------------------------------------------
877 // String matching algorithm used by SBTarget
878 //----------------------------------------------------------------------
879 typedef enum MatchType {
885 //----------------------------------------------------------------------
886 // Bitmask that describes details about a type
887 //----------------------------------------------------------------------
888 typedef enum TypeFlags {
889 eTypeHasChildren = (1u << 0),
890 eTypeHasValue = (1u << 1),
891 eTypeIsArray = (1u << 2),
892 eTypeIsBlock = (1u << 3),
893 eTypeIsBuiltIn = (1u << 4),
894 eTypeIsClass = (1u << 5),
895 eTypeIsCPlusPlus = (1u << 6),
896 eTypeIsEnumeration = (1u << 7),
897 eTypeIsFuncPrototype = (1u << 8),
898 eTypeIsMember = (1u << 9),
899 eTypeIsObjC = (1u << 10),
900 eTypeIsPointer = (1u << 11),
901 eTypeIsReference = (1u << 12),
902 eTypeIsStructUnion = (1u << 13),
903 eTypeIsTemplate = (1u << 14),
904 eTypeIsTypedef = (1u << 15),
905 eTypeIsVector = (1u << 16),
906 eTypeIsScalar = (1u << 17),
907 eTypeIsInteger = (1u << 18),
908 eTypeIsFloat = (1u << 19),
909 eTypeIsComplex = (1u << 20),
910 eTypeIsSigned = (1u << 21)
913 //----------------------------------------------------------------------
914 // Whether a summary should cap how much data it returns to users or not
915 //----------------------------------------------------------------------
916 typedef enum TypeSummaryCapping {
917 eTypeSummaryCapped = true,
918 eTypeSummaryUncapped = false
919 } TypeSummaryCapping;
924 #endif // LLDB_lldb_enumerations_h_