1//===-- lldb-enumerations.h -------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_LLDB_ENUMERATIONS_H
10#define LLDB_LLDB_ENUMERATIONS_H
11
12#include <cstdint>
13#include <type_traits>
14
15#ifndef SWIG
16// Macro to enable bitmask operations on an enum. Without this, Enum | Enum
17// gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar). If
18// you mark Enum with LLDB_MARK_AS_BITMASK_ENUM(Enum), however, you can simply
19// write Enum a = eFoo | eBar.
20// Unfortunately, swig<3.0 doesn't recognise the constexpr keyword, so remove
21// this entire block, as it is not necessary for swig processing.
22#define LLDB_MARK_AS_BITMASK_ENUM(Enum) \
23 constexpr Enum operator|(Enum a, Enum b) { \
24 return static_cast<Enum>( \
25 static_cast<std::underlying_type<Enum>::type>(a) | \
26 static_cast<std::underlying_type<Enum>::type>(b)); \
27 } \
28 constexpr Enum operator&(Enum a, Enum b) { \
29 return static_cast<Enum>( \
30 static_cast<std::underlying_type<Enum>::type>(a) & \
31 static_cast<std::underlying_type<Enum>::type>(b)); \
32 } \
33 constexpr Enum operator~(Enum a) { \
34 return static_cast<Enum>( \
35 ~static_cast<std::underlying_type<Enum>::type>(a)); \
36 } \
37 inline Enum &operator|=(Enum &a, Enum b) { \
38 a = a | b; \
39 return a; \
40 } \
41 inline Enum &operator&=(Enum &a, Enum b) { \
42 a = a & b; \
43 return a; \
44 }
45#else
46#define LLDB_MARK_AS_BITMASK_ENUM(Enum)
47#endif
48
49#ifndef SWIG
50// With MSVC, the default type of an enum is always signed, even if one of the
51// enumerator values is too large to fit into a signed integer but would
52// otherwise fit into an unsigned integer. As a result of this, all of LLDB's
53// flag-style enumerations that specify something like eValueFoo = 1u << 31
54// result in negative values. This usually just results in a benign warning,
55// but in a few places we actually do comparisons on the enum values, which
56// would cause a real bug. Furthermore, there's no way to silence only this
57// warning, as it's part of -Wmicrosoft which also catches a whole slew of
58// other useful issues.
59//
60// To make matters worse, early versions of SWIG don't recognize the syntax of
61// specifying the underlying type of an enum (and Python doesn't care anyway)
62// so we need a way to specify the underlying type when the enum is being used
63// from C++ code, but just use a regular enum when swig is pre-processing.
64#define FLAGS_ENUM(Name) enum Name : unsigned
65#define FLAGS_ANONYMOUS_ENUM() enum : unsigned
66#else
67#define FLAGS_ENUM(Name) enum Name
68#define FLAGS_ANONYMOUS_ENUM() enum
69#endif
70
71namespace lldb {
72
73/// Process and Thread States.
74enum StateType {
75 eStateInvalid = 0,
76 eStateUnloaded, ///< Process is object is valid, but not currently loaded
77 eStateConnected, ///< Process is connected to remote debug services, but not
78 /// launched or attached to anything yet
79 eStateAttaching, ///< Process is currently trying to attach
80 eStateLaunching, ///< Process is in the process of launching
81 // The state changes eStateAttaching and eStateLaunching are both sent while
82 // the private state thread is either not yet started or paused. For that
83 // reason, they should only be signaled as public state changes, and not
84 // private state changes.
85 eStateStopped, ///< Process or thread is stopped and can be examined.
86 eStateRunning, ///< Process or thread is running and can't be examined.
87 eStateStepping, ///< Process or thread is in the process of stepping and can
88 /// not be examined.
89 eStateCrashed, ///< Process or thread has crashed and can be examined.
90 eStateDetached, ///< Process has been detached and can't be examined.
91 eStateExited, ///< Process has exited and can't be examined.
92 eStateSuspended, ///< Process or thread is in a suspended state as far
93 ///< as the debugger is concerned while other processes
94 ///< or threads get the chance to run.
95 kLastStateType = eStateSuspended
96};
97
98/// Launch Flags.
99FLAGS_ENUM(LaunchFlags){
100 eLaunchFlagNone = 0u,
101 eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling
102 /// process into a new process
103 eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to
104 /// allow the process to be debugged
105 eLaunchFlagStopAtEntry = (1u
106 << 2), ///< Stop at the program entry point
107 /// instead of auto-continuing when
108 /// launching or attaching at entry point
109 eLaunchFlagDisableASLR =
110 (1u << 3), ///< Disable Address Space Layout Randomization
111 eLaunchFlagDisableSTDIO =
112 (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
113 eLaunchFlagLaunchInTTY =
114 (1u << 5), ///< Launch the process in a new TTY if supported by the host
115 eLaunchFlagLaunchInShell =
116 (1u << 6), ///< Launch the process inside a shell to get shell expansion
117 eLaunchFlagLaunchInSeparateProcessGroup =
118 (1u << 7), ///< Launch the process in a separate process group
119 ///< If you are going to hand the process off (e.g. to
120 ///< debugserver)
121 eLaunchFlagDontSetExitStatus = (1u << 8),
122 ///< set this flag so lldb & the handee don't race to set its exit status.
123 eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub
124 ///< should detach rather than killing
125 ///< the debugee
126 ///< if it loses connection with lldb.
127 eLaunchFlagShellExpandArguments =
128 (1u << 10), ///< Perform shell-style argument expansion
129 eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
130 eLaunchFlagInheritTCCFromParent =
131 (1u << 12), ///< Don't make the inferior responsible for its own TCC
132 ///< permissions but instead inherit them from its parent.
133};
134
135/// Thread Run Modes.
136enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping };
137
138/// Execution directions
139enum RunDirection { eRunForward, eRunReverse };
140
141/// Byte ordering definitions.
142enum ByteOrder {
143 eByteOrderInvalid = 0,
144 eByteOrderBig = 1,
145 eByteOrderPDP = 2,
146 eByteOrderLittle = 4
147};
148
149/// Register encoding definitions.
150enum Encoding {
151 eEncodingInvalid = 0,
152 eEncodingUint, ///< unsigned integer
153 eEncodingSint, ///< signed integer
154 eEncodingIEEE754, ///< float
155 eEncodingVector ///< vector registers
156};
157
158/// Display format definitions.
159enum Format {
160 eFormatDefault = 0,
161 eFormatInvalid = 0,
162 eFormatBoolean,
163 eFormatBinary,
164 eFormatBytes,
165 eFormatBytesWithASCII,
166 eFormatChar,
167 eFormatCharPrintable, ///< Only printable characters, '.' if not printable
168 eFormatComplex, ///< Floating point complex type
169 eFormatComplexFloat = eFormatComplex,
170 eFormatCString, ///< NULL terminated C strings
171 eFormatDecimal,
172 eFormatEnum,
173 eFormatHex,
174 eFormatHexUppercase,
175 eFormatFloat,
176 eFormatOctal,
177 eFormatOSType, ///< OS character codes encoded into an integer 'PICT' 'text'
178 ///< etc...
179 eFormatUnicode16,
180 eFormatUnicode32,
181 eFormatUnsigned,
182 eFormatPointer,
183 eFormatVectorOfChar,
184 eFormatVectorOfSInt8,
185 eFormatVectorOfUInt8,
186 eFormatVectorOfSInt16,
187 eFormatVectorOfUInt16,
188 eFormatVectorOfSInt32,
189 eFormatVectorOfUInt32,
190 eFormatVectorOfSInt64,
191 eFormatVectorOfUInt64,
192 eFormatVectorOfFloat16,
193 eFormatVectorOfFloat32,
194 eFormatVectorOfFloat64,
195 eFormatVectorOfUInt128,
196 eFormatComplexInteger, ///< Integer complex type
197 eFormatCharArray, ///< Print characters with no single quotes, used for
198 ///< character arrays that can contain non printable
199 ///< characters
200 eFormatAddressInfo, ///< Describe what an address points to (func + offset
201 ///< with file/line, symbol + offset, data, etc)
202 eFormatHexFloat, ///< ISO C99 hex float string
203 eFormatInstruction, ///< Disassemble an opcode
204 eFormatVoid, ///< Do not print this
205 eFormatUnicode8,
206 kNumFormats
207};
208
209/// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
210/// calls.
211enum DescriptionLevel {
212 eDescriptionLevelBrief = 0,
213 eDescriptionLevelFull,
214 eDescriptionLevelVerbose,
215 eDescriptionLevelInitial,
216 kNumDescriptionLevels
217};
218
219/// Script interpreter types.
220enum ScriptLanguage {
221 eScriptLanguageNone = 0,
222 eScriptLanguagePython,
223 eScriptLanguageLua,
224 eScriptLanguageUnknown,
225 eScriptLanguageDefault = eScriptLanguagePython
226};
227
228/// Register numbering types.
229// See RegisterContext::ConvertRegisterKindToRegisterNumber to convert any of
230// these to the lldb internal register numbering scheme (eRegisterKindLLDB).
231enum RegisterKind {
232 eRegisterKindEHFrame = 0, ///< the register numbers seen in eh_frame
233 eRegisterKindDWARF, ///< the register numbers seen DWARF
234 eRegisterKindGeneric, ///< insn ptr reg, stack ptr reg, etc not specific to
235 ///< any particular target
236 eRegisterKindProcessPlugin, ///< num used by the process plugin - e.g. by the
237 ///< remote gdb-protocol stub program
238 eRegisterKindLLDB, ///< lldb's internal register numbers
239 kNumRegisterKinds
240};
241
242/// Thread stop reasons.
243enum StopReason {
244 eStopReasonInvalid = 0,
245 eStopReasonNone,
246 eStopReasonTrace,
247 eStopReasonBreakpoint,
248 eStopReasonWatchpoint,
249 eStopReasonSignal,
250 eStopReasonException,
251 eStopReasonExec, ///< Program was re-exec'ed
252 eStopReasonPlanComplete,
253 eStopReasonThreadExiting,
254 eStopReasonInstrumentation,
255 eStopReasonProcessorTrace,
256 eStopReasonFork,
257 eStopReasonVFork,
258 eStopReasonVForkDone,
259 eStopReasonInterrupt, ///< Thread requested interrupt
260 // Indicates that execution stopped because the debugger backend relies
261 // on recorded data and we reached the end of that data.
262 eStopReasonHistoryBoundary,
263};
264
265/// Command Return Status Types.
266enum ReturnStatus {
267 eReturnStatusInvalid,
268 eReturnStatusSuccessFinishNoResult,
269 eReturnStatusSuccessFinishResult,
270 eReturnStatusSuccessContinuingNoResult,
271 eReturnStatusSuccessContinuingResult,
272 eReturnStatusStarted,
273 eReturnStatusFailed,
274 eReturnStatusQuit
275};
276
277/// The results of expression evaluation.
278enum ExpressionResults {
279 eExpressionCompleted = 0,
280 eExpressionSetupError,
281 eExpressionParseError,
282 eExpressionDiscarded,
283 eExpressionInterrupted,
284 eExpressionHitBreakpoint,
285 eExpressionTimedOut,
286 eExpressionResultUnavailable,
287 eExpressionStoppedForDebug,
288 eExpressionThreadVanished
289};
290
291enum SearchDepth {
292 eSearchDepthInvalid = 0,
293 eSearchDepthTarget,
294 eSearchDepthModule,
295 eSearchDepthCompUnit,
296 eSearchDepthFunction,
297 eSearchDepthBlock,
298 eSearchDepthAddress,
299 kLastSearchDepthKind = eSearchDepthAddress
300};
301
302/// Connection Status Types.
303enum ConnectionStatus {
304 eConnectionStatusSuccess, ///< Success
305 eConnectionStatusEndOfFile, ///< End-of-file encountered
306 eConnectionStatusError, ///< Check GetError() for details
307 eConnectionStatusTimedOut, ///< Request timed out
308 eConnectionStatusNoConnection, ///< No connection
309 eConnectionStatusLostConnection, ///< Lost connection while connected to a
310 ///< valid connection
311 eConnectionStatusInterrupted ///< Interrupted read
312};
313
314enum ErrorType {
315 eErrorTypeInvalid,
316 eErrorTypeGeneric, ///< Generic errors that can be any value.
317 eErrorTypeMachKernel, ///< Mach kernel error codes.
318 eErrorTypePOSIX, ///< POSIX error codes.
319 eErrorTypeExpression, ///< These are from the ExpressionResults enum.
320 eErrorTypeWin32 ///< Standard Win32 error codes.
321};
322
323enum ValueType {
324 eValueTypeInvalid = 0,
325 eValueTypeVariableGlobal = 1, ///< globals variable
326 eValueTypeVariableStatic = 2, ///< static variable
327 eValueTypeVariableArgument = 3, ///< function argument variables
328 eValueTypeVariableLocal = 4, ///< function local variables
329 eValueTypeRegister = 5, ///< stack frame register value
330 eValueTypeRegisterSet = 6, ///< A collection of stack frame register values
331 eValueTypeConstResult = 7, ///< constant result variables
332 eValueTypeVariableThreadLocal = 8, ///< thread local storage variable
333 eValueTypeVTable = 9, ///< virtual function table
334 eValueTypeVTableEntry = 10, ///< function pointer in virtual function table
335};
336
337/// Token size/granularities for Input Readers.
338
339enum InputReaderGranularity {
340 eInputReaderGranularityInvalid = 0,
341 eInputReaderGranularityByte,
342 eInputReaderGranularityWord,
343 eInputReaderGranularityLine,
344 eInputReaderGranularityAll
345};
346
347/// These mask bits allow a common interface for queries that can
348/// limit the amount of information that gets parsed to only the
349/// information that is requested. These bits also can indicate what
350/// actually did get resolved during query function calls.
351///
352/// Each definition corresponds to a one of the member variables
353/// in this class, and requests that that item be resolved, or
354/// indicates that the member did get resolved.
355FLAGS_ENUM(SymbolContextItem){
356 /// Set when \a target is requested from a query, or was located
357 /// in query results
358 eSymbolContextTarget = (1u << 0),
359 /// Set when \a module is requested from a query, or was located
360 /// in query results
361 eSymbolContextModule = (1u << 1),
362 /// Set when \a comp_unit is requested from a query, or was
363 /// located in query results
364 eSymbolContextCompUnit = (1u << 2),
365 /// Set when \a function is requested from a query, or was located
366 /// in query results
367 eSymbolContextFunction = (1u << 3),
368 /// Set when the deepest \a block is requested from a query, or
369 /// was located in query results
370 eSymbolContextBlock = (1u << 4),
371 /// Set when \a line_entry is requested from a query, or was
372 /// located in query results
373 eSymbolContextLineEntry = (1u << 5),
374 /// Set when \a symbol is requested from a query, or was located
375 /// in query results
376 eSymbolContextSymbol = (1u << 6),
377 /// Indicates to try and lookup everything up during a routine
378 /// symbol context query.
379 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u),
380 /// Set when \a global or static variable is requested from a
381 /// query, or was located in query results.
382 /// eSymbolContextVariable is potentially expensive to lookup so
383 /// it isn't included in eSymbolContextEverything which stops it
384 /// from being used during frame PC lookups and many other
385 /// potential address to symbol context lookups.
386 eSymbolContextVariable = (1u << 7),
387
388 // Keep this last and up-to-date for what the last enum value is.
389 eSymbolContextLastItem = eSymbolContextVariable,
390};
391LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem)
392
393FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0),
394 ePermissionsReadable = (1u << 1),
395 ePermissionsExecutable = (1u << 2)};
396LLDB_MARK_AS_BITMASK_ENUM(Permissions)
397
398enum InputReaderAction {
399 eInputReaderActivate, ///< reader is newly pushed onto the reader stack
400 eInputReaderAsynchronousOutputWritten, ///< an async output event occurred;
401 ///< the reader may want to do
402 ///< something
403 eInputReaderReactivate, ///< reader is on top of the stack again after another
404 ///< reader was popped off
405 eInputReaderDeactivate, ///< another reader was pushed on the stack
406 eInputReaderGotToken, ///< reader got one of its tokens (granularity)
407 eInputReaderInterrupt, ///< reader received an interrupt signal (probably from
408 ///< a control-c)
409 eInputReaderEndOfFile, ///< reader received an EOF char (probably from a
410 ///< control-d)
411 eInputReaderDone ///< reader was just popped off the stack and is done
412};
413
414FLAGS_ENUM(BreakpointEventType){
415 eBreakpointEventTypeInvalidType = (1u << 0),
416 eBreakpointEventTypeAdded = (1u << 1),
417 eBreakpointEventTypeRemoved = (1u << 2),
418 eBreakpointEventTypeLocationsAdded = (1u << 3), ///< Locations added doesn't
419 ///< get sent when the
420 ///< breakpoint is created
421 eBreakpointEventTypeLocationsRemoved = (1u << 4),
422 eBreakpointEventTypeLocationsResolved = (1u << 5),
423 eBreakpointEventTypeEnabled = (1u << 6),
424 eBreakpointEventTypeDisabled = (1u << 7),
425 eBreakpointEventTypeCommandChanged = (1u << 8),
426 eBreakpointEventTypeConditionChanged = (1u << 9),
427 eBreakpointEventTypeIgnoreChanged = (1u << 10),
428 eBreakpointEventTypeThreadChanged = (1u << 11),
429 eBreakpointEventTypeAutoContinueChanged = (1u << 12)};
430
431FLAGS_ENUM(WatchpointEventType){
432 eWatchpointEventTypeInvalidType = (1u << 0),
433 eWatchpointEventTypeAdded = (1u << 1),
434 eWatchpointEventTypeRemoved = (1u << 2),
435 eWatchpointEventTypeEnabled = (1u << 6),
436 eWatchpointEventTypeDisabled = (1u << 7),
437 eWatchpointEventTypeCommandChanged = (1u << 8),
438 eWatchpointEventTypeConditionChanged = (1u << 9),
439 eWatchpointEventTypeIgnoreChanged = (1u << 10),
440 eWatchpointEventTypeThreadChanged = (1u << 11),
441 eWatchpointEventTypeTypeChanged = (1u << 12)};
442
443enum WatchpointWriteType {
444 /// Don't stop when the watched memory region is written to.
445 eWatchpointWriteTypeDisabled,
446 /// Stop on any write access to the memory region, even if
447 /// the value doesn't change. On some architectures, a write
448 /// near the memory region may be falsely reported as a match,
449 /// and notify this spurious stop as a watchpoint trap.
450 eWatchpointWriteTypeAlways,
451 /// Stop on a write to the memory region that changes its value.
452 /// This is most likely the behavior a user expects, and is the
453 /// behavior in gdb. lldb can silently ignore writes near the
454 /// watched memory region that are reported as accesses to lldb.
455 eWatchpointWriteTypeOnModify
456};
457
458/// Programming language type.
459///
460/// These enumerations use the same language enumerations as the DWARF
461/// specification for ease of use and consistency.
462/// The enum -> string code is in Language.cpp, don't change this
463/// table without updating that code as well.
464///
465/// This datatype is used in SBExpressionOptions::SetLanguage() which
466/// makes this type API. Do not change its underlying storage type!
467enum LanguageType {
468 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
469 eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
470 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
471 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
472 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
473 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
474 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
475 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
476 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
477 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
478 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
479 eLanguageTypeJava = 0x000b, ///< Java.
480 eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
481 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
482 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
483 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
484 eLanguageTypeObjC = 0x0010, ///< Objective-C.
485 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
486 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
487 eLanguageTypeD = 0x0013, ///< D.
488 eLanguageTypePython = 0x0014, ///< Python.
489 // NOTE: The below are DWARF5 constants, subject to change upon
490 // completion of the DWARF5 specification
491 eLanguageTypeOpenCL = 0x0015, ///< OpenCL.
492 eLanguageTypeGo = 0x0016, ///< Go.
493 eLanguageTypeModula3 = 0x0017, ///< Modula 3.
494 eLanguageTypeHaskell = 0x0018, ///< Haskell.
495 eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
496 eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
497 eLanguageTypeOCaml = 0x001b, ///< OCaml.
498 eLanguageTypeRust = 0x001c, ///< Rust.
499 eLanguageTypeC11 = 0x001d, ///< ISO C:2011.
500 eLanguageTypeSwift = 0x001e, ///< Swift.
501 eLanguageTypeJulia = 0x001f, ///< Julia.
502 eLanguageTypeDylan = 0x0020, ///< Dylan.
503 eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
504 eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003.
505 eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008.
506 eLanguageTypeRenderScript = 0x0024,
507 eLanguageTypeBLISS = 0x0025,
508 eLanguageTypeKotlin = 0x0026,
509 eLanguageTypeZig = 0x0027,
510 eLanguageTypeCrystal = 0x0028,
511 eLanguageTypeC_plus_plus_17 = 0x002a, ///< ISO C++:2017.
512 eLanguageTypeC_plus_plus_20 = 0x002b, ///< ISO C++:2020.
513 eLanguageTypeC17 = 0x002c,
514 eLanguageTypeFortran18 = 0x002d,
515 eLanguageTypeAda2005 = 0x002e,
516 eLanguageTypeAda2012 = 0x002f,
517 eLanguageTypeHIP = 0x0030,
518 eLanguageTypeAssembly = 0x0031,
519 eLanguageTypeC_sharp = 0x0032,
520 eLanguageTypeMojo = 0x0033,
521
522 // Vendor Extensions
523 // Note: Language::GetNameForLanguageType
524 // assumes these can be used as indexes into array language_names, and
525 // Language::SetLanguageFromCString and Language::AsCString assume these can
526 // be used as indexes into array g_languages.
527 eLanguageTypeMipsAssembler, ///< Mips_Assembler.
528 // Mojo will move to the common list of languages once the DWARF committee
529 // creates a language code for it.
530 eNumLanguageTypes
531};
532
533enum InstrumentationRuntimeType {
534 eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
535 eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
536 eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002,
537 eInstrumentationRuntimeTypeMainThreadChecker = 0x0003,
538 eInstrumentationRuntimeTypeSwiftRuntimeReporting = 0x0004,
539 eInstrumentationRuntimeTypeLibsanitizersAsan = 0x0005,
540 eNumInstrumentationRuntimeTypes
541};
542
543enum DynamicValueType {
544 eNoDynamicValues = 0,
545 eDynamicCanRunTarget = 1,
546 eDynamicDontRunTarget = 2
547};
548
549enum StopShowColumn {
550 eStopShowColumnAnsiOrCaret = 0,
551 eStopShowColumnAnsi = 1,
552 eStopShowColumnCaret = 2,
553 eStopShowColumnNone = 3
554};
555
556enum AccessType {
557 eAccessNone,
558 eAccessPublic,
559 eAccessPrivate,
560 eAccessProtected,
561 eAccessPackage
562};
563
564enum CommandArgumentType {
565 eArgTypeAddress = 0,
566 eArgTypeAddressOrExpression,
567 eArgTypeAliasName,
568 eArgTypeAliasOptions,
569 eArgTypeArchitecture,
570 eArgTypeBoolean,
571 eArgTypeBreakpointID,
572 eArgTypeBreakpointIDRange,
573 eArgTypeBreakpointName,
574 eArgTypeByteSize,
575 eArgTypeClassName,
576 eArgTypeCommandName,
577 eArgTypeCount,
578 eArgTypeDescriptionVerbosity,
579 eArgTypeDirectoryName,
580 eArgTypeDisassemblyFlavor,
581 eArgTypeEndAddress,
582 eArgTypeExpression,
583 eArgTypeExpressionPath,
584 eArgTypeExprFormat,
585 eArgTypeFileLineColumn,
586 eArgTypeFilename,
587 eArgTypeFormat,
588 eArgTypeFrameIndex,
589 eArgTypeFullName,
590 eArgTypeFunctionName,
591 eArgTypeFunctionOrSymbol,
592 eArgTypeGDBFormat,
593 eArgTypeHelpText,
594 eArgTypeIndex,
595 eArgTypeLanguage,
596 eArgTypeLineNum,
597 eArgTypeLogCategory,
598 eArgTypeLogChannel,
599 eArgTypeMethod,
600 eArgTypeName,
601 eArgTypeNewPathPrefix,
602 eArgTypeNumLines,
603 eArgTypeNumberPerLine,
604 eArgTypeOffset,
605 eArgTypeOldPathPrefix,
606 eArgTypeOneLiner,
607 eArgTypePath,
608 eArgTypePermissionsNumber,
609 eArgTypePermissionsString,
610 eArgTypePid,
611 eArgTypePlugin,
612 eArgTypeProcessName,
613 eArgTypePythonClass,
614 eArgTypePythonFunction,
615 eArgTypePythonScript,
616 eArgTypeQueueName,
617 eArgTypeRegisterName,
618 eArgTypeRegularExpression,
619 eArgTypeRunArgs,
620 eArgTypeRunMode,
621 eArgTypeScriptedCommandSynchronicity,
622 eArgTypeScriptLang,
623 eArgTypeSearchWord,
624 eArgTypeSelector,
625 eArgTypeSettingIndex,
626 eArgTypeSettingKey,
627 eArgTypeSettingPrefix,
628 eArgTypeSettingVariableName,
629 eArgTypeShlibName,
630 eArgTypeSourceFile,
631 eArgTypeSortOrder,
632 eArgTypeStartAddress,
633 eArgTypeSummaryString,
634 eArgTypeSymbol,
635 eArgTypeThreadID,
636 eArgTypeThreadIndex,
637 eArgTypeThreadName,
638 eArgTypeTypeName,
639 eArgTypeUnsignedInteger,
640 eArgTypeUnixSignal,
641 eArgTypeVarName,
642 eArgTypeValue,
643 eArgTypeWidth,
644 eArgTypeNone,
645 eArgTypePlatform,
646 eArgTypeWatchpointID,
647 eArgTypeWatchpointIDRange,
648 eArgTypeWatchType,
649 eArgRawInput,
650 eArgTypeCommand,
651 eArgTypeColumnNum,
652 eArgTypeModuleUUID,
653 eArgTypeSaveCoreStyle,
654 eArgTypeLogHandler,
655 eArgTypeSEDStylePair,
656 eArgTypeRecognizerID,
657 eArgTypeConnectURL,
658 eArgTypeTargetID,
659 eArgTypeStopHookID,
660 eArgTypeCompletionType,
661 eArgTypeRemotePath,
662 eArgTypeRemoteFilename,
663 eArgTypeModule,
664 eArgTypeCPUName,
665 eArgTypeCPUFeatures,
666 eArgTypeManagedPlugin,
667 eArgTypeLastArg // Always keep this entry as the last entry in this
668 // enumeration!!
669};
670
671/// Symbol types.
672// Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63
673// entries you will have to resize that field.
674enum SymbolType {
675 eSymbolTypeAny = 0,
676 eSymbolTypeInvalid = 0,
677 eSymbolTypeAbsolute,
678 eSymbolTypeCode,
679 eSymbolTypeResolver,
680 eSymbolTypeData,
681 eSymbolTypeTrampoline,
682 eSymbolTypeRuntime,
683 eSymbolTypeException,
684 eSymbolTypeSourceFile,
685 eSymbolTypeHeaderFile,
686 eSymbolTypeObjectFile,
687 eSymbolTypeCommonBlock,
688 eSymbolTypeBlock,
689 eSymbolTypeLocal,
690 eSymbolTypeParam,
691 eSymbolTypeVariable,
692 eSymbolTypeVariableType,
693 eSymbolTypeLineEntry,
694 eSymbolTypeLineHeader,
695 eSymbolTypeScopeBegin,
696 eSymbolTypeScopeEnd,
697 eSymbolTypeAdditional, ///< When symbols take more than one entry, the extra
698 ///< entries get this type
699 eSymbolTypeCompiler,
700 eSymbolTypeInstrumentation,
701 eSymbolTypeUndefined,
702 eSymbolTypeObjCClass,
703 eSymbolTypeObjCMetaClass,
704 eSymbolTypeObjCIVar,
705 eSymbolTypeReExported
706};
707
708enum SectionType {
709 eSectionTypeInvalid,
710 eSectionTypeCode,
711 eSectionTypeContainer, ///< The section contains child sections
712 eSectionTypeData,
713 eSectionTypeDataCString, ///< Inlined C string data
714 eSectionTypeDataCStringPointers, ///< Pointers to C string data
715 eSectionTypeDataSymbolAddress, ///< Address of a symbol in the symbol table
716 eSectionTypeData4,
717 eSectionTypeData8,
718 eSectionTypeData16,
719 eSectionTypeDataPointers,
720 eSectionTypeDebug,
721 eSectionTypeZeroFill,
722 eSectionTypeDataObjCMessageRefs, ///< Pointer to function pointer + selector
723 eSectionTypeDataObjCCFStrings, ///< Objective-C const CFString/NSString
724 ///< objects
725 eSectionTypeDWARFDebugAbbrev,
726 eSectionTypeDWARFDebugAddr,
727 eSectionTypeDWARFDebugAranges,
728 eSectionTypeDWARFDebugCuIndex,
729 eSectionTypeDWARFDebugFrame,
730 eSectionTypeDWARFDebugInfo,
731 eSectionTypeDWARFDebugLine,
732 eSectionTypeDWARFDebugLoc,
733 eSectionTypeDWARFDebugMacInfo,
734 eSectionTypeDWARFDebugMacro,
735 eSectionTypeDWARFDebugPubNames,
736 eSectionTypeDWARFDebugPubTypes,
737 eSectionTypeDWARFDebugRanges,
738 eSectionTypeDWARFDebugStr,
739 eSectionTypeDWARFDebugStrOffsets,
740 eSectionTypeDWARFAppleNames,
741 eSectionTypeDWARFAppleTypes,
742 eSectionTypeDWARFAppleNamespaces,
743 eSectionTypeDWARFAppleObjC,
744 eSectionTypeELFSymbolTable, ///< Elf SHT_SYMTAB section
745 eSectionTypeELFDynamicSymbols, ///< Elf SHT_DYNSYM section
746 eSectionTypeELFRelocationEntries, ///< Elf SHT_REL or SHT_REL section
747 eSectionTypeELFDynamicLinkInfo, ///< Elf SHT_DYNAMIC section
748 eSectionTypeEHFrame,
749 eSectionTypeARMexidx,
750 eSectionTypeARMextab,
751 eSectionTypeCompactUnwind, ///< compact unwind section in Mach-O,
752 ///< __TEXT,__unwind_info
753 eSectionTypeGoSymtab,
754 eSectionTypeAbsoluteAddress, ///< Dummy section for symbols with absolute
755 ///< address
756 eSectionTypeDWARFGNUDebugAltLink,
757 eSectionTypeDWARFDebugTypes, ///< DWARF .debug_types section
758 eSectionTypeDWARFDebugNames, ///< DWARF v5 .debug_names
759 eSectionTypeOther,
760 eSectionTypeDWARFDebugLineStr, ///< DWARF v5 .debug_line_str
761 eSectionTypeDWARFDebugRngLists, ///< DWARF v5 .debug_rnglists
762 eSectionTypeDWARFDebugLocLists, ///< DWARF v5 .debug_loclists
763 eSectionTypeDWARFDebugAbbrevDwo,
764 eSectionTypeDWARFDebugInfoDwo,
765 eSectionTypeDWARFDebugStrDwo,
766 eSectionTypeDWARFDebugStrOffsetsDwo,
767 eSectionTypeDWARFDebugTypesDwo,
768 eSectionTypeDWARFDebugRngListsDwo,
769 eSectionTypeDWARFDebugLocDwo,
770 eSectionTypeDWARFDebugLocListsDwo,
771 eSectionTypeDWARFDebugTuIndex,
772 eSectionTypeCTF,
773 eSectionTypeLLDBTypeSummaries,
774 eSectionTypeLLDBFormatters,
775 eSectionTypeSwiftModules,
776};
777
778FLAGS_ENUM(EmulateInstructionOptions){
779 eEmulateInstructionOptionNone = (0u),
780 eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
781 eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
782
783FLAGS_ENUM(FunctionNameType){
784 eFunctionNameTypeNone = 0u,
785 eFunctionNameTypeAuto =
786 (1u << 1), ///< Automatically figure out which FunctionNameType
787 ///< bits to set based on the function name.
788 eFunctionNameTypeFull = (1u << 2), ///< The function name.
789 ///< For C this is the same as just the name of the function For C++ this is
790 ///< the mangled or demangled version of the mangled name. For ObjC this is
791 ///< the full function signature with the + or - and the square brackets and
792 ///< the class and selector
793 eFunctionNameTypeBase = (1u
794 << 3), ///< The function name only, no namespaces
795 ///< or arguments and no class
796 ///< methods or selectors will be searched.
797 eFunctionNameTypeMethod = (1u << 4), ///< Find function by method name (C++)
798 ///< with no namespace or arguments
799 eFunctionNameTypeSelector =
800 (1u << 5), ///< Find function by selector name (ObjC) names
801 eFunctionNameTypeAny =
802 eFunctionNameTypeAuto ///< DEPRECATED: use eFunctionNameTypeAuto
803};
804LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType)
805
806/// Basic types enumeration for the public API SBType::GetBasicType().
807enum BasicType {
808 eBasicTypeInvalid = 0,
809 eBasicTypeVoid = 1,
810 eBasicTypeChar,
811 eBasicTypeSignedChar,
812 eBasicTypeUnsignedChar,
813 eBasicTypeWChar,
814 eBasicTypeSignedWChar,
815 eBasicTypeUnsignedWChar,
816 eBasicTypeChar16,
817 eBasicTypeChar32,
818 eBasicTypeChar8,
819 eBasicTypeShort,
820 eBasicTypeUnsignedShort,
821 eBasicTypeInt,
822 eBasicTypeUnsignedInt,
823 eBasicTypeLong,
824 eBasicTypeUnsignedLong,
825 eBasicTypeLongLong,
826 eBasicTypeUnsignedLongLong,
827 eBasicTypeInt128,
828 eBasicTypeUnsignedInt128,
829 eBasicTypeBool,
830 eBasicTypeHalf,
831 eBasicTypeFloat,
832 eBasicTypeDouble,
833 eBasicTypeLongDouble,
834 eBasicTypeFloatComplex,
835 eBasicTypeDoubleComplex,
836 eBasicTypeLongDoubleComplex,
837 eBasicTypeObjCID,
838 eBasicTypeObjCClass,
839 eBasicTypeObjCSel,
840 eBasicTypeNullPtr,
841 eBasicTypeOther
842};
843
844/// Deprecated
845enum TraceType {
846 eTraceTypeNone = 0,
847
848 /// Intel Processor Trace
849 eTraceTypeProcessorTrace
850};
851
852enum StructuredDataType {
853 eStructuredDataTypeInvalid = -1,
854 eStructuredDataTypeNull = 0,
855 eStructuredDataTypeGeneric,
856 eStructuredDataTypeArray,
857 eStructuredDataTypeInteger,
858 eStructuredDataTypeFloat,
859 eStructuredDataTypeBoolean,
860 eStructuredDataTypeString,
861 eStructuredDataTypeDictionary,
862 eStructuredDataTypeSignedInteger,
863 eStructuredDataTypeUnsignedInteger = eStructuredDataTypeInteger,
864};
865
866FLAGS_ENUM(TypeClass){
867 eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
868 eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
869 eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
870 eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
871 eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
872 eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
873 eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
874 eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
875 eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
876 eTypeClassVector = (1u << 17),
877 // Define the last type class as the MSBit of a 32 bit value
878 eTypeClassOther = (1u << 31),
879 // Define a mask that can be used for any type when finding types
880 eTypeClassAny = (0xffffffffu)};
881LLDB_MARK_AS_BITMASK_ENUM(TypeClass)
882
883enum TemplateArgumentKind {
884 eTemplateArgumentKindNull = 0,
885 eTemplateArgumentKindType,
886 eTemplateArgumentKindDeclaration,
887 eTemplateArgumentKindIntegral,
888 eTemplateArgumentKindTemplate,
889 eTemplateArgumentKindTemplateExpansion,
890 eTemplateArgumentKindExpression,
891 eTemplateArgumentKindPack,
892 eTemplateArgumentKindNullPtr,
893 eTemplateArgumentKindStructuralValue,
894};
895
896/// Type of match to be performed when looking for a formatter for a data type.
897/// Used by classes like SBTypeNameSpecifier or lldb_private::TypeMatcher.
898enum FormatterMatchType {
899 eFormatterMatchExact,
900 eFormatterMatchRegex,
901 eFormatterMatchCallback,
902
903 eLastFormatterMatchType = eFormatterMatchCallback,
904};
905
906/// Options that can be set for a formatter to alter its behavior. Not
907/// all of these are applicable to all formatter types.
908FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
909 eTypeOptionCascade = (1u << 0),
910 eTypeOptionSkipPointers = (1u << 1),
911 eTypeOptionSkipReferences = (1u << 2),
912 eTypeOptionHideChildren = (1u << 3),
913 eTypeOptionHideValue = (1u << 4),
914 eTypeOptionShowOneLiner = (1u << 5),
915 eTypeOptionHideNames = (1u << 6),
916 eTypeOptionNonCacheable = (1u << 7),
917 eTypeOptionHideEmptyAggregates = (1u << 8),
918 eTypeOptionFrontEndWantsDereference = (1u << 9)};
919
920/// This is the return value for frame comparisons. If you are comparing frame
921/// A to frame B the following cases arise:
922///
923/// 1) When frame A pushes frame B (or a frame that ends up pushing
924/// B) A is Older than B.
925///
926/// 2) When frame A pushed frame B (or if frameA is on the stack
927/// but B is not) A is Younger than B.
928///
929/// 3) When frame A and frame B have the same StackID, they are
930/// Equal.
931///
932/// 4) When frame A and frame B have the same immediate parent
933/// frame, but are not equal, the comparison yields SameParent.
934///
935/// 5) If the two frames are on different threads or processes the
936/// comparison is Invalid.
937///
938/// 6) If for some reason we can't figure out what went on, we
939/// return Unknown.
940enum FrameComparison {
941 eFrameCompareInvalid,
942 eFrameCompareUnknown,
943 eFrameCompareEqual,
944 eFrameCompareSameParent,
945 eFrameCompareYounger,
946 eFrameCompareOlder
947};
948
949/// File Permissions.
950///
951/// Designed to mimic the unix file permission bits so they can be used with
952/// functions that set 'mode_t' to certain values for permissions.
953FLAGS_ENUM(FilePermissions){
954 eFilePermissionsUserRead = (1u << 8),
955 eFilePermissionsUserWrite = (1u << 7),
956 eFilePermissionsUserExecute = (1u << 6),
957 eFilePermissionsGroupRead = (1u << 5),
958 eFilePermissionsGroupWrite = (1u << 4),
959 eFilePermissionsGroupExecute = (1u << 3),
960 eFilePermissionsWorldRead = (1u << 2),
961 eFilePermissionsWorldWrite = (1u << 1),
962 eFilePermissionsWorldExecute = (1u << 0),
963
964 eFilePermissionsUserRW = (eFilePermissionsUserRead |
965 eFilePermissionsUserWrite | 0),
966 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
967 eFilePermissionsUserExecute),
968 eFilePermissionsUserRWX = (eFilePermissionsUserRead |
969 eFilePermissionsUserWrite |
970 eFilePermissionsUserExecute),
971
972 eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
973 eFilePermissionsGroupWrite | 0),
974 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
975 eFilePermissionsGroupExecute),
976 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
977 eFilePermissionsGroupWrite |
978 eFilePermissionsGroupExecute),
979
980 eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
981 eFilePermissionsWorldWrite | 0),
982 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
983 eFilePermissionsWorldExecute),
984 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
985 eFilePermissionsWorldWrite |
986 eFilePermissionsWorldExecute),
987
988 eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
989 eFilePermissionsGroupRead |
990 eFilePermissionsWorldRead),
991 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
992 eFilePermissionsGroupWrite |
993 eFilePermissionsWorldWrite),
994 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
995 eFilePermissionsGroupExecute |
996 eFilePermissionsWorldExecute),
997
998 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
999 eFilePermissionsEveryoneW | 0),
1000 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
1001 eFilePermissionsEveryoneX),
1002 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
1003 eFilePermissionsEveryoneW |
1004 eFilePermissionsEveryoneX),
1005 eFilePermissionsFileDefault = eFilePermissionsUserRW,
1006 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
1007};
1008
1009/// Queue work item types.
1010///
1011/// The different types of work that can be enqueued on a libdispatch aka Grand
1012/// Central Dispatch (GCD) queue.
1013enum QueueItemKind {
1014 eQueueItemKindUnknown = 0,
1015 eQueueItemKindFunction,
1016 eQueueItemKindBlock
1017};
1018
1019/// Queue type.
1020///
1021/// libdispatch aka Grand Central Dispatch (GCD) queues can be either
1022/// serial (executing on one thread) or concurrent (executing on
1023/// multiple threads).
1024enum QueueKind {
1025 eQueueKindUnknown = 0,
1026 eQueueKindSerial,
1027 eQueueKindConcurrent
1028};
1029
1030/// Expression Evaluation Stages.
1031///
1032/// These are the cancellable stages of expression evaluation, passed
1033/// to the expression evaluation callback, so that you can interrupt
1034/// expression evaluation at the various points in its lifecycle.
1035enum ExpressionEvaluationPhase {
1036 eExpressionEvaluationParse = 0,
1037 eExpressionEvaluationIRGen,
1038 eExpressionEvaluationExecution,
1039 eExpressionEvaluationComplete
1040};
1041
1042/// Architecture-agnostic categorization of instructions for traversing the
1043/// control flow of a trace.
1044///
1045/// A single instruction can match one or more of these categories.
1046enum InstructionControlFlowKind {
1047 /// The instruction could not be classified.
1048 eInstructionControlFlowKindUnknown = 0,
1049 /// The instruction is something not listed below, i.e. it's a sequential
1050 /// instruction that doesn't affect the control flow of the program.
1051 eInstructionControlFlowKindOther,
1052 /// The instruction is a near (function) call.
1053 eInstructionControlFlowKindCall,
1054 /// The instruction is a near (function) return.
1055 eInstructionControlFlowKindReturn,
1056 /// The instruction is a near unconditional jump.
1057 eInstructionControlFlowKindJump,
1058 /// The instruction is a near conditional jump.
1059 eInstructionControlFlowKindCondJump,
1060 /// The instruction is a call-like far transfer.
1061 /// E.g. SYSCALL, SYSENTER, or FAR CALL.
1062 eInstructionControlFlowKindFarCall,
1063 /// The instruction is a return-like far transfer.
1064 /// E.g. SYSRET, SYSEXIT, IRET, or FAR RET.
1065 eInstructionControlFlowKindFarReturn,
1066 /// The instruction is a jump-like far transfer.
1067 /// E.g. FAR JMP.
1068 eInstructionControlFlowKindFarJump
1069};
1070
1071/// Watchpoint Kind.
1072///
1073/// Indicates what types of events cause the watchpoint to fire. Used by Native
1074/// *Protocol-related classes.
1075FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
1076 eWatchpointKindRead = (1u << 1)};
1077
1078enum GdbSignal {
1079 eGdbSignalBadAccess = 0x91,
1080 eGdbSignalBadInstruction = 0x92,
1081 eGdbSignalArithmetic = 0x93,
1082 eGdbSignalEmulation = 0x94,
1083 eGdbSignalSoftware = 0x95,
1084 eGdbSignalBreakpoint = 0x96
1085};
1086
1087/// Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are
1088/// related to LLDB on the current host machine. Most files are
1089/// relative to LLDB or are in known locations.
1090enum PathType {
1091 ePathTypeLLDBShlibDir, ///< The directory where the lldb.so (unix) or LLDB
1092 ///< mach-o file in LLDB.framework (MacOSX) exists
1093 ePathTypeSupportExecutableDir, ///< Find LLDB support executable directory
1094 ///< (debugserver, etc)
1095 ePathTypeHeaderDir, ///< Find LLDB header file directory
1096 ePathTypePythonDir, ///< Find Python modules (PYTHONPATH) directory
1097 ePathTypeLLDBSystemPlugins, ///< System plug-ins directory
1098 ePathTypeLLDBUserPlugins, ///< User plug-ins directory
1099 ePathTypeLLDBTempSystemDir, ///< The LLDB temp directory for this system that
1100 ///< will be cleaned up on exit
1101 ePathTypeGlobalLLDBTempSystemDir, ///< The LLDB temp directory for this
1102 ///< system, NOT cleaned up on a process
1103 ///< exit.
1104 ePathTypeClangDir ///< Find path to Clang builtin headers
1105};
1106
1107/// Kind of member function.
1108///
1109/// Used by the type system.
1110enum MemberFunctionKind {
1111 eMemberFunctionKindUnknown = 0, ///< Not sure what the type of this is
1112 eMemberFunctionKindConstructor, ///< A function used to create instances
1113 eMemberFunctionKindDestructor, ///< A function used to tear down existing
1114 ///< instances
1115 eMemberFunctionKindInstanceMethod, ///< A function that applies to a specific
1116 ///< instance
1117 eMemberFunctionKindStaticMethod ///< A function that applies to a type rather
1118 ///< than any instance
1119};
1120
1121/// String matching algorithm used by SBTarget.
1122enum MatchType {
1123 eMatchTypeNormal,
1124 eMatchTypeRegex,
1125 eMatchTypeStartsWith,
1126 eMatchTypeRegexInsensitive
1127};
1128
1129/// Bitmask that describes details about a type.
1130FLAGS_ENUM(TypeFlags){
1131 eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1),
1132 eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3),
1133 eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5),
1134 eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7),
1135 eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9),
1136 eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11),
1137 eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13),
1138 eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15),
1139 eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17),
1140 eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19),
1141 eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21),
1142 eTypeInstanceIsPointer = (1u << 22)};
1143
1144FLAGS_ENUM(CommandFlags){
1145 /// eCommandRequiresTarget
1146 ///
1147 /// Ensures a valid target is contained in m_exe_ctx prior to executing the
1148 /// command. If a target doesn't exist or is invalid, the command will fail
1149 /// and CommandObject::GetInvalidTargetDescription() will be returned as the
1150 /// error. CommandObject subclasses can override the virtual function for
1151 /// GetInvalidTargetDescription() to provide custom strings when needed.
1152 eCommandRequiresTarget = (1u << 0),
1153 /// eCommandRequiresProcess
1154 ///
1155 /// Ensures a valid process is contained in m_exe_ctx prior to executing the
1156 /// command. If a process doesn't exist or is invalid, the command will fail
1157 /// and CommandObject::GetInvalidProcessDescription() will be returned as
1158 /// the error. CommandObject subclasses can override the virtual function
1159 /// for GetInvalidProcessDescription() to provide custom strings when
1160 /// needed.
1161 eCommandRequiresProcess = (1u << 1),
1162 /// eCommandRequiresThread
1163 ///
1164 /// Ensures a valid thread is contained in m_exe_ctx prior to executing the
1165 /// command. If a thread doesn't exist or is invalid, the command will fail
1166 /// and CommandObject::GetInvalidThreadDescription() will be returned as the
1167 /// error. CommandObject subclasses can override the virtual function for
1168 /// GetInvalidThreadDescription() to provide custom strings when needed.
1169 eCommandRequiresThread = (1u << 2),
1170 /// eCommandRequiresFrame
1171 ///
1172 /// Ensures a valid frame is contained in m_exe_ctx prior to executing the
1173 /// command. If a frame doesn't exist or is invalid, the command will fail
1174 /// and CommandObject::GetInvalidFrameDescription() will be returned as the
1175 /// error. CommandObject subclasses can override the virtual function for
1176 /// GetInvalidFrameDescription() to provide custom strings when needed.
1177 eCommandRequiresFrame = (1u << 3),
1178 /// eCommandRequiresRegContext
1179 ///
1180 /// Ensures a valid register context (from the selected frame if there is a
1181 /// frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is
1182 /// available from m_exe_ctx prior to executing the command. If a target
1183 /// doesn't exist or is invalid, the command will fail and
1184 /// CommandObject::GetInvalidRegContextDescription() will be returned as the
1185 /// error. CommandObject subclasses can override the virtual function for
1186 /// GetInvalidRegContextDescription() to provide custom strings when needed.
1187 eCommandRequiresRegContext = (1u << 4),
1188 /// eCommandTryTargetAPILock
1189 ///
1190 /// Attempts to acquire the target lock if a target is selected in the
1191 /// command interpreter. If the command object fails to acquire the API
1192 /// lock, the command will fail with an appropriate error message.
1193 eCommandTryTargetAPILock = (1u << 5),
1194 /// eCommandProcessMustBeLaunched
1195 ///
1196 /// Verifies that there is a launched process in m_exe_ctx, if there isn't,
1197 /// the command will fail with an appropriate error message.
1198 eCommandProcessMustBeLaunched = (1u << 6),
1199 /// eCommandProcessMustBePaused
1200 ///
1201 /// Verifies that there is a paused process in m_exe_ctx, if there isn't,
1202 /// the command will fail with an appropriate error message.
1203 eCommandProcessMustBePaused = (1u << 7),
1204 /// eCommandProcessMustBeTraced
1205 ///
1206 /// Verifies that the process is being traced by a Trace plug-in, if it
1207 /// isn't the command will fail with an appropriate error message.
1208 eCommandProcessMustBeTraced = (1u << 8)};
1209
1210/// Whether a summary should cap how much data it returns to users or not.
1211enum TypeSummaryCapping {
1212 eTypeSummaryCapped = true,
1213 eTypeSummaryUncapped = false
1214};
1215
1216/// The result from a command interpreter run.
1217enum CommandInterpreterResult {
1218 /// Command interpreter finished successfully.
1219 eCommandInterpreterResultSuccess,
1220 /// Stopped because the corresponding option was set and the inferior
1221 /// crashed.
1222 eCommandInterpreterResultInferiorCrash,
1223 /// Stopped because the corresponding option was set and a command returned
1224 /// an error.
1225 eCommandInterpreterResultCommandError,
1226 /// Stopped because quit was requested.
1227 eCommandInterpreterResultQuitRequested,
1228};
1229
1230// Style of core file to create when calling SaveCore.
1231enum SaveCoreStyle {
1232 eSaveCoreUnspecified = 0,
1233 eSaveCoreFull = 1,
1234 eSaveCoreDirtyOnly = 2,
1235 eSaveCoreStackOnly = 3,
1236 eSaveCoreCustomOnly = 4,
1237};
1238
1239/// Events that might happen during a trace session.
1240enum TraceEvent {
1241 /// Tracing was disabled for some time due to a software trigger.
1242 eTraceEventDisabledSW,
1243 /// Tracing was disable for some time due to a hardware trigger.
1244 eTraceEventDisabledHW,
1245 /// Event due to CPU change for a thread. This event is also fired when
1246 /// suddenly it's not possible to identify the cpu of a given thread.
1247 eTraceEventCPUChanged,
1248 /// Event due to a CPU HW clock tick.
1249 eTraceEventHWClockTick,
1250 /// The underlying tracing technology emitted a synchronization event used by
1251 /// trace processors.
1252 eTraceEventSyncPoint,
1253};
1254
1255// Enum used to identify which kind of item a \a TraceCursor is pointing at
1256enum TraceItemKind {
1257 eTraceItemKindError = 0,
1258 eTraceItemKindEvent,
1259 eTraceItemKindInstruction,
1260};
1261
1262/// Enum to indicate the reference point when invoking
1263/// \a TraceCursor::Seek().
1264/// The following values are inspired by \a std::istream::seekg.
1265enum TraceCursorSeekType {
1266 /// The beginning of the trace, i.e the oldest item.
1267 eTraceCursorSeekTypeBeginning = 0,
1268 /// The current position in the trace.
1269 eTraceCursorSeekTypeCurrent,
1270 /// The end of the trace, i.e the most recent item.
1271 eTraceCursorSeekTypeEnd
1272};
1273
1274/// Enum to control the verbosity level of `dwim-print` execution.
1275enum DWIMPrintVerbosity {
1276 /// Run `dwim-print` with no verbosity.
1277 eDWIMPrintVerbosityNone,
1278 /// Print a message when `dwim-print` uses `expression` evaluation.
1279 eDWIMPrintVerbosityExpression,
1280 /// Always print a message indicating how `dwim-print` is evaluating its
1281 /// expression.
1282 eDWIMPrintVerbosityFull,
1283};
1284
1285enum WatchpointValueKind {
1286 eWatchPointValueKindInvalid = 0,
1287 ///< Watchpoint was created watching a variable
1288 eWatchPointValueKindVariable = 1,
1289 ///< Watchpoint was created watching the result of an expression that was
1290 ///< evaluated at creation time.
1291 eWatchPointValueKindExpression = 2,
1292};
1293
1294enum CompletionType {
1295 eNoCompletion = 0ul,
1296 eSourceFileCompletion = (1ul << 0),
1297 eDiskFileCompletion = (1ul << 1),
1298 eDiskDirectoryCompletion = (1ul << 2),
1299 eSymbolCompletion = (1ul << 3),
1300 eModuleCompletion = (1ul << 4),
1301 eSettingsNameCompletion = (1ul << 5),
1302 ePlatformPluginCompletion = (1ul << 6),
1303 eArchitectureCompletion = (1ul << 7),
1304 eVariablePathCompletion = (1ul << 8),
1305 eRegisterCompletion = (1ul << 9),
1306 eBreakpointCompletion = (1ul << 10),
1307 eProcessPluginCompletion = (1ul << 11),
1308 eDisassemblyFlavorCompletion = (1ul << 12),
1309 eTypeLanguageCompletion = (1ul << 13),
1310 eFrameIndexCompletion = (1ul << 14),
1311 eModuleUUIDCompletion = (1ul << 15),
1312 eStopHookIDCompletion = (1ul << 16),
1313 eThreadIndexCompletion = (1ul << 17),
1314 eWatchpointIDCompletion = (1ul << 18),
1315 eBreakpointNameCompletion = (1ul << 19),
1316 eProcessIDCompletion = (1ul << 20),
1317 eProcessNameCompletion = (1ul << 21),
1318 eRemoteDiskFileCompletion = (1ul << 22),
1319 eRemoteDiskDirectoryCompletion = (1ul << 23),
1320 eTypeCategoryNameCompletion = (1ul << 24),
1321 eCustomCompletion = (1ul << 25),
1322 eThreadIDCompletion = (1ul << 26),
1323 // This last enum element is just for input validation.
1324 // Add new completions before this element,
1325 // and then increment eTerminatorCompletion's shift value
1326 eTerminatorCompletion = (1ul << 27)
1327};
1328
1329/// Specifies if children need to be re-computed
1330/// after a call to \ref SyntheticChildrenFrontEnd::Update.
1331enum ChildCacheState {
1332 eRefetch = 0, ///< Children need to be recomputed dynamically.
1333
1334 eReuse = 1, ///< Children did not change and don't need to be recomputed;
1335 ///< re-use what we computed the last time we called Update.
1336};
1337
1338enum SymbolDownload {
1339 eSymbolDownloadOff = 0,
1340 eSymbolDownloadBackground = 1,
1341 eSymbolDownloadForeground = 2,
1342};
1343
1344/// Used in the SBProcess AddressMask/FixAddress methods.
1345enum AddressMaskType {
1346 eAddressMaskTypeCode = 0,
1347 eAddressMaskTypeData,
1348 eAddressMaskTypeAny,
1349 eAddressMaskTypeAll = eAddressMaskTypeAny
1350};
1351
1352/// Used in the SBProcess AddressMask/FixAddress methods.
1353enum AddressMaskRange {
1354 eAddressMaskRangeLow = 0,
1355 eAddressMaskRangeHigh,
1356 eAddressMaskRangeAny,
1357 eAddressMaskRangeAll = eAddressMaskRangeAny,
1358};
1359
1360/// Used by the debugger to indicate which events are being broadcasted.
1361enum DebuggerBroadcastBit {
1362 eBroadcastBitProgress = (1 << 0),
1363 eBroadcastBitWarning = (1 << 1),
1364 eBroadcastBitError = (1 << 2),
1365 eBroadcastSymbolChange = (1 << 3),
1366 eBroadcastBitProgressCategory = (1 << 4), ///< Deprecated
1367 eBroadcastBitExternalProgress = (1 << 5),
1368 eBroadcastBitExternalProgressCategory = (1 << 6), ///< Deprecated
1369};
1370
1371/// Used for expressing severity in logs and diagnostics.
1372enum Severity {
1373 eSeverityError,
1374 eSeverityWarning,
1375 eSeverityInfo, // Equivalent to Remark used in clang.
1376};
1377
1378/// Callback return value, indicating whether it handled printing the
1379/// CommandReturnObject or deferred doing so to the CommandInterpreter.
1380enum CommandReturnObjectCallbackResult {
1381 /// The callback deferred printing the command return object.
1382 eCommandReturnObjectPrintCallbackSkipped = 0,
1383 /// The callback handled printing the command return object.
1384 eCommandReturnObjectPrintCallbackHandled = 1,
1385};
1386
1387/// Used to determine when to show disassembly.
1388enum StopDisassemblyType {
1389 eStopDisassemblyTypeNever = 0,
1390 eStopDisassemblyTypeNoDebugInfo,
1391 eStopDisassemblyTypeNoSource,
1392 eStopDisassemblyTypeAlways
1393};
1394
1395} // namespace lldb
1396
1397#endif // LLDB_LLDB_ENUMERATIONS_H
1398

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

source code of lldb/include/lldb/lldb-enumerations.h