]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h
Update LLDB snapshot to upstream r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / lldb-enumerations.h
1 //===-- lldb-enumerations.h -------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLDB_lldb_enumerations_h_
11 #define LLDB_lldb_enumerations_h_
12
13 namespace lldb {
14
15     //----------------------------------------------------------------------
16     // Process and Thread States
17     //----------------------------------------------------------------------
18     typedef enum StateType
19     {
20         eStateInvalid = 0,
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.
34     } StateType;
35
36     //----------------------------------------------------------------------
37     // Launch Flags
38     //----------------------------------------------------------------------
39     typedef enum LaunchFlags
40     {
41         eLaunchFlagNone         = 0u,
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.
54     } LaunchFlags;
55         
56     //----------------------------------------------------------------------
57     // Thread Run Modes
58     //----------------------------------------------------------------------
59     typedef enum RunMode {
60         eOnlyThisThread,
61         eAllThreads,
62         eOnlyDuringStepping
63     } RunMode;
64
65     //----------------------------------------------------------------------
66     // Byte ordering definitions
67     //----------------------------------------------------------------------
68     typedef enum ByteOrder
69     {
70         eByteOrderInvalid   = 0,
71         eByteOrderBig       = 1,
72         eByteOrderPDP       = 2,
73         eByteOrderLittle    = 4
74     } ByteOrder;
75
76     //----------------------------------------------------------------------
77     // Register encoding definitions
78     //----------------------------------------------------------------------
79     typedef enum Encoding
80     {
81         eEncodingInvalid = 0,
82         eEncodingUint,               // unsigned integer
83         eEncodingSint,               // signed integer
84         eEncodingIEEE754,            // float
85         eEncodingVector              // vector registers
86     } Encoding;
87
88     //----------------------------------------------------------------------
89     // Display format definitions
90     //----------------------------------------------------------------------
91     typedef enum Format
92     {
93         eFormatDefault = 0,
94         eFormatInvalid = 0,
95         eFormatBoolean,
96         eFormatBinary,
97         eFormatBytes,
98         eFormatBytesWithASCII,
99         eFormatChar,
100         eFormatCharPrintable,   // Only printable characters, space if not printable
101         eFormatComplex,         // Floating point complex type
102         eFormatComplexFloat = eFormatComplex,
103         eFormatCString,         // NULL terminated C strings
104         eFormatDecimal,
105         eFormatEnum,
106         eFormatHex,
107         eFormatHexUppercase,
108         eFormatFloat,
109         eFormatOctal,
110         eFormatOSType,          // OS character codes encoded into an integer 'PICT' 'text' etc...
111         eFormatUnicode16,
112         eFormatUnicode32,
113         eFormatUnsigned,
114         eFormatPointer,
115         eFormatVectorOfChar,
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
133         kNumFormats
134     } Format;
135
136     //----------------------------------------------------------------------
137     // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
138     //----------------------------------------------------------------------
139     typedef enum DescriptionLevel
140     {
141         eDescriptionLevelBrief = 0,
142         eDescriptionLevelFull,
143         eDescriptionLevelVerbose,
144         eDescriptionLevelInitial,
145         kNumDescriptionLevels
146     } DescriptionLevel;
147
148     //----------------------------------------------------------------------
149     // Script interpreter types
150     //----------------------------------------------------------------------
151     typedef enum ScriptLanguage
152     {
153         eScriptLanguageNone,
154         eScriptLanguagePython,
155         eScriptLanguageDefault = eScriptLanguagePython
156     } ScriptLanguage;
157
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
165     {
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
171         kNumRegisterKinds
172     } RegisterKind;
173
174     //----------------------------------------------------------------------
175     // Thread stop reasons
176     //----------------------------------------------------------------------
177     typedef enum StopReason
178     {
179         eStopReasonInvalid = 0,
180         eStopReasonNone,
181         eStopReasonTrace,
182         eStopReasonBreakpoint,
183         eStopReasonWatchpoint,
184         eStopReasonSignal,
185         eStopReasonException,
186         eStopReasonExec,        // Program was re-exec'ed
187         eStopReasonPlanComplete,
188         eStopReasonThreadExiting,
189         eStopReasonInstrumentation
190     } StopReason;
191
192     //----------------------------------------------------------------------
193     // Command Return Status Types
194     //----------------------------------------------------------------------
195     typedef enum ReturnStatus
196     {
197         eReturnStatusInvalid,
198         eReturnStatusSuccessFinishNoResult,
199         eReturnStatusSuccessFinishResult,
200         eReturnStatusSuccessContinuingNoResult,
201         eReturnStatusSuccessContinuingResult,
202         eReturnStatusStarted,
203         eReturnStatusFailed,
204         eReturnStatusQuit
205     } ReturnStatus;
206
207
208     //----------------------------------------------------------------------
209     // The results of expression evaluation:
210     //----------------------------------------------------------------------
211     typedef enum ExpressionResults
212     {
213         eExpressionCompleted = 0,
214         eExpressionSetupError,
215         eExpressionParseError,
216         eExpressionDiscarded,
217         eExpressionInterrupted,
218         eExpressionHitBreakpoint,
219         eExpressionTimedOut,
220         eExpressionResultUnavailable,
221         eExpressionStoppedForDebug
222     } ExpressionResults;
223
224     //----------------------------------------------------------------------
225     // Connection Status Types
226     //----------------------------------------------------------------------
227     typedef enum ConnectionStatus
228     {
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
236     } ConnectionStatus;
237
238     typedef enum ErrorType
239     {
240         eErrorTypeInvalid,
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.
246     } ErrorType;
247
248
249     typedef enum ValueType
250     {
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
259     } ValueType;
260
261     //----------------------------------------------------------------------
262     // Token size/granularities for Input Readers
263     //----------------------------------------------------------------------
264
265     typedef enum InputReaderGranularity
266     {
267         eInputReaderGranularityInvalid = 0,
268         eInputReaderGranularityByte,
269         eInputReaderGranularityWord,
270         eInputReaderGranularityLine,
271         eInputReaderGranularityAll
272     } InputReaderGranularity;
273
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.
279     ///
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
285     {
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.
294     } SymbolContextItem;
295
296     typedef enum Permissions
297     {
298         ePermissionsWritable    = (1u << 0),
299         ePermissionsReadable    = (1u << 1),
300         ePermissionsExecutable  = (1u << 2)
301     } Permissions;
302
303     typedef enum InputReaderAction
304     {
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
313     } InputReaderAction;
314
315     typedef enum BreakpointEventType
316     {
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;
330
331     typedef enum WatchpointEventType
332     {
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;
344
345
346     //----------------------------------------------------------------------
347     /// Programming language type.
348     ///
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
355     {
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.
389         eNumLanguageTypes
390     } LanguageType;
391     
392     typedef enum InstrumentationRuntimeType {
393         eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
394         eNumInstrumentationRuntimeTypes
395     } InstrumentationRuntimeType;
396
397     typedef enum DynamicValueType
398     {
399         eNoDynamicValues = 0,
400         eDynamicCanRunTarget    = 1,
401         eDynamicDontRunTarget   = 2
402     } DynamicValueType;
403     
404     typedef enum AccessType
405     {
406         eAccessNone,
407         eAccessPublic,
408         eAccessPrivate,
409         eAccessProtected,
410         eAccessPackage
411     } AccessType;
412
413     typedef enum CommandArgumentType
414     {
415         eArgTypeAddress = 0,
416         eArgTypeAddressOrExpression,
417         eArgTypeAliasName,
418         eArgTypeAliasOptions,
419         eArgTypeArchitecture,
420         eArgTypeBoolean,
421         eArgTypeBreakpointID,
422         eArgTypeBreakpointIDRange,
423         eArgTypeBreakpointName,
424         eArgTypeByteSize,
425         eArgTypeClassName,
426         eArgTypeCommandName,
427         eArgTypeCount,
428         eArgTypeDescriptionVerbosity,
429         eArgTypeDirectoryName,
430         eArgTypeDisassemblyFlavor,
431         eArgTypeEndAddress,
432         eArgTypeExpression,
433         eArgTypeExpressionPath,
434         eArgTypeExprFormat,
435         eArgTypeFilename,
436         eArgTypeFormat,
437         eArgTypeFrameIndex,
438         eArgTypeFullName,
439         eArgTypeFunctionName,
440         eArgTypeFunctionOrSymbol,
441         eArgTypeGDBFormat,
442         eArgTypeHelpText,
443         eArgTypeIndex,
444         eArgTypeLanguage,
445         eArgTypeLineNum,
446         eArgTypeLogCategory,
447         eArgTypeLogChannel,
448         eArgTypeMethod,
449         eArgTypeName,
450         eArgTypeNewPathPrefix,
451         eArgTypeNumLines,
452         eArgTypeNumberPerLine,
453         eArgTypeOffset,
454         eArgTypeOldPathPrefix,
455         eArgTypeOneLiner,
456         eArgTypePath,
457         eArgTypePermissionsNumber,
458         eArgTypePermissionsString,
459         eArgTypePid,
460         eArgTypePlugin,
461         eArgTypeProcessName,
462         eArgTypePythonClass,
463         eArgTypePythonFunction,
464         eArgTypePythonScript,
465         eArgTypeQueueName,
466         eArgTypeRegisterName,
467         eArgTypeRegularExpression,
468         eArgTypeRunArgs,
469         eArgTypeRunMode,
470         eArgTypeScriptedCommandSynchronicity,
471         eArgTypeScriptLang,
472         eArgTypeSearchWord,
473         eArgTypeSelector,
474         eArgTypeSettingIndex,
475         eArgTypeSettingKey,
476         eArgTypeSettingPrefix,
477         eArgTypeSettingVariableName,
478         eArgTypeShlibName,
479         eArgTypeSourceFile,
480         eArgTypeSortOrder,
481         eArgTypeStartAddress,
482         eArgTypeSummaryString,
483         eArgTypeSymbol,
484         eArgTypeThreadID,
485         eArgTypeThreadIndex,
486         eArgTypeThreadName,
487         eArgTypeUnsignedInteger,
488         eArgTypeUnixSignal,
489         eArgTypeVarName,
490         eArgTypeValue,
491         eArgTypeWidth,
492         eArgTypeNone,
493         eArgTypePlatform,
494         eArgTypeWatchpointID,
495         eArgTypeWatchpointIDRange,
496         eArgTypeWatchType,
497         eArgTypeLastArg  // Always keep this entry as the last entry in this enumeration!!
498     } CommandArgumentType;
499
500     //----------------------------------------------------------------------
501     // Symbol types
502     //----------------------------------------------------------------------
503     typedef enum SymbolType
504     {
505         eSymbolTypeAny = 0,
506         eSymbolTypeInvalid = 0,
507         eSymbolTypeAbsolute,
508         eSymbolTypeCode,
509         eSymbolTypeResolver,
510         eSymbolTypeData,
511         eSymbolTypeTrampoline,
512         eSymbolTypeRuntime,
513         eSymbolTypeException,
514         eSymbolTypeSourceFile,
515         eSymbolTypeHeaderFile,
516         eSymbolTypeObjectFile,
517         eSymbolTypeCommonBlock,
518         eSymbolTypeBlock,
519         eSymbolTypeLocal,
520         eSymbolTypeParam,
521         eSymbolTypeVariable,
522         eSymbolTypeVariableType,
523         eSymbolTypeLineEntry,
524         eSymbolTypeLineHeader,
525         eSymbolTypeScopeBegin,
526         eSymbolTypeScopeEnd,
527         eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
528         eSymbolTypeCompiler,
529         eSymbolTypeInstrumentation,
530         eSymbolTypeUndefined,
531         eSymbolTypeObjCClass,
532         eSymbolTypeObjCMetaClass,
533         eSymbolTypeObjCIVar,
534         eSymbolTypeReExported
535     } SymbolType;
536     
537     typedef enum SectionType
538     {
539         eSectionTypeInvalid,
540         eSectionTypeCode,
541         eSectionTypeContainer,              // The section contains child sections
542         eSectionTypeData,
543         eSectionTypeDataCString,            // Inlined C string data
544         eSectionTypeDataCStringPointers,    // Pointers to C string data
545         eSectionTypeDataSymbolAddress,      // Address of a symbol in the symbol table
546         eSectionTypeData4,
547         eSectionTypeData8,
548         eSectionTypeData16,
549         eSectionTypeDataPointers,
550         eSectionTypeDebug,
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
573         eSectionTypeEHFrame,
574         eSectionTypeCompactUnwind,        // compact unwind section in Mach-O, __TEXT,__unwind_info
575         eSectionTypeOther
576         
577     } SectionType;
578
579     typedef enum EmulateInstructionOptions
580     {
581         eEmulateInstructionOptionNone               = (0u),
582         eEmulateInstructionOptionAutoAdvancePC      = (1u << 0),
583         eEmulateInstructionOptionIgnoreConditions   = (1u << 1)
584     } EmulateInstructionOptions;
585
586     typedef enum FunctionNameType 
587     {
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
601     } FunctionNameType;
602     
603     
604     //----------------------------------------------------------------------
605     // Basic types enumeration for the public API SBType::GetBasicType()
606     //----------------------------------------------------------------------
607     typedef enum BasicType
608     {
609                 eBasicTypeInvalid = 0,
610         eBasicTypeVoid = 1,
611         eBasicTypeChar,
612         eBasicTypeSignedChar,
613         eBasicTypeUnsignedChar,
614         eBasicTypeWChar,
615         eBasicTypeSignedWChar,
616         eBasicTypeUnsignedWChar,
617         eBasicTypeChar16,
618         eBasicTypeChar32,
619         eBasicTypeShort,
620         eBasicTypeUnsignedShort,
621         eBasicTypeInt,
622         eBasicTypeUnsignedInt,
623         eBasicTypeLong,
624         eBasicTypeUnsignedLong,
625         eBasicTypeLongLong,
626         eBasicTypeUnsignedLongLong,
627         eBasicTypeInt128,
628         eBasicTypeUnsignedInt128,
629         eBasicTypeBool,
630         eBasicTypeHalf,
631         eBasicTypeFloat,
632         eBasicTypeDouble,
633         eBasicTypeLongDouble,
634         eBasicTypeFloatComplex,
635         eBasicTypeDoubleComplex,
636         eBasicTypeLongDoubleComplex,
637         eBasicTypeObjCID,
638         eBasicTypeObjCClass,
639         eBasicTypeObjCSel,
640         eBasicTypeNullPtr,
641         eBasicTypeOther
642     } BasicType;
643
644     typedef enum TypeClass
645     {
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)
669     } TypeClass;
670
671     typedef enum TemplateArgumentKind
672     {
673         eTemplateArgumentKindNull = 0,
674         eTemplateArgumentKindType,
675         eTemplateArgumentKindDeclaration,
676         eTemplateArgumentKindIntegral,
677         eTemplateArgumentKindTemplate,
678         eTemplateArgumentKindTemplateExpansion,
679         eTemplateArgumentKindExpression,
680         eTemplateArgumentKindPack
681
682     } TemplateArgumentKind;
683
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
689     {
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)
698     } TypeOptions;
699
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
707    //    SameParent.
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
712    {
713        eFrameCompareInvalid,
714        eFrameCompareUnknown,
715        eFrameCompareEqual,
716        eFrameCompareSameParent,
717        eFrameCompareYounger,
718        eFrameCompareOlder
719    } FrameComparison;
720    
721     //----------------------------------------------------------------------
722     // Address Class
723     //
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
732     {
733         eAddressClassInvalid,
734         eAddressClassUnknown,
735         eAddressClassCode,
736         eAddressClassCodeAlternateISA,
737         eAddressClassData,
738         eAddressClassDebug,
739         eAddressClassRuntime
740     } AddressClass;
741
742     //----------------------------------------------------------------------
743     // File Permissions
744     //
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
747     // permissions.
748     //----------------------------------------------------------------------
749     typedef enum FilePermissions
750     {
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),
760         
761         eFilePermissionsUserRW      = (eFilePermissionsUserRead    | eFilePermissionsUserWrite      | 0                             ),
762         eFileFilePermissionsUserRX  = (eFilePermissionsUserRead    | 0                              | eFilePermissionsUserExecute   ),
763         eFilePermissionsUserRWX     = (eFilePermissionsUserRead    | eFilePermissionsUserWrite      | eFilePermissionsUserExecute   ),
764             
765         eFilePermissionsGroupRW     = (eFilePermissionsGroupRead   | eFilePermissionsGroupWrite     | 0                             ),
766         eFilePermissionsGroupRX     = (eFilePermissionsGroupRead   | 0                              | eFilePermissionsGroupExecute  ),
767         eFilePermissionsGroupRWX    = (eFilePermissionsGroupRead   | eFilePermissionsGroupWrite     | eFilePermissionsGroupExecute  ),
768         
769         eFilePermissionsWorldRW     = (eFilePermissionsWorldRead   | eFilePermissionsWorldWrite     | 0                             ),
770         eFilePermissionsWorldRX     = (eFilePermissionsWorldRead   | 0                              | eFilePermissionsWorldExecute  ),
771         eFilePermissionsWorldRWX    = (eFilePermissionsWorldRead   | eFilePermissionsWorldWrite     | eFilePermissionsWorldExecute  ),
772         
773         eFilePermissionsEveryoneR   = (eFilePermissionsUserRead    | eFilePermissionsGroupRead      | eFilePermissionsWorldRead     ),
774         eFilePermissionsEveryoneW   = (eFilePermissionsUserWrite   | eFilePermissionsGroupWrite     | eFilePermissionsWorldWrite    ),
775         eFilePermissionsEveryoneX   = (eFilePermissionsUserExecute | eFilePermissionsGroupExecute   | eFilePermissionsWorldExecute  ),
776         
777         eFilePermissionsEveryoneRW  = (eFilePermissionsEveryoneR   | eFilePermissionsEveryoneW      | 0                             ),
778         eFilePermissionsEveryoneRX  = (eFilePermissionsEveryoneR   | 0                              | eFilePermissionsEveryoneX     ),
779         eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR   | eFilePermissionsEveryoneW      | eFilePermissionsEveryoneX     ),
780         eFilePermissionsFileDefault = eFilePermissionsUserRW,
781         eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
782     } FilePermissions;
783
784     //----------------------------------------------------------------------
785     // Queue work item types
786     //
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
791     {
792         eQueueItemKindUnknown = 0,
793         eQueueItemKindFunction,
794         eQueueItemKindBlock
795     } QueueItemKind;
796
797     //----------------------------------------------------------------------
798     // Queue type
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
803     {
804         eQueueKindUnknown = 0,
805         eQueueKindSerial,
806         eQueueKindConcurrent
807     } QueueKind;
808     
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
816     {
817         eExpressionEvaluationParse = 0,
818         eExpressionEvaluationIRGen,
819         eExpressionEvaluationExecution,
820         eExpressionEvaluationComplete
821     } ExpressionEvaluationPhase;
822     
823
824     //----------------------------------------------------------------------
825     // Watchpoint Kind
826     // Indicates what types of events cause the watchpoint to fire.
827     // Used by Native*Protocol-related classes.
828     //----------------------------------------------------------------------
829     typedef enum WatchpointKind
830     {
831         eWatchpointKindRead = (1u << 0),
832         eWatchpointKindWrite = (1u << 1)
833     } WatchpointKind;
834
835     typedef enum GdbSignal
836     {
837         eGdbSignalBadAccess      = 0x91,
838         eGdbSignalBadInstruction = 0x92,
839         eGdbSignalArithmetic     = 0x93,
840         eGdbSignalEmulation      = 0x94,
841         eGdbSignalSoftware       = 0x95,
842         eGdbSignalBreakpoint     = 0x96
843     } GdbRemoteSignal;
844
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
851     {
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
860     } PathType;
861     
862     //----------------------------------------------------------------------
863     // Kind of member function
864     // Used by the type system
865     //----------------------------------------------------------------------
866     typedef enum MemberFunctionKind
867     {
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;
874
875
876     //----------------------------------------------------------------------
877     // String matching algorithm used by SBTarget
878     //----------------------------------------------------------------------
879     typedef enum MatchType {
880         eMatchTypeNormal,
881         eMatchTypeRegex,
882         eMatchTypeStartsWith
883     } MatchType;
884     
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)
911     } TypeFlags;
912     
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;
920
921 } // namespace lldb
922
923
924 #endif  // LLDB_lldb_enumerations_h_