]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h
Merge ^/head r295902 through r296006.
[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 #ifndef SWIG
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.
23 //
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
30 #else
31 #define FLAGS_ENUM(Name) enum Name
32 #define FLAGS_ANONYMOUS_ENUM() enum
33 #endif
34
35 namespace lldb {
36
37     //----------------------------------------------------------------------
38     // Process and Thread States
39     //----------------------------------------------------------------------
40     enum StateType
41     {
42         eStateInvalid = 0,
43         eStateUnloaded,     ///< Process is object is valid, but not currently loaded
44         eStateConnected,    ///< Process is connected to remote debug services, but not 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 not be examined.
50         eStateCrashed,      ///< Process or thread has crashed and can be examined.
51         eStateDetached,     ///< Process has been detached and can't be examined.
52         eStateExited,       ///< Process has exited and can't be examined.
53         eStateSuspended     ///< Process or thread is in a suspended state as far
54                             ///< as the debugger is concerned while other processes
55                             ///< or threads get the chance to run.
56     };
57
58     //----------------------------------------------------------------------
59     // Launch Flags
60     //----------------------------------------------------------------------
61     FLAGS_ENUM(LaunchFlags)
62     {
63         eLaunchFlagNone         = 0u,
64         eLaunchFlagExec         = (1u << 0),       ///< Exec when launching and turn the calling process into a new process
65         eLaunchFlagDebug        = (1u << 1),       ///< Stop as soon as the process launches to allow the process to be debugged
66         eLaunchFlagStopAtEntry  = (1u << 2),       ///< Stop at the program entry point instead of auto-continuing when launching or attaching at entry point
67         eLaunchFlagDisableASLR  = (1u << 3),       ///< Disable Address Space Layout Randomization
68         eLaunchFlagDisableSTDIO = (1u << 4),       ///< Disable stdio for inferior process (e.g. for a GUI app)
69         eLaunchFlagLaunchInTTY  = (1u << 5),       ///< Launch the process in a new TTY if supported by the host
70         eLaunchFlagLaunchInShell= (1u << 6),       ///< Launch the process inside a shell to get shell expansion
71         eLaunchFlagLaunchInSeparateProcessGroup = (1u << 7), ///< Launch the process in a separate process group
72         eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the process off (e.g. to debugserver)
73                                                    ///< set this flag so lldb & the handee don't race to set its exit status.
74         eLaunchFlagDetachOnError = (1u << 9),     ///< If set, then the client stub should detach rather than killing the debugee
75                                                    ///< if it loses connection with lldb.
76         eLaunchFlagShellExpandArguments  = (1u << 10),       ///< Perform shell-style argument expansion
77         eLaunchFlagCloseTTYOnExit = (1u << 11),    ///< Close the open TTY on exit
78     };
79         
80     //----------------------------------------------------------------------
81     // Thread Run Modes
82     //----------------------------------------------------------------------
83     enum RunMode
84     {
85         eOnlyThisThread,
86         eAllThreads,
87         eOnlyDuringStepping
88     };
89
90     //----------------------------------------------------------------------
91     // Byte ordering definitions
92     //----------------------------------------------------------------------
93     enum ByteOrder
94     {
95         eByteOrderInvalid   = 0,
96         eByteOrderBig       = 1,
97         eByteOrderPDP       = 2,
98         eByteOrderLittle    = 4
99     };
100
101     //----------------------------------------------------------------------
102     // Register encoding definitions
103     //----------------------------------------------------------------------
104     enum Encoding
105     {
106         eEncodingInvalid = 0,
107         eEncodingUint,               // unsigned integer
108         eEncodingSint,               // signed integer
109         eEncodingIEEE754,            // float
110         eEncodingVector              // vector registers
111     };
112
113     //----------------------------------------------------------------------
114     // Display format definitions
115     //----------------------------------------------------------------------
116     enum Format
117     {
118         eFormatDefault = 0,
119         eFormatInvalid = 0,
120         eFormatBoolean,
121         eFormatBinary,
122         eFormatBytes,
123         eFormatBytesWithASCII,
124         eFormatChar,
125         eFormatCharPrintable,   // Only printable characters, space if not printable
126         eFormatComplex,         // Floating point complex type
127         eFormatComplexFloat = eFormatComplex,
128         eFormatCString,         // NULL terminated C strings
129         eFormatDecimal,
130         eFormatEnum,
131         eFormatHex,
132         eFormatHexUppercase,
133         eFormatFloat,
134         eFormatOctal,
135         eFormatOSType,          // OS character codes encoded into an integer 'PICT' 'text' etc...
136         eFormatUnicode16,
137         eFormatUnicode32,
138         eFormatUnsigned,
139         eFormatPointer,
140         eFormatVectorOfChar,
141         eFormatVectorOfSInt8,
142         eFormatVectorOfUInt8,
143         eFormatVectorOfSInt16,
144         eFormatVectorOfUInt16,
145         eFormatVectorOfSInt32,
146         eFormatVectorOfUInt32,
147         eFormatVectorOfSInt64,
148         eFormatVectorOfUInt64,
149         eFormatVectorOfFloat16,
150         eFormatVectorOfFloat32,
151         eFormatVectorOfFloat64,
152         eFormatVectorOfUInt128,
153         eFormatComplexInteger,      // Integer complex type
154         eFormatCharArray,           // Print characters with no single quotes, used for character arrays that can contain non printable characters
155         eFormatAddressInfo,         // Describe what an address points to (func + offset with file/line, symbol + offset, data, etc)
156         eFormatHexFloat,            // ISO C99 hex float string
157         eFormatInstruction,         // Disassemble an opcode
158         eFormatVoid,                // Do not print this
159         kNumFormats
160     };
161
162     //----------------------------------------------------------------------
163     // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
164     //----------------------------------------------------------------------
165     enum DescriptionLevel
166     {
167         eDescriptionLevelBrief = 0,
168         eDescriptionLevelFull,
169         eDescriptionLevelVerbose,
170         eDescriptionLevelInitial,
171         kNumDescriptionLevels
172     };
173
174     //----------------------------------------------------------------------
175     // Script interpreter types
176     //----------------------------------------------------------------------
177     enum ScriptLanguage
178     {
179         eScriptLanguageNone,
180         eScriptLanguagePython,
181         eScriptLanguageDefault = eScriptLanguagePython
182     };
183
184     //----------------------------------------------------------------------
185     // Register numbering types
186     // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert
187     // any of these to the lldb internal register numbering scheme 
188     // (eRegisterKindLLDB).
189     //----------------------------------------------------------------------
190     enum RegisterKind
191     {
192         eRegisterKindEHFrame = 0,   // the register numbers seen in eh_frame
193         eRegisterKindDWARF,         // the register numbers seen DWARF
194         eRegisterKindGeneric,       // insn ptr reg, stack ptr reg, etc not specific to any particular target
195         eRegisterKindProcessPlugin, // num used by the process plugin - e.g. by the remote gdb-protocol stub program
196         eRegisterKindLLDB,          // lldb's internal register numbers
197         kNumRegisterKinds
198     };
199
200     //----------------------------------------------------------------------
201     // Thread stop reasons
202     //----------------------------------------------------------------------
203     enum StopReason
204     {
205         eStopReasonInvalid = 0,
206         eStopReasonNone,
207         eStopReasonTrace,
208         eStopReasonBreakpoint,
209         eStopReasonWatchpoint,
210         eStopReasonSignal,
211         eStopReasonException,
212         eStopReasonExec,        // Program was re-exec'ed
213         eStopReasonPlanComplete,
214         eStopReasonThreadExiting,
215         eStopReasonInstrumentation
216     };
217
218     //----------------------------------------------------------------------
219     // Command Return Status Types
220     //----------------------------------------------------------------------
221     enum ReturnStatus
222     {
223         eReturnStatusInvalid,
224         eReturnStatusSuccessFinishNoResult,
225         eReturnStatusSuccessFinishResult,
226         eReturnStatusSuccessContinuingNoResult,
227         eReturnStatusSuccessContinuingResult,
228         eReturnStatusStarted,
229         eReturnStatusFailed,
230         eReturnStatusQuit
231     };
232
233
234     //----------------------------------------------------------------------
235     // The results of expression evaluation:
236     //----------------------------------------------------------------------
237     enum ExpressionResults
238     {
239         eExpressionCompleted = 0,
240         eExpressionSetupError,
241         eExpressionParseError,
242         eExpressionDiscarded,
243         eExpressionInterrupted,
244         eExpressionHitBreakpoint,
245         eExpressionTimedOut,
246         eExpressionResultUnavailable,
247         eExpressionStoppedForDebug
248     };
249
250     //----------------------------------------------------------------------
251     // Connection Status Types
252     //----------------------------------------------------------------------
253     enum ConnectionStatus
254     {
255         eConnectionStatusSuccess,         // Success
256         eConnectionStatusEndOfFile,       // End-of-file encountered
257         eConnectionStatusError,           // Check GetError() for details
258         eConnectionStatusTimedOut,        // Request timed out
259         eConnectionStatusNoConnection,    // No connection
260         eConnectionStatusLostConnection,  // Lost connection while connected to a valid connection
261         eConnectionStatusInterrupted      // Interrupted read
262     };
263
264     enum ErrorType
265     {
266         eErrorTypeInvalid,
267         eErrorTypeGeneric,      ///< Generic errors that can be any value.
268         eErrorTypeMachKernel,   ///< Mach kernel error codes.
269         eErrorTypePOSIX,        ///< POSIX error codes.
270         eErrorTypeExpression,   ///< These are from the ExpressionResults enum.
271         eErrorTypeWin32         ///< Standard Win32 error codes.
272     };
273
274
275     enum ValueType
276     {
277         eValueTypeInvalid           = 0,
278         eValueTypeVariableGlobal    = 1,    // globals variable
279         eValueTypeVariableStatic    = 2,    // static variable
280         eValueTypeVariableArgument  = 3,    // function argument variables
281         eValueTypeVariableLocal     = 4,    // function local variables
282         eValueTypeRegister          = 5,    // stack frame register value
283         eValueTypeRegisterSet       = 6,    // A collection of stack frame register values
284         eValueTypeConstResult       = 7     // constant result variables
285     };
286
287     //----------------------------------------------------------------------
288     // Token size/granularities for Input Readers
289     //----------------------------------------------------------------------
290
291     enum InputReaderGranularity
292     {
293         eInputReaderGranularityInvalid = 0,
294         eInputReaderGranularityByte,
295         eInputReaderGranularityWord,
296         eInputReaderGranularityLine,
297         eInputReaderGranularityAll
298     };
299
300     //------------------------------------------------------------------
301     /// These mask bits allow a common interface for queries that can
302     /// limit the amount of information that gets parsed to only the
303     /// information that is requested. These bits also can indicate what
304     /// actually did get resolved during query function calls.
305     ///
306     /// Each definition corresponds to a one of the member variables
307     /// in this class, and requests that that item be resolved, or
308     /// indicates that the member did get resolved.
309     //------------------------------------------------------------------
310     FLAGS_ENUM(SymbolContextItem)
311     {
312         eSymbolContextTarget     = (1u << 0), ///< Set when \a target is requested from a query, or was located in query results
313         eSymbolContextModule     = (1u << 1), ///< Set when \a module is requested from a query, or was located in query results
314         eSymbolContextCompUnit   = (1u << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
315         eSymbolContextFunction   = (1u << 3), ///< Set when \a function is requested from a query, or was located in query results
316         eSymbolContextBlock      = (1u << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
317         eSymbolContextLineEntry  = (1u << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
318         eSymbolContextSymbol     = (1u << 6), ///< Set when \a symbol is requested from a query, or was located in query results
319         eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u),  ///< Indicates to try and lookup everything up during a routine symbol context query.
320         eSymbolContextVariable   = (1u << 7)  ///< Set when \a global or static variable is requested from a query, or was located in query results.
321                                               ///< eSymbolContextVariable is potentially expensive to lookup so it isn't included in
322                                               ///< eSymbolContextEverything which stops it from being used during frame PC lookups and
323                                               ///< many other potential address to symbol context lookups.
324     };
325
326     FLAGS_ENUM(Permissions)
327     {
328         ePermissionsWritable    = (1u << 0),
329         ePermissionsReadable    = (1u << 1),
330         ePermissionsExecutable  = (1u << 2)
331     };
332
333     enum InputReaderAction
334     {
335         eInputReaderActivate,   // reader is newly pushed onto the reader stack 
336         eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something
337         eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off 
338         eInputReaderDeactivate, // another reader was pushed on the stack 
339         eInputReaderGotToken,   // reader got one of its tokens (granularity)
340         eInputReaderInterrupt,  // reader received an interrupt signal (probably from a control-c)
341         eInputReaderEndOfFile,  // reader received an EOF char (probably from a control-d)
342         eInputReaderDone        // reader was just popped off the stack and is done
343     };
344
345     FLAGS_ENUM(BreakpointEventType)
346     {
347         eBreakpointEventTypeInvalidType         = (1u << 0),
348         eBreakpointEventTypeAdded               = (1u << 1),
349         eBreakpointEventTypeRemoved             = (1u << 2),
350         eBreakpointEventTypeLocationsAdded      = (1u << 3),  // Locations added doesn't get sent when the breakpoint is created
351         eBreakpointEventTypeLocationsRemoved    = (1u << 4),
352         eBreakpointEventTypeLocationsResolved   = (1u << 5),
353         eBreakpointEventTypeEnabled             = (1u << 6),
354         eBreakpointEventTypeDisabled            = (1u << 7),
355         eBreakpointEventTypeCommandChanged      = (1u << 8),
356         eBreakpointEventTypeConditionChanged    = (1u << 9),
357         eBreakpointEventTypeIgnoreChanged       = (1u << 10),
358         eBreakpointEventTypeThreadChanged       = (1u << 11)
359     };
360
361     FLAGS_ENUM(WatchpointEventType)
362     {
363         eWatchpointEventTypeInvalidType         = (1u << 0),
364         eWatchpointEventTypeAdded               = (1u << 1),
365         eWatchpointEventTypeRemoved             = (1u << 2),
366         eWatchpointEventTypeEnabled             = (1u << 6),
367         eWatchpointEventTypeDisabled            = (1u << 7),
368         eWatchpointEventTypeCommandChanged      = (1u << 8),
369         eWatchpointEventTypeConditionChanged    = (1u << 9),
370         eWatchpointEventTypeIgnoreChanged       = (1u << 10),
371         eWatchpointEventTypeThreadChanged       = (1u << 11),
372         eWatchpointEventTypeTypeChanged         = (1u << 12)
373     };
374
375
376     //----------------------------------------------------------------------
377     /// Programming language type.
378     ///
379     /// These enumerations use the same language enumerations as the DWARF
380     /// specification for ease of use and consistency.
381     /// The enum -> string code is in LanguageRuntime.cpp, don't change this
382     /// table without updating that code as well.
383     //----------------------------------------------------------------------
384     enum LanguageType
385     {
386         eLanguageTypeUnknown         = 0x0000,   ///< Unknown or invalid language value.
387         eLanguageTypeC89             = 0x0001,   ///< ISO C:1989.
388         eLanguageTypeC               = 0x0002,   ///< Non-standardized C, such as K&R.
389         eLanguageTypeAda83           = 0x0003,   ///< ISO Ada:1983.
390         eLanguageTypeC_plus_plus     = 0x0004,   ///< ISO C++:1998.
391         eLanguageTypeCobol74         = 0x0005,   ///< ISO Cobol:1974.
392         eLanguageTypeCobol85         = 0x0006,   ///< ISO Cobol:1985.
393         eLanguageTypeFortran77       = 0x0007,   ///< ISO Fortran 77.
394         eLanguageTypeFortran90       = 0x0008,   ///< ISO Fortran 90.
395         eLanguageTypePascal83        = 0x0009,   ///< ISO Pascal:1983.
396         eLanguageTypeModula2         = 0x000a,   ///< ISO Modula-2:1996.
397         eLanguageTypeJava            = 0x000b,   ///< Java.
398         eLanguageTypeC99             = 0x000c,   ///< ISO C:1999.
399         eLanguageTypeAda95           = 0x000d,   ///< ISO Ada:1995.
400         eLanguageTypeFortran95       = 0x000e,   ///< ISO Fortran 95.
401         eLanguageTypePLI             = 0x000f,   ///< ANSI PL/I:1976.
402         eLanguageTypeObjC            = 0x0010,   ///< Objective-C.
403         eLanguageTypeObjC_plus_plus  = 0x0011,   ///< Objective-C++.
404         eLanguageTypeUPC             = 0x0012,   ///< Unified Parallel C.
405         eLanguageTypeD               = 0x0013,   ///< D.
406         eLanguageTypePython          = 0x0014,   ///< Python.
407         // NOTE: The below are DWARF5 constants, subject to change upon
408         // completion of the DWARF5 specification
409         eLanguageTypeOpenCL          = 0x0015,   ///< OpenCL.
410         eLanguageTypeGo              = 0x0016,   ///< Go.
411         eLanguageTypeModula3         = 0x0017,   ///< Modula 3.
412         eLanguageTypeHaskell         = 0x0018,   ///< Haskell.
413         eLanguageTypeC_plus_plus_03  = 0x0019,   ///< ISO C++:2003.
414         eLanguageTypeC_plus_plus_11  = 0x001a,   ///< ISO C++:2011.
415         eLanguageTypeOCaml           = 0x001b,   ///< OCaml.
416         eLanguageTypeRust            = 0x001c,   ///< Rust.
417         eLanguageTypeC11             = 0x001d,   ///< ISO C:2011.
418         eLanguageTypeSwift           = 0x001e,   ///< Swift.
419         eLanguageTypeJulia           = 0x001f,   ///< Julia.
420         eLanguageTypeDylan           = 0x0020,   ///< Dylan.
421         eLanguageTypeC_plus_plus_14  = 0x0021,   ///< ISO C++:2014.
422         eLanguageTypeFortran03       = 0x0022,   ///< ISO Fortran 2003.
423         eLanguageTypeFortran08       = 0x0023,   ///< ISO Fortran 2008.
424         // Vendor Extensions
425         // Note: Language::GetNameForLanguageType
426         // assumes these can be used as indexes into array language_names, and
427         // Language::SetLanguageFromCString and Language::AsCString
428         // assume these can be used as indexes into array g_languages.
429         eLanguageTypeMipsAssembler   = 0x0024,   ///< Mips_Assembler.
430         eLanguageTypeExtRenderScript = 0x0025,   ///< RenderScript.
431         eNumLanguageTypes
432     };
433     
434     enum InstrumentationRuntimeType
435     {
436         eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
437         eNumInstrumentationRuntimeTypes
438     };
439
440     enum DynamicValueType
441     {
442         eNoDynamicValues = 0,
443         eDynamicCanRunTarget    = 1,
444         eDynamicDontRunTarget   = 2
445     };
446     
447     enum AccessType
448     {
449         eAccessNone,
450         eAccessPublic,
451         eAccessPrivate,
452         eAccessProtected,
453         eAccessPackage
454     };
455
456    enum CommandArgumentType
457     {
458         eArgTypeAddress = 0,
459         eArgTypeAddressOrExpression,
460         eArgTypeAliasName,
461         eArgTypeAliasOptions,
462         eArgTypeArchitecture,
463         eArgTypeBoolean,
464         eArgTypeBreakpointID,
465         eArgTypeBreakpointIDRange,
466         eArgTypeBreakpointName,
467         eArgTypeByteSize,
468         eArgTypeClassName,
469         eArgTypeCommandName,
470         eArgTypeCount,
471         eArgTypeDescriptionVerbosity,
472         eArgTypeDirectoryName,
473         eArgTypeDisassemblyFlavor,
474         eArgTypeEndAddress,
475         eArgTypeExpression,
476         eArgTypeExpressionPath,
477         eArgTypeExprFormat,
478         eArgTypeFilename,
479         eArgTypeFormat,
480         eArgTypeFrameIndex,
481         eArgTypeFullName,
482         eArgTypeFunctionName,
483         eArgTypeFunctionOrSymbol,
484         eArgTypeGDBFormat,
485         eArgTypeHelpText,
486         eArgTypeIndex,
487         eArgTypeLanguage,
488         eArgTypeLineNum,
489         eArgTypeLogCategory,
490         eArgTypeLogChannel,
491         eArgTypeMethod,
492         eArgTypeName,
493         eArgTypeNewPathPrefix,
494         eArgTypeNumLines,
495         eArgTypeNumberPerLine,
496         eArgTypeOffset,
497         eArgTypeOldPathPrefix,
498         eArgTypeOneLiner,
499         eArgTypePath,
500         eArgTypePermissionsNumber,
501         eArgTypePermissionsString,
502         eArgTypePid,
503         eArgTypePlugin,
504         eArgTypeProcessName,
505         eArgTypePythonClass,
506         eArgTypePythonFunction,
507         eArgTypePythonScript,
508         eArgTypeQueueName,
509         eArgTypeRegisterName,
510         eArgTypeRegularExpression,
511         eArgTypeRunArgs,
512         eArgTypeRunMode,
513         eArgTypeScriptedCommandSynchronicity,
514         eArgTypeScriptLang,
515         eArgTypeSearchWord,
516         eArgTypeSelector,
517         eArgTypeSettingIndex,
518         eArgTypeSettingKey,
519         eArgTypeSettingPrefix,
520         eArgTypeSettingVariableName,
521         eArgTypeShlibName,
522         eArgTypeSourceFile,
523         eArgTypeSortOrder,
524         eArgTypeStartAddress,
525         eArgTypeSummaryString,
526         eArgTypeSymbol,
527         eArgTypeThreadID,
528         eArgTypeThreadIndex,
529         eArgTypeThreadName,
530         eArgTypeTypeName,
531         eArgTypeUnsignedInteger,
532         eArgTypeUnixSignal,
533         eArgTypeVarName,
534         eArgTypeValue,
535         eArgTypeWidth,
536         eArgTypeNone,
537         eArgTypePlatform,
538         eArgTypeWatchpointID,
539         eArgTypeWatchpointIDRange,
540         eArgTypeWatchType,
541         eArgTypeLastArg  // Always keep this entry as the last entry in this enumeration!!
542     };
543
544     //----------------------------------------------------------------------
545     // Symbol types
546     //----------------------------------------------------------------------
547     enum SymbolType
548     {
549         eSymbolTypeAny = 0,
550         eSymbolTypeInvalid = 0,
551         eSymbolTypeAbsolute,
552         eSymbolTypeCode,
553         eSymbolTypeResolver,
554         eSymbolTypeData,
555         eSymbolTypeTrampoline,
556         eSymbolTypeRuntime,
557         eSymbolTypeException,
558         eSymbolTypeSourceFile,
559         eSymbolTypeHeaderFile,
560         eSymbolTypeObjectFile,
561         eSymbolTypeCommonBlock,
562         eSymbolTypeBlock,
563         eSymbolTypeLocal,
564         eSymbolTypeParam,
565         eSymbolTypeVariable,
566         eSymbolTypeVariableType,
567         eSymbolTypeLineEntry,
568         eSymbolTypeLineHeader,
569         eSymbolTypeScopeBegin,
570         eSymbolTypeScopeEnd,
571         eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
572         eSymbolTypeCompiler,
573         eSymbolTypeInstrumentation,
574         eSymbolTypeUndefined,
575         eSymbolTypeObjCClass,
576         eSymbolTypeObjCMetaClass,
577         eSymbolTypeObjCIVar,
578         eSymbolTypeReExported
579     };
580     
581     enum SectionType
582     {
583         eSectionTypeInvalid,
584         eSectionTypeCode,
585         eSectionTypeContainer,              // The section contains child sections
586         eSectionTypeData,
587         eSectionTypeDataCString,            // Inlined C string data
588         eSectionTypeDataCStringPointers,    // Pointers to C string data
589         eSectionTypeDataSymbolAddress,      // Address of a symbol in the symbol table
590         eSectionTypeData4,
591         eSectionTypeData8,
592         eSectionTypeData16,
593         eSectionTypeDataPointers,
594         eSectionTypeDebug,
595         eSectionTypeZeroFill,
596         eSectionTypeDataObjCMessageRefs,    // Pointer to function pointer + selector
597         eSectionTypeDataObjCCFStrings,      // Objective C const CFString/NSString objects
598         eSectionTypeDWARFDebugAbbrev,
599         eSectionTypeDWARFDebugAddr,
600         eSectionTypeDWARFDebugAranges,
601         eSectionTypeDWARFDebugFrame,
602         eSectionTypeDWARFDebugInfo,
603         eSectionTypeDWARFDebugLine,
604         eSectionTypeDWARFDebugLoc,
605         eSectionTypeDWARFDebugMacInfo,
606         eSectionTypeDWARFDebugMacro,
607         eSectionTypeDWARFDebugPubNames,
608         eSectionTypeDWARFDebugPubTypes,
609         eSectionTypeDWARFDebugRanges,
610         eSectionTypeDWARFDebugStr,
611         eSectionTypeDWARFDebugStrOffsets,
612         eSectionTypeDWARFAppleNames,
613         eSectionTypeDWARFAppleTypes,
614         eSectionTypeDWARFAppleNamespaces,
615         eSectionTypeDWARFAppleObjC,
616         eSectionTypeELFSymbolTable,       // Elf SHT_SYMTAB section
617         eSectionTypeELFDynamicSymbols,    // Elf SHT_DYNSYM section
618         eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
619         eSectionTypeELFDynamicLinkInfo,   // Elf SHT_DYNAMIC section
620         eSectionTypeEHFrame,
621         eSectionTypeARMexidx,
622         eSectionTypeARMextab,
623         eSectionTypeCompactUnwind,        // compact unwind section in Mach-O, __TEXT,__unwind_info
624         eSectionTypeGoSymtab,
625         eSectionTypeOther
626     };
627
628     FLAGS_ENUM(EmulateInstructionOptions)
629     {
630         eEmulateInstructionOptionNone               = (0u),
631         eEmulateInstructionOptionAutoAdvancePC      = (1u << 0),
632         eEmulateInstructionOptionIgnoreConditions   = (1u << 1)
633     };
634
635     FLAGS_ENUM(FunctionNameType)
636     {
637         eFunctionNameTypeNone       = 0u,
638         eFunctionNameTypeAuto       = (1u << 1),    // Automatically figure out which FunctionNameType
639                                                     // bits to set based on the function name.
640         eFunctionNameTypeFull       = (1u << 2),    // The function name.
641                                                     // For C this is the same as just the name of the function
642                                                     // For C++ this is the mangled or demangled version of the mangled name.
643                                                     // For ObjC this is the full function signature with the + or
644                                                     // - and the square brackets and the class and selector
645         eFunctionNameTypeBase       = (1u << 3),    // The function name only, no namespaces or arguments and no class 
646                                                     // methods or selectors will be searched.
647         eFunctionNameTypeMethod     = (1u << 4),    // Find function by method name (C++) with no namespace or arguments
648         eFunctionNameTypeSelector   = (1u << 5),    // Find function by selector name (ObjC) names
649         eFunctionNameTypeAny        = eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
650     };
651     
652     
653     //----------------------------------------------------------------------
654     // Basic types enumeration for the public API SBType::GetBasicType()
655     //----------------------------------------------------------------------
656     enum BasicType
657     {
658                 eBasicTypeInvalid = 0,
659         eBasicTypeVoid = 1,
660         eBasicTypeChar,
661         eBasicTypeSignedChar,
662         eBasicTypeUnsignedChar,
663         eBasicTypeWChar,
664         eBasicTypeSignedWChar,
665         eBasicTypeUnsignedWChar,
666         eBasicTypeChar16,
667         eBasicTypeChar32,
668         eBasicTypeShort,
669         eBasicTypeUnsignedShort,
670         eBasicTypeInt,
671         eBasicTypeUnsignedInt,
672         eBasicTypeLong,
673         eBasicTypeUnsignedLong,
674         eBasicTypeLongLong,
675         eBasicTypeUnsignedLongLong,
676         eBasicTypeInt128,
677         eBasicTypeUnsignedInt128,
678         eBasicTypeBool,
679         eBasicTypeHalf,
680         eBasicTypeFloat,
681         eBasicTypeDouble,
682         eBasicTypeLongDouble,
683         eBasicTypeFloatComplex,
684         eBasicTypeDoubleComplex,
685         eBasicTypeLongDoubleComplex,
686         eBasicTypeObjCID,
687         eBasicTypeObjCClass,
688         eBasicTypeObjCSel,
689         eBasicTypeNullPtr,
690         eBasicTypeOther
691     };
692
693     FLAGS_ENUM(TypeClass)
694     {
695         eTypeClassInvalid           = (0u),
696         eTypeClassArray             = (1u << 0),
697         eTypeClassBlockPointer      = (1u << 1),
698         eTypeClassBuiltin           = (1u << 2),
699         eTypeClassClass             = (1u << 3),
700         eTypeClassComplexFloat      = (1u << 4),
701         eTypeClassComplexInteger    = (1u << 5),
702         eTypeClassEnumeration       = (1u << 6),
703         eTypeClassFunction          = (1u << 7),
704         eTypeClassMemberPointer     = (1u << 8),
705         eTypeClassObjCObject        = (1u << 9),
706         eTypeClassObjCInterface     = (1u << 10),
707         eTypeClassObjCObjectPointer = (1u << 11),
708         eTypeClassPointer           = (1u << 12),
709         eTypeClassReference         = (1u << 13),
710         eTypeClassStruct            = (1u << 14),
711         eTypeClassTypedef           = (1u << 15),
712         eTypeClassUnion             = (1u << 16),
713         eTypeClassVector            = (1u << 17),
714         // Define the last type class as the MSBit of a 32 bit value
715         eTypeClassOther             = (1u << 31),
716         // Define a mask that can be used for any type when finding types
717         eTypeClassAny               = (0xffffffffu)
718     };
719
720     enum TemplateArgumentKind
721     {
722         eTemplateArgumentKindNull = 0,
723         eTemplateArgumentKindType,
724         eTemplateArgumentKindDeclaration,
725         eTemplateArgumentKindIntegral,
726         eTemplateArgumentKindTemplate,
727         eTemplateArgumentKindTemplateExpansion,
728         eTemplateArgumentKindExpression,
729         eTemplateArgumentKindPack
730
731     };
732
733     //----------------------------------------------------------------------
734     // Options that can be set for a formatter to alter its behavior
735     // Not all of these are applicable to all formatter types
736     //----------------------------------------------------------------------
737     FLAGS_ENUM(TypeOptions)
738     {
739         eTypeOptionNone                = (0u),
740         eTypeOptionCascade             = (1u << 0),
741         eTypeOptionSkipPointers        = (1u << 1),
742         eTypeOptionSkipReferences      = (1u << 2),
743         eTypeOptionHideChildren        = (1u << 3),
744         eTypeOptionHideValue           = (1u << 4),
745         eTypeOptionShowOneLiner        = (1u << 5),
746         eTypeOptionHideNames           = (1u << 6),
747         eTypeOptionNonCacheable        = (1u << 7),
748         eTypeOptionHideEmptyAggregates = (1u << 8)
749     };
750
751    //----------------------------------------------------------------------
752    // This is the return value for frame comparisons.  If you are comparing frame A to frame B
753    // the following cases arise:
754    // 1) When frame A pushes frame B (or a frame that ends up pushing B) A is Older than B.
755    // 2) When frame A pushed frame B (or if frame A is on the stack but B is not) A is Younger than B
756    // 3) When frame A and frame B have the same StackID, they are Equal.
757    // 4) When frame A and frame B have the same immediate parent frame, but are not equal, the comparision yields
758    //    SameParent.
759    // 5) If the two frames are on different threads or processes the comparision is Invalid
760    // 6) If for some reason we can't figure out what went on, we return Unknown.
761    //----------------------------------------------------------------------
762    enum FrameComparison
763    {
764        eFrameCompareInvalid,
765        eFrameCompareUnknown,
766        eFrameCompareEqual,
767        eFrameCompareSameParent,
768        eFrameCompareYounger,
769        eFrameCompareOlder
770    };
771    
772     //----------------------------------------------------------------------
773     // Address Class
774     //
775     // A way of classifying an address used for disassembling and setting 
776     // breakpoints. Many object files can track exactly what parts of their
777     // object files are code, data and other information. This is of course
778     // above and beyond just looking at the section types. For example, code
779     // might contain PC relative data and the object file might be able to
780     // tell us that an address in code is data.
781     //----------------------------------------------------------------------
782     enum AddressClass
783     {
784         eAddressClassInvalid,
785         eAddressClassUnknown,
786         eAddressClassCode,
787         eAddressClassCodeAlternateISA,
788         eAddressClassData,
789         eAddressClassDebug,
790         eAddressClassRuntime
791     };
792
793     //----------------------------------------------------------------------
794     // File Permissions
795     //
796     // Designed to mimic the unix file permission bits so they can be
797     // used with functions that set 'mode_t' to certain values for
798     // permissions.
799     //----------------------------------------------------------------------
800     FLAGS_ENUM(FilePermissions)
801     {
802         eFilePermissionsUserRead        = (1u << 8),
803         eFilePermissionsUserWrite       = (1u << 7),
804         eFilePermissionsUserExecute     = (1u << 6),
805         eFilePermissionsGroupRead       = (1u << 5),
806         eFilePermissionsGroupWrite      = (1u << 4),
807         eFilePermissionsGroupExecute    = (1u << 3),
808         eFilePermissionsWorldRead       = (1u << 2),
809         eFilePermissionsWorldWrite      = (1u << 1),
810         eFilePermissionsWorldExecute    = (1u << 0),
811         
812         eFilePermissionsUserRW      = (eFilePermissionsUserRead    | eFilePermissionsUserWrite      | 0                             ),
813         eFileFilePermissionsUserRX  = (eFilePermissionsUserRead    | 0                              | eFilePermissionsUserExecute   ),
814         eFilePermissionsUserRWX     = (eFilePermissionsUserRead    | eFilePermissionsUserWrite      | eFilePermissionsUserExecute   ),
815             
816         eFilePermissionsGroupRW     = (eFilePermissionsGroupRead   | eFilePermissionsGroupWrite     | 0                             ),
817         eFilePermissionsGroupRX     = (eFilePermissionsGroupRead   | 0                              | eFilePermissionsGroupExecute  ),
818         eFilePermissionsGroupRWX    = (eFilePermissionsGroupRead   | eFilePermissionsGroupWrite     | eFilePermissionsGroupExecute  ),
819         
820         eFilePermissionsWorldRW     = (eFilePermissionsWorldRead   | eFilePermissionsWorldWrite     | 0                             ),
821         eFilePermissionsWorldRX     = (eFilePermissionsWorldRead   | 0                              | eFilePermissionsWorldExecute  ),
822         eFilePermissionsWorldRWX    = (eFilePermissionsWorldRead   | eFilePermissionsWorldWrite     | eFilePermissionsWorldExecute  ),
823         
824         eFilePermissionsEveryoneR   = (eFilePermissionsUserRead    | eFilePermissionsGroupRead      | eFilePermissionsWorldRead     ),
825         eFilePermissionsEveryoneW   = (eFilePermissionsUserWrite   | eFilePermissionsGroupWrite     | eFilePermissionsWorldWrite    ),
826         eFilePermissionsEveryoneX   = (eFilePermissionsUserExecute | eFilePermissionsGroupExecute   | eFilePermissionsWorldExecute  ),
827         
828         eFilePermissionsEveryoneRW  = (eFilePermissionsEveryoneR   | eFilePermissionsEveryoneW      | 0                             ),
829         eFilePermissionsEveryoneRX  = (eFilePermissionsEveryoneR   | 0                              | eFilePermissionsEveryoneX     ),
830         eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR   | eFilePermissionsEveryoneW      | eFilePermissionsEveryoneX     ),
831         eFilePermissionsFileDefault = eFilePermissionsUserRW,
832         eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
833     };
834
835     //----------------------------------------------------------------------
836     // Queue work item types
837     //
838     // The different types of work that can be enqueued on a libdispatch
839     // aka Grand Central Dispatch (GCD) queue.
840     //----------------------------------------------------------------------
841     enum QueueItemKind
842     {
843         eQueueItemKindUnknown = 0,
844         eQueueItemKindFunction,
845         eQueueItemKindBlock
846     };
847
848     //----------------------------------------------------------------------
849     // Queue type
850     // libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
851     // (executing on one thread) or concurrent (executing on multiple threads).
852     //----------------------------------------------------------------------
853     enum QueueKind
854     {
855         eQueueKindUnknown = 0,
856         eQueueKindSerial,
857         eQueueKindConcurrent
858     };
859     
860     //----------------------------------------------------------------------
861     // Expression Evaluation Stages
862     // These are the cancellable stages of expression evaluation, passed to the
863     // expression evaluation callback, so that you can interrupt expression
864     // evaluation at the various points in its lifecycle.
865     //----------------------------------------------------------------------
866     enum ExpressionEvaluationPhase
867     {
868         eExpressionEvaluationParse = 0,
869         eExpressionEvaluationIRGen,
870         eExpressionEvaluationExecution,
871         eExpressionEvaluationComplete
872     };
873     
874
875     //----------------------------------------------------------------------
876     // Watchpoint Kind
877     // Indicates what types of events cause the watchpoint to fire.
878     // Used by Native*Protocol-related classes.
879     //----------------------------------------------------------------------
880     FLAGS_ENUM(WatchpointKind)
881     {
882         eWatchpointKindRead = (1u << 0),
883         eWatchpointKindWrite = (1u << 1)
884     };
885
886     enum GdbSignal
887     {
888         eGdbSignalBadAccess      = 0x91,
889         eGdbSignalBadInstruction = 0x92,
890         eGdbSignalArithmetic     = 0x93,
891         eGdbSignalEmulation      = 0x94,
892         eGdbSignalSoftware       = 0x95,
893         eGdbSignalBreakpoint     = 0x96
894     };
895
896     //----------------------------------------------------------------------
897     // Used with SBHost::GetPath (lldb::PathType) to find files that are
898     // related to LLDB on the current host machine. Most files are relative
899     // to LLDB or are in known locations.
900     //----------------------------------------------------------------------
901     enum PathType
902     {
903         ePathTypeLLDBShlibDir,            // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists
904         ePathTypeSupportExecutableDir,    // Find LLDB support executable directory (debugserver, etc)
905         ePathTypeHeaderDir,               // Find LLDB header file directory
906         ePathTypePythonDir,               // Find Python modules (PYTHONPATH) directory
907         ePathTypeLLDBSystemPlugins,       // System plug-ins directory
908         ePathTypeLLDBUserPlugins,         // User plug-ins directory
909         ePathTypeLLDBTempSystemDir,       // The LLDB temp directory for this system that will be cleaned up on exit
910         ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system, NOT cleaned up on a process exit.
911         ePathTypeClangDir                 // Find path to Clang builtin headers
912     };
913     
914     //----------------------------------------------------------------------
915     // Kind of member function
916     // Used by the type system
917     //----------------------------------------------------------------------
918     enum MemberFunctionKind
919     {
920         eMemberFunctionKindUnknown = 0,     // Not sure what the type of this is
921         eMemberFunctionKindConstructor,     // A function used to create instances
922         eMemberFunctionKindDestructor,      // A function used to tear down existing instances
923         eMemberFunctionKindInstanceMethod,  // A function that applies to a specific instance
924         eMemberFunctionKindStaticMethod     // A function that applies to a type rather than any instance
925     };
926
927
928     //----------------------------------------------------------------------
929     // String matching algorithm used by SBTarget
930     //----------------------------------------------------------------------
931     enum MatchType
932     {
933         eMatchTypeNormal,
934         eMatchTypeRegex,
935         eMatchTypeStartsWith
936     };
937     
938     //----------------------------------------------------------------------
939     // Bitmask that describes details about a type
940     //----------------------------------------------------------------------
941     FLAGS_ENUM(TypeFlags)
942     {
943         eTypeHasChildren        = (1u <<  0),
944         eTypeHasValue           = (1u <<  1),
945         eTypeIsArray            = (1u <<  2),
946         eTypeIsBlock            = (1u <<  3),
947         eTypeIsBuiltIn          = (1u <<  4),
948         eTypeIsClass            = (1u <<  5),
949         eTypeIsCPlusPlus        = (1u <<  6),
950         eTypeIsEnumeration      = (1u <<  7),
951         eTypeIsFuncPrototype    = (1u <<  8),
952         eTypeIsMember           = (1u <<  9),
953         eTypeIsObjC             = (1u << 10),
954         eTypeIsPointer          = (1u << 11),
955         eTypeIsReference        = (1u << 12),
956         eTypeIsStructUnion      = (1u << 13),
957         eTypeIsTemplate         = (1u << 14),
958         eTypeIsTypedef          = (1u << 15),
959         eTypeIsVector           = (1u << 16),
960         eTypeIsScalar           = (1u << 17),
961         eTypeIsInteger          = (1u << 18),
962         eTypeIsFloat            = (1u << 19),
963         eTypeIsComplex          = (1u << 20),
964         eTypeIsSigned           = (1u << 21),
965         eTypeInstanceIsPointer  = (1u << 22)
966     };
967     
968     FLAGS_ENUM(CommandFlags)
969     {
970         //----------------------------------------------------------------------
971         // eCommandRequiresTarget
972         //
973         // Ensures a valid target is contained in m_exe_ctx prior to executing
974         // the command. If a target doesn't exist or is invalid, the command
975         // will fail and CommandObject::GetInvalidTargetDescription() will be
976         // returned as the error. CommandObject subclasses can override the
977         // virtual function for GetInvalidTargetDescription() to provide custom
978         // strings when needed.
979         //----------------------------------------------------------------------
980         eCommandRequiresTarget         = (1u << 0),
981         //----------------------------------------------------------------------
982         // eCommandRequiresProcess
983         //
984         // Ensures a valid process is contained in m_exe_ctx prior to executing
985         // the command. If a process doesn't exist or is invalid, the command
986         // will fail and CommandObject::GetInvalidProcessDescription() will be
987         // returned as the error. CommandObject subclasses can override the
988         // virtual function for GetInvalidProcessDescription() to provide custom
989         // strings when needed.
990         //----------------------------------------------------------------------
991         eCommandRequiresProcess        = (1u << 1),
992         //----------------------------------------------------------------------
993         // eCommandRequiresThread
994         //
995         // Ensures a valid thread is contained in m_exe_ctx prior to executing
996         // the command. If a thread doesn't exist or is invalid, the command
997         // will fail and CommandObject::GetInvalidThreadDescription() will be
998         // returned as the error. CommandObject subclasses can override the
999         // virtual function for GetInvalidThreadDescription() to provide custom
1000         // strings when needed.
1001         //----------------------------------------------------------------------
1002         eCommandRequiresThread         = (1u << 2),
1003         //----------------------------------------------------------------------
1004         // eCommandRequiresFrame
1005         //
1006         // Ensures a valid frame is contained in m_exe_ctx prior to executing
1007         // the command. If a frame doesn't exist or is invalid, the command
1008         // will fail and CommandObject::GetInvalidFrameDescription() will be
1009         // returned as the error. CommandObject subclasses can override the
1010         // virtual function for GetInvalidFrameDescription() to provide custom
1011         // strings when needed.
1012         //----------------------------------------------------------------------
1013         eCommandRequiresFrame          = (1u << 3),
1014         //----------------------------------------------------------------------
1015         // eCommandRequiresRegContext
1016         //
1017         // Ensures a valid register context (from the selected frame if there
1018         // is a frame in m_exe_ctx, or from the selected thread from m_exe_ctx)
1019         // is available from m_exe_ctx prior to executing the command. If a
1020         // target doesn't exist or is invalid, the command will fail and
1021         // CommandObject::GetInvalidRegContextDescription() will be returned as
1022         // the error. CommandObject subclasses can override the virtual function
1023         // for GetInvalidRegContextDescription() to provide custom strings when
1024         // needed.
1025         //----------------------------------------------------------------------
1026         eCommandRequiresRegContext     = (1u << 4),
1027         //----------------------------------------------------------------------
1028         // eCommandTryTargetAPILock
1029         //
1030         // Attempts to acquire the target lock if a target is selected in the
1031         // command interpreter. If the command object fails to acquire the API
1032         // lock, the command will fail with an appropriate error message.
1033         //----------------------------------------------------------------------
1034         eCommandTryTargetAPILock       = (1u << 5),
1035         //----------------------------------------------------------------------
1036         // eCommandProcessMustBeLaunched
1037         //
1038         // Verifies that there is a launched process in m_exe_ctx, if there
1039         // isn't, the command will fail with an appropriate error message.
1040         //----------------------------------------------------------------------
1041         eCommandProcessMustBeLaunched  = (1u << 6),
1042         //----------------------------------------------------------------------
1043         // eCommandProcessMustBePaused
1044         //
1045         // Verifies that there is a paused process in m_exe_ctx, if there
1046         // isn't, the command will fail with an appropriate error message.
1047         //----------------------------------------------------------------------
1048         eCommandProcessMustBePaused    = (1u << 7)
1049     };
1050     
1051     //----------------------------------------------------------------------
1052     // Whether a summary should cap how much data it returns to users or not
1053     //----------------------------------------------------------------------
1054     enum TypeSummaryCapping
1055     {
1056         eTypeSummaryCapped = true,
1057         eTypeSummaryUncapped = false
1058     };
1059
1060 } // namespace lldb
1061
1062 #endif  // LLDB_lldb_enumerations_h_