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 71 namespace lldb { 72 73 /// Process and Thread States. 74 enum 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. 99 FLAGS_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. 136 enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping }; 137 138 /// Byte ordering definitions. 139 enum ByteOrder { 140 eByteOrderInvalid = 0, 141 eByteOrderBig = 1, 142 eByteOrderPDP = 2, 143 eByteOrderLittle = 4 144 }; 145 146 /// Register encoding definitions. 147 enum Encoding { 148 eEncodingInvalid = 0, 149 eEncodingUint, ///< unsigned integer 150 eEncodingSint, ///< signed integer 151 eEncodingIEEE754, ///< float 152 eEncodingVector ///< vector registers 153 }; 154 155 /// Display format definitions. 156 enum Format { 157 eFormatDefault = 0, 158 eFormatInvalid = 0, 159 eFormatBoolean, 160 eFormatBinary, 161 eFormatBytes, 162 eFormatBytesWithASCII, 163 eFormatChar, 164 eFormatCharPrintable, ///< Only printable characters, '.' if not printable 165 eFormatComplex, ///< Floating point complex type 166 eFormatComplexFloat = eFormatComplex, 167 eFormatCString, ///< NULL terminated C strings 168 eFormatDecimal, 169 eFormatEnum, 170 eFormatHex, 171 eFormatHexUppercase, 172 eFormatFloat, 173 eFormatOctal, 174 eFormatOSType, ///< OS character codes encoded into an integer 'PICT' 'text' 175 ///< etc... 176 eFormatUnicode16, 177 eFormatUnicode32, 178 eFormatUnsigned, 179 eFormatPointer, 180 eFormatVectorOfChar, 181 eFormatVectorOfSInt8, 182 eFormatVectorOfUInt8, 183 eFormatVectorOfSInt16, 184 eFormatVectorOfUInt16, 185 eFormatVectorOfSInt32, 186 eFormatVectorOfUInt32, 187 eFormatVectorOfSInt64, 188 eFormatVectorOfUInt64, 189 eFormatVectorOfFloat16, 190 eFormatVectorOfFloat32, 191 eFormatVectorOfFloat64, 192 eFormatVectorOfUInt128, 193 eFormatComplexInteger, ///< Integer complex type 194 eFormatCharArray, ///< Print characters with no single quotes, used for 195 ///< character arrays that can contain non printable 196 ///< characters 197 eFormatAddressInfo, ///< Describe what an address points to (func + offset 198 ///< with file/line, symbol + offset, data, etc) 199 eFormatHexFloat, ///< ISO C99 hex float string 200 eFormatInstruction, ///< Disassemble an opcode 201 eFormatVoid, ///< Do not print this 202 eFormatUnicode8, 203 kNumFormats 204 }; 205 206 /// Description levels for "void GetDescription(Stream *, DescriptionLevel)" 207 /// calls. 208 enum DescriptionLevel { 209 eDescriptionLevelBrief = 0, 210 eDescriptionLevelFull, 211 eDescriptionLevelVerbose, 212 eDescriptionLevelInitial, 213 kNumDescriptionLevels 214 }; 215 216 /// Script interpreter types. 217 enum ScriptLanguage { 218 eScriptLanguageNone = 0, 219 eScriptLanguagePython, 220 eScriptLanguageLua, 221 eScriptLanguageUnknown, 222 eScriptLanguageDefault = eScriptLanguageLua 223 }; 224 225 /// Register numbering types. 226 // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert any of 227 // these to the lldb internal register numbering scheme (eRegisterKindLLDB). 228 enum RegisterKind { 229 eRegisterKindEHFrame = 0, ///< the register numbers seen in eh_frame 230 eRegisterKindDWARF, ///< the register numbers seen DWARF 231 eRegisterKindGeneric, ///< insn ptr reg, stack ptr reg, etc not specific to 232 ///< any particular target 233 eRegisterKindProcessPlugin, ///< num used by the process plugin - e.g. by the 234 ///< remote gdb-protocol stub program 235 eRegisterKindLLDB, ///< lldb's internal register numbers 236 kNumRegisterKinds 237 }; 238 239 /// Thread stop reasons. 240 enum StopReason { 241 eStopReasonInvalid = 0, 242 eStopReasonNone, 243 eStopReasonTrace, 244 eStopReasonBreakpoint, 245 eStopReasonWatchpoint, 246 eStopReasonSignal, 247 eStopReasonException, 248 eStopReasonExec, ///< Program was re-exec'ed 249 eStopReasonPlanComplete, 250 eStopReasonThreadExiting, 251 eStopReasonInstrumentation, 252 eStopReasonProcessorTrace, 253 eStopReasonFork, 254 eStopReasonVFork, 255 eStopReasonVForkDone, 256 }; 257 258 /// Command Return Status Types. 259 enum ReturnStatus { 260 eReturnStatusInvalid, 261 eReturnStatusSuccessFinishNoResult, 262 eReturnStatusSuccessFinishResult, 263 eReturnStatusSuccessContinuingNoResult, 264 eReturnStatusSuccessContinuingResult, 265 eReturnStatusStarted, 266 eReturnStatusFailed, 267 eReturnStatusQuit 268 }; 269 270 /// The results of expression evaluation. 271 enum ExpressionResults { 272 eExpressionCompleted = 0, 273 eExpressionSetupError, 274 eExpressionParseError, 275 eExpressionDiscarded, 276 eExpressionInterrupted, 277 eExpressionHitBreakpoint, 278 eExpressionTimedOut, 279 eExpressionResultUnavailable, 280 eExpressionStoppedForDebug, 281 eExpressionThreadVanished 282 }; 283 284 enum SearchDepth { 285 eSearchDepthInvalid = 0, 286 eSearchDepthTarget, 287 eSearchDepthModule, 288 eSearchDepthCompUnit, 289 eSearchDepthFunction, 290 eSearchDepthBlock, 291 eSearchDepthAddress, 292 kLastSearchDepthKind = eSearchDepthAddress 293 }; 294 295 /// Connection Status Types. 296 enum ConnectionStatus { 297 eConnectionStatusSuccess, ///< Success 298 eConnectionStatusEndOfFile, ///< End-of-file encountered 299 eConnectionStatusError, ///< Check GetError() for details 300 eConnectionStatusTimedOut, ///< Request timed out 301 eConnectionStatusNoConnection, ///< No connection 302 eConnectionStatusLostConnection, ///< Lost connection while connected to a 303 ///< valid connection 304 eConnectionStatusInterrupted ///< Interrupted read 305 }; 306 307 enum ErrorType { 308 eErrorTypeInvalid, 309 eErrorTypeGeneric, ///< Generic errors that can be any value. 310 eErrorTypeMachKernel, ///< Mach kernel error codes. 311 eErrorTypePOSIX, ///< POSIX error codes. 312 eErrorTypeExpression, ///< These are from the ExpressionResults enum. 313 eErrorTypeWin32 ///< Standard Win32 error codes. 314 }; 315 316 enum ValueType { 317 eValueTypeInvalid = 0, 318 eValueTypeVariableGlobal = 1, ///< globals variable 319 eValueTypeVariableStatic = 2, ///< static variable 320 eValueTypeVariableArgument = 3, ///< function argument variables 321 eValueTypeVariableLocal = 4, ///< function local variables 322 eValueTypeRegister = 5, ///< stack frame register value 323 eValueTypeRegisterSet = 6, ///< A collection of stack frame register values 324 eValueTypeConstResult = 7, ///< constant result variables 325 eValueTypeVariableThreadLocal = 8 ///< thread local storage variable 326 }; 327 328 /// Token size/granularities for Input Readers. 329 330 enum InputReaderGranularity { 331 eInputReaderGranularityInvalid = 0, 332 eInputReaderGranularityByte, 333 eInputReaderGranularityWord, 334 eInputReaderGranularityLine, 335 eInputReaderGranularityAll 336 }; 337 338 /// These mask bits allow a common interface for queries that can 339 /// limit the amount of information that gets parsed to only the 340 /// information that is requested. These bits also can indicate what 341 /// actually did get resolved during query function calls. 342 /// 343 /// Each definition corresponds to a one of the member variables 344 /// in this class, and requests that that item be resolved, or 345 /// indicates that the member did get resolved. 346 FLAGS_ENUM(SymbolContextItem){ 347 /// Set when \a target is requested from a query, or was located 348 /// in query results 349 eSymbolContextTarget = (1u << 0), 350 /// Set when \a module is requested from a query, or was located 351 /// in query results 352 eSymbolContextModule = (1u << 1), 353 /// Set when \a comp_unit is requested from a query, or was 354 /// located in query results 355 eSymbolContextCompUnit = (1u << 2), 356 /// Set when \a function is requested from a query, or was located 357 /// in query results 358 eSymbolContextFunction = (1u << 3), 359 /// Set when the deepest \a block is requested from a query, or 360 /// was located in query results 361 eSymbolContextBlock = (1u << 4), 362 /// Set when \a line_entry is requested from a query, or was 363 /// located in query results 364 eSymbolContextLineEntry = (1u << 5), 365 /// Set when \a symbol is requested from a query, or was located 366 /// in query results 367 eSymbolContextSymbol = (1u << 6), 368 /// Indicates to try and lookup everything up during a routine 369 /// symbol context query. 370 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u), 371 /// Set when \a global or static variable is requested from a 372 /// query, or was located in query results. 373 /// eSymbolContextVariable is potentially expensive to lookup so 374 /// it isn't included in eSymbolContextEverything which stops it 375 /// from being used during frame PC lookups and many other 376 /// potential address to symbol context lookups. 377 eSymbolContextVariable = (1u << 7), 378 379 // Keep this last and up-to-date for what the last enum value is. 380 eSymbolContextLastItem = eSymbolContextVariable, 381 }; 382 LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem) 383 384 FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0), 385 ePermissionsReadable = (1u << 1), 386 ePermissionsExecutable = (1u << 2)}; 387 LLDB_MARK_AS_BITMASK_ENUM(Permissions) 388 389 enum InputReaderAction { 390 eInputReaderActivate, ///< reader is newly pushed onto the reader stack 391 eInputReaderAsynchronousOutputWritten, ///< an async output event occurred; 392 ///< the reader may want to do 393 ///< something 394 eInputReaderReactivate, ///< reader is on top of the stack again after another 395 ///< reader was popped off 396 eInputReaderDeactivate, ///< another reader was pushed on the stack 397 eInputReaderGotToken, ///< reader got one of its tokens (granularity) 398 eInputReaderInterrupt, ///< reader received an interrupt signal (probably from 399 ///< a control-c) 400 eInputReaderEndOfFile, ///< reader received an EOF char (probably from a 401 ///< control-d) 402 eInputReaderDone ///< reader was just popped off the stack and is done 403 }; 404 405 FLAGS_ENUM(BreakpointEventType){ 406 eBreakpointEventTypeInvalidType = (1u << 0), 407 eBreakpointEventTypeAdded = (1u << 1), 408 eBreakpointEventTypeRemoved = (1u << 2), 409 eBreakpointEventTypeLocationsAdded = (1u << 3), ///< Locations added doesn't 410 ///< get sent when the 411 ///< breakpoint is created 412 eBreakpointEventTypeLocationsRemoved = (1u << 4), 413 eBreakpointEventTypeLocationsResolved = (1u << 5), 414 eBreakpointEventTypeEnabled = (1u << 6), 415 eBreakpointEventTypeDisabled = (1u << 7), 416 eBreakpointEventTypeCommandChanged = (1u << 8), 417 eBreakpointEventTypeConditionChanged = (1u << 9), 418 eBreakpointEventTypeIgnoreChanged = (1u << 10), 419 eBreakpointEventTypeThreadChanged = (1u << 11), 420 eBreakpointEventTypeAutoContinueChanged = (1u << 12)}; 421 422 FLAGS_ENUM(WatchpointEventType){ 423 eWatchpointEventTypeInvalidType = (1u << 0), 424 eWatchpointEventTypeAdded = (1u << 1), 425 eWatchpointEventTypeRemoved = (1u << 2), 426 eWatchpointEventTypeEnabled = (1u << 6), 427 eWatchpointEventTypeDisabled = (1u << 7), 428 eWatchpointEventTypeCommandChanged = (1u << 8), 429 eWatchpointEventTypeConditionChanged = (1u << 9), 430 eWatchpointEventTypeIgnoreChanged = (1u << 10), 431 eWatchpointEventTypeThreadChanged = (1u << 11), 432 eWatchpointEventTypeTypeChanged = (1u << 12)}; 433 434 /// Programming language type. 435 /// 436 /// These enumerations use the same language enumerations as the DWARF 437 /// specification for ease of use and consistency. 438 /// The enum -> string code is in Language.cpp, don't change this 439 /// table without updating that code as well. 440 /// 441 /// This datatype is used in SBExpressionOptions::SetLanguage() which 442 /// makes this type API. Do not change its underlying storage type! 443 enum LanguageType { 444 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value. 445 eLanguageTypeC89 = 0x0001, ///< ISO C:1989. 446 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R. 447 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983. 448 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998. 449 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974. 450 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985. 451 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77. 452 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90. 453 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983. 454 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996. 455 eLanguageTypeJava = 0x000b, ///< Java. 456 eLanguageTypeC99 = 0x000c, ///< ISO C:1999. 457 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995. 458 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95. 459 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976. 460 eLanguageTypeObjC = 0x0010, ///< Objective-C. 461 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++. 462 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C. 463 eLanguageTypeD = 0x0013, ///< D. 464 eLanguageTypePython = 0x0014, ///< Python. 465 // NOTE: The below are DWARF5 constants, subject to change upon 466 // completion of the DWARF5 specification 467 eLanguageTypeOpenCL = 0x0015, ///< OpenCL. 468 eLanguageTypeGo = 0x0016, ///< Go. 469 eLanguageTypeModula3 = 0x0017, ///< Modula 3. 470 eLanguageTypeHaskell = 0x0018, ///< Haskell. 471 eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003. 472 eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011. 473 eLanguageTypeOCaml = 0x001b, ///< OCaml. 474 eLanguageTypeRust = 0x001c, ///< Rust. 475 eLanguageTypeC11 = 0x001d, ///< ISO C:2011. 476 eLanguageTypeSwift = 0x001e, ///< Swift. 477 eLanguageTypeJulia = 0x001f, ///< Julia. 478 eLanguageTypeDylan = 0x0020, ///< Dylan. 479 eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014. 480 eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003. 481 eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008. 482 // Vendor Extensions 483 // Note: Language::GetNameForLanguageType 484 // assumes these can be used as indexes into array language_names, and 485 // Language::SetLanguageFromCString and Language::AsCString assume these can 486 // be used as indexes into array g_languages. 487 eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler. 488 eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript. 489 eNumLanguageTypes 490 }; 491 492 enum InstrumentationRuntimeType { 493 eInstrumentationRuntimeTypeAddressSanitizer = 0x0000, 494 eInstrumentationRuntimeTypeThreadSanitizer = 0x0001, 495 eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002, 496 eInstrumentationRuntimeTypeMainThreadChecker = 0x0003, 497 eInstrumentationRuntimeTypeSwiftRuntimeReporting = 0x0004, 498 eNumInstrumentationRuntimeTypes 499 }; 500 501 enum DynamicValueType { 502 eNoDynamicValues = 0, 503 eDynamicCanRunTarget = 1, 504 eDynamicDontRunTarget = 2 505 }; 506 507 enum StopShowColumn { 508 eStopShowColumnAnsiOrCaret = 0, 509 eStopShowColumnAnsi = 1, 510 eStopShowColumnCaret = 2, 511 eStopShowColumnNone = 3 512 }; 513 514 enum AccessType { 515 eAccessNone, 516 eAccessPublic, 517 eAccessPrivate, 518 eAccessProtected, 519 eAccessPackage 520 }; 521 522 enum CommandArgumentType { 523 eArgTypeAddress = 0, 524 eArgTypeAddressOrExpression, 525 eArgTypeAliasName, 526 eArgTypeAliasOptions, 527 eArgTypeArchitecture, 528 eArgTypeBoolean, 529 eArgTypeBreakpointID, 530 eArgTypeBreakpointIDRange, 531 eArgTypeBreakpointName, 532 eArgTypeByteSize, 533 eArgTypeClassName, 534 eArgTypeCommandName, 535 eArgTypeCount, 536 eArgTypeDescriptionVerbosity, 537 eArgTypeDirectoryName, 538 eArgTypeDisassemblyFlavor, 539 eArgTypeEndAddress, 540 eArgTypeExpression, 541 eArgTypeExpressionPath, 542 eArgTypeExprFormat, 543 eArgTypeFileLineColumn, 544 eArgTypeFilename, 545 eArgTypeFormat, 546 eArgTypeFrameIndex, 547 eArgTypeFullName, 548 eArgTypeFunctionName, 549 eArgTypeFunctionOrSymbol, 550 eArgTypeGDBFormat, 551 eArgTypeHelpText, 552 eArgTypeIndex, 553 eArgTypeLanguage, 554 eArgTypeLineNum, 555 eArgTypeLogCategory, 556 eArgTypeLogChannel, 557 eArgTypeMethod, 558 eArgTypeName, 559 eArgTypeNewPathPrefix, 560 eArgTypeNumLines, 561 eArgTypeNumberPerLine, 562 eArgTypeOffset, 563 eArgTypeOldPathPrefix, 564 eArgTypeOneLiner, 565 eArgTypePath, 566 eArgTypePermissionsNumber, 567 eArgTypePermissionsString, 568 eArgTypePid, 569 eArgTypePlugin, 570 eArgTypeProcessName, 571 eArgTypePythonClass, 572 eArgTypePythonFunction, 573 eArgTypePythonScript, 574 eArgTypeQueueName, 575 eArgTypeRegisterName, 576 eArgTypeRegularExpression, 577 eArgTypeRunArgs, 578 eArgTypeRunMode, 579 eArgTypeScriptedCommandSynchronicity, 580 eArgTypeScriptLang, 581 eArgTypeSearchWord, 582 eArgTypeSelector, 583 eArgTypeSettingIndex, 584 eArgTypeSettingKey, 585 eArgTypeSettingPrefix, 586 eArgTypeSettingVariableName, 587 eArgTypeShlibName, 588 eArgTypeSourceFile, 589 eArgTypeSortOrder, 590 eArgTypeStartAddress, 591 eArgTypeSummaryString, 592 eArgTypeSymbol, 593 eArgTypeThreadID, 594 eArgTypeThreadIndex, 595 eArgTypeThreadName, 596 eArgTypeTypeName, 597 eArgTypeUnsignedInteger, 598 eArgTypeUnixSignal, 599 eArgTypeVarName, 600 eArgTypeValue, 601 eArgTypeWidth, 602 eArgTypeNone, 603 eArgTypePlatform, 604 eArgTypeWatchpointID, 605 eArgTypeWatchpointIDRange, 606 eArgTypeWatchType, 607 eArgRawInput, 608 eArgTypeCommand, 609 eArgTypeColumnNum, 610 eArgTypeModuleUUID, 611 eArgTypeSaveCoreStyle, 612 eArgTypeLogHandler, 613 eArgTypeSEDStylePair, 614 eArgTypeRecognizerID, 615 eArgTypeConnectURL, 616 eArgTypeTargetID, 617 eArgTypeStopHookID, 618 eArgTypeLastArg // Always keep this entry as the last entry in this 619 // enumeration!! 620 }; 621 622 /// Symbol types. 623 // Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63 624 // entries you will have to resize that field. 625 enum SymbolType { 626 eSymbolTypeAny = 0, 627 eSymbolTypeInvalid = 0, 628 eSymbolTypeAbsolute, 629 eSymbolTypeCode, 630 eSymbolTypeResolver, 631 eSymbolTypeData, 632 eSymbolTypeTrampoline, 633 eSymbolTypeRuntime, 634 eSymbolTypeException, 635 eSymbolTypeSourceFile, 636 eSymbolTypeHeaderFile, 637 eSymbolTypeObjectFile, 638 eSymbolTypeCommonBlock, 639 eSymbolTypeBlock, 640 eSymbolTypeLocal, 641 eSymbolTypeParam, 642 eSymbolTypeVariable, 643 eSymbolTypeVariableType, 644 eSymbolTypeLineEntry, 645 eSymbolTypeLineHeader, 646 eSymbolTypeScopeBegin, 647 eSymbolTypeScopeEnd, 648 eSymbolTypeAdditional, ///< When symbols take more than one entry, the extra 649 ///< entries get this type 650 eSymbolTypeCompiler, 651 eSymbolTypeInstrumentation, 652 eSymbolTypeUndefined, 653 eSymbolTypeObjCClass, 654 eSymbolTypeObjCMetaClass, 655 eSymbolTypeObjCIVar, 656 eSymbolTypeReExported 657 }; 658 659 enum SectionType { 660 eSectionTypeInvalid, 661 eSectionTypeCode, 662 eSectionTypeContainer, ///< The section contains child sections 663 eSectionTypeData, 664 eSectionTypeDataCString, ///< Inlined C string data 665 eSectionTypeDataCStringPointers, ///< Pointers to C string data 666 eSectionTypeDataSymbolAddress, ///< Address of a symbol in the symbol table 667 eSectionTypeData4, 668 eSectionTypeData8, 669 eSectionTypeData16, 670 eSectionTypeDataPointers, 671 eSectionTypeDebug, 672 eSectionTypeZeroFill, 673 eSectionTypeDataObjCMessageRefs, ///< Pointer to function pointer + selector 674 eSectionTypeDataObjCCFStrings, ///< Objective-C const CFString/NSString 675 ///< objects 676 eSectionTypeDWARFDebugAbbrev, 677 eSectionTypeDWARFDebugAddr, 678 eSectionTypeDWARFDebugAranges, 679 eSectionTypeDWARFDebugCuIndex, 680 eSectionTypeDWARFDebugFrame, 681 eSectionTypeDWARFDebugInfo, 682 eSectionTypeDWARFDebugLine, 683 eSectionTypeDWARFDebugLoc, 684 eSectionTypeDWARFDebugMacInfo, 685 eSectionTypeDWARFDebugMacro, 686 eSectionTypeDWARFDebugPubNames, 687 eSectionTypeDWARFDebugPubTypes, 688 eSectionTypeDWARFDebugRanges, 689 eSectionTypeDWARFDebugStr, 690 eSectionTypeDWARFDebugStrOffsets, 691 eSectionTypeDWARFAppleNames, 692 eSectionTypeDWARFAppleTypes, 693 eSectionTypeDWARFAppleNamespaces, 694 eSectionTypeDWARFAppleObjC, 695 eSectionTypeELFSymbolTable, ///< Elf SHT_SYMTAB section 696 eSectionTypeELFDynamicSymbols, ///< Elf SHT_DYNSYM section 697 eSectionTypeELFRelocationEntries, ///< Elf SHT_REL or SHT_REL section 698 eSectionTypeELFDynamicLinkInfo, ///< Elf SHT_DYNAMIC section 699 eSectionTypeEHFrame, 700 eSectionTypeARMexidx, 701 eSectionTypeARMextab, 702 eSectionTypeCompactUnwind, ///< compact unwind section in Mach-O, 703 ///< __TEXT,__unwind_info 704 eSectionTypeGoSymtab, 705 eSectionTypeAbsoluteAddress, ///< Dummy section for symbols with absolute 706 ///< address 707 eSectionTypeDWARFGNUDebugAltLink, 708 eSectionTypeDWARFDebugTypes, ///< DWARF .debug_types section 709 eSectionTypeDWARFDebugNames, ///< DWARF v5 .debug_names 710 eSectionTypeOther, 711 eSectionTypeDWARFDebugLineStr, ///< DWARF v5 .debug_line_str 712 eSectionTypeDWARFDebugRngLists, ///< DWARF v5 .debug_rnglists 713 eSectionTypeDWARFDebugLocLists, ///< DWARF v5 .debug_loclists 714 eSectionTypeDWARFDebugAbbrevDwo, 715 eSectionTypeDWARFDebugInfoDwo, 716 eSectionTypeDWARFDebugStrDwo, 717 eSectionTypeDWARFDebugStrOffsetsDwo, 718 eSectionTypeDWARFDebugTypesDwo, 719 eSectionTypeDWARFDebugRngListsDwo, 720 eSectionTypeDWARFDebugLocDwo, 721 eSectionTypeDWARFDebugLocListsDwo, 722 eSectionTypeDWARFDebugTuIndex, 723 }; 724 725 FLAGS_ENUM(EmulateInstructionOptions){ 726 eEmulateInstructionOptionNone = (0u), 727 eEmulateInstructionOptionAutoAdvancePC = (1u << 0), 728 eEmulateInstructionOptionIgnoreConditions = (1u << 1)}; 729 730 FLAGS_ENUM(FunctionNameType){ 731 eFunctionNameTypeNone = 0u, 732 eFunctionNameTypeAuto = 733 (1u << 1), ///< Automatically figure out which FunctionNameType 734 ///< bits to set based on the function name. 735 eFunctionNameTypeFull = (1u << 2), ///< The function name. 736 ///< For C this is the same as just the name of the function For C++ this is 737 ///< the mangled or demangled version of the mangled name. For ObjC this is 738 ///< the full function signature with the + or - and the square brackets and 739 ///< the class and selector 740 eFunctionNameTypeBase = (1u 741 << 3), ///< The function name only, no namespaces 742 ///< or arguments and no class 743 ///< methods or selectors will be searched. 744 eFunctionNameTypeMethod = (1u << 4), ///< Find function by method name (C++) 745 ///< with no namespace or arguments 746 eFunctionNameTypeSelector = 747 (1u << 5), ///< Find function by selector name (ObjC) names 748 eFunctionNameTypeAny = 749 eFunctionNameTypeAuto ///< DEPRECATED: use eFunctionNameTypeAuto 750 }; 751 LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType) 752 753 /// Basic types enumeration for the public API SBType::GetBasicType(). 754 enum BasicType { 755 eBasicTypeInvalid = 0, 756 eBasicTypeVoid = 1, 757 eBasicTypeChar, 758 eBasicTypeSignedChar, 759 eBasicTypeUnsignedChar, 760 eBasicTypeWChar, 761 eBasicTypeSignedWChar, 762 eBasicTypeUnsignedWChar, 763 eBasicTypeChar16, 764 eBasicTypeChar32, 765 eBasicTypeChar8, 766 eBasicTypeShort, 767 eBasicTypeUnsignedShort, 768 eBasicTypeInt, 769 eBasicTypeUnsignedInt, 770 eBasicTypeLong, 771 eBasicTypeUnsignedLong, 772 eBasicTypeLongLong, 773 eBasicTypeUnsignedLongLong, 774 eBasicTypeInt128, 775 eBasicTypeUnsignedInt128, 776 eBasicTypeBool, 777 eBasicTypeHalf, 778 eBasicTypeFloat, 779 eBasicTypeDouble, 780 eBasicTypeLongDouble, 781 eBasicTypeFloatComplex, 782 eBasicTypeDoubleComplex, 783 eBasicTypeLongDoubleComplex, 784 eBasicTypeObjCID, 785 eBasicTypeObjCClass, 786 eBasicTypeObjCSel, 787 eBasicTypeNullPtr, 788 eBasicTypeOther 789 }; 790 791 /// Deprecated 792 enum TraceType { 793 eTraceTypeNone = 0, 794 795 /// Intel Processor Trace 796 eTraceTypeProcessorTrace 797 }; 798 799 enum StructuredDataType { 800 eStructuredDataTypeInvalid = -1, 801 eStructuredDataTypeNull = 0, 802 eStructuredDataTypeGeneric, 803 eStructuredDataTypeArray, 804 eStructuredDataTypeInteger, 805 eStructuredDataTypeFloat, 806 eStructuredDataTypeBoolean, 807 eStructuredDataTypeString, 808 eStructuredDataTypeDictionary 809 }; 810 811 FLAGS_ENUM(TypeClass){ 812 eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0), 813 eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2), 814 eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4), 815 eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6), 816 eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8), 817 eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10), 818 eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12), 819 eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14), 820 eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16), 821 eTypeClassVector = (1u << 17), 822 // Define the last type class as the MSBit of a 32 bit value 823 eTypeClassOther = (1u << 31), 824 // Define a mask that can be used for any type when finding types 825 eTypeClassAny = (0xffffffffu)}; 826 LLDB_MARK_AS_BITMASK_ENUM(TypeClass) 827 828 enum TemplateArgumentKind { 829 eTemplateArgumentKindNull = 0, 830 eTemplateArgumentKindType, 831 eTemplateArgumentKindDeclaration, 832 eTemplateArgumentKindIntegral, 833 eTemplateArgumentKindTemplate, 834 eTemplateArgumentKindTemplateExpansion, 835 eTemplateArgumentKindExpression, 836 eTemplateArgumentKindPack, 837 eTemplateArgumentKindNullPtr, 838 }; 839 840 /// Type of match to be performed when looking for a formatter for a data type. 841 /// Used by classes like SBTypeNameSpecifier or lldb_private::TypeMatcher. 842 enum FormatterMatchType { 843 eFormatterMatchExact, 844 eFormatterMatchRegex, 845 eFormatterMatchCallback, 846 847 eLastFormatterMatchType = eFormatterMatchCallback, 848 }; 849 850 /// Options that can be set for a formatter to alter its behavior. Not 851 /// all of these are applicable to all formatter types. 852 FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u), 853 eTypeOptionCascade = (1u << 0), 854 eTypeOptionSkipPointers = (1u << 1), 855 eTypeOptionSkipReferences = (1u << 2), 856 eTypeOptionHideChildren = (1u << 3), 857 eTypeOptionHideValue = (1u << 4), 858 eTypeOptionShowOneLiner = (1u << 5), 859 eTypeOptionHideNames = (1u << 6), 860 eTypeOptionNonCacheable = (1u << 7), 861 eTypeOptionHideEmptyAggregates = (1u << 8), 862 eTypeOptionFrontEndWantsDereference = (1u << 9)}; 863 864 /// This is the return value for frame comparisons. If you are comparing frame 865 /// A to frame B the following cases arise: 866 /// 867 /// 1) When frame A pushes frame B (or a frame that ends up pushing 868 /// B) A is Older than B. 869 /// 870 /// 2) When frame A pushed frame B (or if frameA is on the stack 871 /// but B is not) A is Younger than B. 872 /// 873 /// 3) When frame A and frame B have the same StackID, they are 874 /// Equal. 875 /// 876 /// 4) When frame A and frame B have the same immediate parent 877 /// frame, but are not equal, the comparison yields SameParent. 878 /// 879 /// 5) If the two frames are on different threads or processes the 880 /// comparison is Invalid. 881 /// 882 /// 6) If for some reason we can't figure out what went on, we 883 /// return Unknown. 884 enum FrameComparison { 885 eFrameCompareInvalid, 886 eFrameCompareUnknown, 887 eFrameCompareEqual, 888 eFrameCompareSameParent, 889 eFrameCompareYounger, 890 eFrameCompareOlder 891 }; 892 893 /// File Permissions. 894 /// 895 /// Designed to mimic the unix file permission bits so they can be used with 896 /// functions that set 'mode_t' to certain values for permissions. 897 FLAGS_ENUM(FilePermissions){ 898 eFilePermissionsUserRead = (1u << 8), 899 eFilePermissionsUserWrite = (1u << 7), 900 eFilePermissionsUserExecute = (1u << 6), 901 eFilePermissionsGroupRead = (1u << 5), 902 eFilePermissionsGroupWrite = (1u << 4), 903 eFilePermissionsGroupExecute = (1u << 3), 904 eFilePermissionsWorldRead = (1u << 2), 905 eFilePermissionsWorldWrite = (1u << 1), 906 eFilePermissionsWorldExecute = (1u << 0), 907 908 eFilePermissionsUserRW = (eFilePermissionsUserRead | 909 eFilePermissionsUserWrite | 0), 910 eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 | 911 eFilePermissionsUserExecute), 912 eFilePermissionsUserRWX = (eFilePermissionsUserRead | 913 eFilePermissionsUserWrite | 914 eFilePermissionsUserExecute), 915 916 eFilePermissionsGroupRW = (eFilePermissionsGroupRead | 917 eFilePermissionsGroupWrite | 0), 918 eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 | 919 eFilePermissionsGroupExecute), 920 eFilePermissionsGroupRWX = (eFilePermissionsGroupRead | 921 eFilePermissionsGroupWrite | 922 eFilePermissionsGroupExecute), 923 924 eFilePermissionsWorldRW = (eFilePermissionsWorldRead | 925 eFilePermissionsWorldWrite | 0), 926 eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 | 927 eFilePermissionsWorldExecute), 928 eFilePermissionsWorldRWX = (eFilePermissionsWorldRead | 929 eFilePermissionsWorldWrite | 930 eFilePermissionsWorldExecute), 931 932 eFilePermissionsEveryoneR = (eFilePermissionsUserRead | 933 eFilePermissionsGroupRead | 934 eFilePermissionsWorldRead), 935 eFilePermissionsEveryoneW = (eFilePermissionsUserWrite | 936 eFilePermissionsGroupWrite | 937 eFilePermissionsWorldWrite), 938 eFilePermissionsEveryoneX = (eFilePermissionsUserExecute | 939 eFilePermissionsGroupExecute | 940 eFilePermissionsWorldExecute), 941 942 eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR | 943 eFilePermissionsEveryoneW | 0), 944 eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 | 945 eFilePermissionsEveryoneX), 946 eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR | 947 eFilePermissionsEveryoneW | 948 eFilePermissionsEveryoneX), 949 eFilePermissionsFileDefault = eFilePermissionsUserRW, 950 eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX, 951 }; 952 953 /// Queue work item types. 954 /// 955 /// The different types of work that can be enqueued on a libdispatch aka Grand 956 /// Central Dispatch (GCD) queue. 957 enum QueueItemKind { 958 eQueueItemKindUnknown = 0, 959 eQueueItemKindFunction, 960 eQueueItemKindBlock 961 }; 962 963 /// Queue type. 964 /// 965 /// libdispatch aka Grand Central Dispatch (GCD) queues can be either 966 /// serial (executing on one thread) or concurrent (executing on 967 /// multiple threads). 968 enum QueueKind { 969 eQueueKindUnknown = 0, 970 eQueueKindSerial, 971 eQueueKindConcurrent 972 }; 973 974 /// Expression Evaluation Stages. 975 /// 976 /// These are the cancellable stages of expression evaluation, passed 977 /// to the expression evaluation callback, so that you can interrupt 978 /// expression evaluation at the various points in its lifecycle. 979 enum ExpressionEvaluationPhase { 980 eExpressionEvaluationParse = 0, 981 eExpressionEvaluationIRGen, 982 eExpressionEvaluationExecution, 983 eExpressionEvaluationComplete 984 }; 985 986 /// Architecture-agnostic categorization of instructions for traversing the 987 /// control flow of a trace. 988 /// 989 /// A single instruction can match one or more of these categories. 990 enum InstructionControlFlowKind { 991 /// The instruction could not be classified. 992 eInstructionControlFlowKindUnknown = 0, 993 /// The instruction is something not listed below, i.e. it's a sequential 994 /// instruction that doesn't affect the control flow of the program. 995 eInstructionControlFlowKindOther, 996 /// The instruction is a near (function) call. 997 eInstructionControlFlowKindCall, 998 /// The instruction is a near (function) return. 999 eInstructionControlFlowKindReturn, 1000 /// The instruction is a near unconditional jump. 1001 eInstructionControlFlowKindJump, 1002 /// The instruction is a near conditional jump. 1003 eInstructionControlFlowKindCondJump, 1004 /// The instruction is a call-like far transfer. 1005 /// E.g. SYSCALL, SYSENTER, or FAR CALL. 1006 eInstructionControlFlowKindFarCall, 1007 /// The instruction is a return-like far transfer. 1008 /// E.g. SYSRET, SYSEXIT, IRET, or FAR RET. 1009 eInstructionControlFlowKindFarReturn, 1010 /// The instruction is a jump-like far transfer. 1011 /// E.g. FAR JMP. 1012 eInstructionControlFlowKindFarJump 1013 }; 1014 1015 /// Watchpoint Kind. 1016 /// 1017 /// Indicates what types of events cause the watchpoint to fire. Used by Native 1018 /// *Protocol-related classes. 1019 FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0), 1020 eWatchpointKindRead = (1u << 1)}; 1021 1022 enum GdbSignal { 1023 eGdbSignalBadAccess = 0x91, 1024 eGdbSignalBadInstruction = 0x92, 1025 eGdbSignalArithmetic = 0x93, 1026 eGdbSignalEmulation = 0x94, 1027 eGdbSignalSoftware = 0x95, 1028 eGdbSignalBreakpoint = 0x96 1029 }; 1030 1031 /// Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are 1032 /// related to LLDB on the current host machine. Most files are 1033 /// relative to LLDB or are in known locations. 1034 enum PathType { 1035 ePathTypeLLDBShlibDir, ///< The directory where the lldb.so (unix) or LLDB 1036 ///< mach-o file in LLDB.framework (MacOSX) exists 1037 ePathTypeSupportExecutableDir, ///< Find LLDB support executable directory 1038 ///< (debugserver, etc) 1039 ePathTypeHeaderDir, ///< Find LLDB header file directory 1040 ePathTypePythonDir, ///< Find Python modules (PYTHONPATH) directory 1041 ePathTypeLLDBSystemPlugins, ///< System plug-ins directory 1042 ePathTypeLLDBUserPlugins, ///< User plug-ins directory 1043 ePathTypeLLDBTempSystemDir, ///< The LLDB temp directory for this system that 1044 ///< will be cleaned up on exit 1045 ePathTypeGlobalLLDBTempSystemDir, ///< The LLDB temp directory for this 1046 ///< system, NOT cleaned up on a process 1047 ///< exit. 1048 ePathTypeClangDir ///< Find path to Clang builtin headers 1049 }; 1050 1051 /// Kind of member function. 1052 /// 1053 /// Used by the type system. 1054 enum MemberFunctionKind { 1055 eMemberFunctionKindUnknown = 0, ///< Not sure what the type of this is 1056 eMemberFunctionKindConstructor, ///< A function used to create instances 1057 eMemberFunctionKindDestructor, ///< A function used to tear down existing 1058 ///< instances 1059 eMemberFunctionKindInstanceMethod, ///< A function that applies to a specific 1060 ///< instance 1061 eMemberFunctionKindStaticMethod ///< A function that applies to a type rather 1062 ///< than any instance 1063 }; 1064 1065 /// String matching algorithm used by SBTarget. 1066 enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith }; 1067 1068 /// Bitmask that describes details about a type. 1069 FLAGS_ENUM(TypeFlags){ 1070 eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1), 1071 eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3), 1072 eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5), 1073 eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7), 1074 eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9), 1075 eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11), 1076 eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13), 1077 eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15), 1078 eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17), 1079 eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19), 1080 eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21), 1081 eTypeInstanceIsPointer = (1u << 22)}; 1082 1083 FLAGS_ENUM(CommandFlags){ 1084 /// eCommandRequiresTarget 1085 /// 1086 /// Ensures a valid target is contained in m_exe_ctx prior to executing the 1087 /// command. If a target doesn't exist or is invalid, the command will fail 1088 /// and CommandObject::GetInvalidTargetDescription() will be returned as the 1089 /// error. CommandObject subclasses can override the virtual function for 1090 /// GetInvalidTargetDescription() to provide custom strings when needed. 1091 eCommandRequiresTarget = (1u << 0), 1092 /// eCommandRequiresProcess 1093 /// 1094 /// Ensures a valid process is contained in m_exe_ctx prior to executing the 1095 /// command. If a process doesn't exist or is invalid, the command will fail 1096 /// and CommandObject::GetInvalidProcessDescription() will be returned as 1097 /// the error. CommandObject subclasses can override the virtual function 1098 /// for GetInvalidProcessDescription() to provide custom strings when 1099 /// needed. 1100 eCommandRequiresProcess = (1u << 1), 1101 /// eCommandRequiresThread 1102 /// 1103 /// Ensures a valid thread is contained in m_exe_ctx prior to executing the 1104 /// command. If a thread doesn't exist or is invalid, the command will fail 1105 /// and CommandObject::GetInvalidThreadDescription() will be returned as the 1106 /// error. CommandObject subclasses can override the virtual function for 1107 /// GetInvalidThreadDescription() to provide custom strings when needed. 1108 eCommandRequiresThread = (1u << 2), 1109 /// eCommandRequiresFrame 1110 /// 1111 /// Ensures a valid frame is contained in m_exe_ctx prior to executing the 1112 /// command. If a frame doesn't exist or is invalid, the command will fail 1113 /// and CommandObject::GetInvalidFrameDescription() will be returned as the 1114 /// error. CommandObject subclasses can override the virtual function for 1115 /// GetInvalidFrameDescription() to provide custom strings when needed. 1116 eCommandRequiresFrame = (1u << 3), 1117 /// eCommandRequiresRegContext 1118 /// 1119 /// Ensures a valid register context (from the selected frame if there is a 1120 /// frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is 1121 /// available from m_exe_ctx prior to executing the command. If a target 1122 /// doesn't exist or is invalid, the command will fail and 1123 /// CommandObject::GetInvalidRegContextDescription() will be returned as the 1124 /// error. CommandObject subclasses can override the virtual function for 1125 /// GetInvalidRegContextDescription() to provide custom strings when needed. 1126 eCommandRequiresRegContext = (1u << 4), 1127 /// eCommandTryTargetAPILock 1128 /// 1129 /// Attempts to acquire the target lock if a target is selected in the 1130 /// command interpreter. If the command object fails to acquire the API 1131 /// lock, the command will fail with an appropriate error message. 1132 eCommandTryTargetAPILock = (1u << 5), 1133 /// eCommandProcessMustBeLaunched 1134 /// 1135 /// Verifies that there is a launched process in m_exe_ctx, if there isn't, 1136 /// the command will fail with an appropriate error message. 1137 eCommandProcessMustBeLaunched = (1u << 6), 1138 /// eCommandProcessMustBePaused 1139 /// 1140 /// Verifies that there is a paused process in m_exe_ctx, if there isn't, 1141 /// the command will fail with an appropriate error message. 1142 eCommandProcessMustBePaused = (1u << 7), 1143 /// eCommandProcessMustBeTraced 1144 /// 1145 /// Verifies that the process is being traced by a Trace plug-in, if it 1146 /// isn't the command will fail with an appropriate error message. 1147 eCommandProcessMustBeTraced = (1u << 8)}; 1148 1149 /// Whether a summary should cap how much data it returns to users or not. 1150 enum TypeSummaryCapping { 1151 eTypeSummaryCapped = true, 1152 eTypeSummaryUncapped = false 1153 }; 1154 1155 /// The result from a command interpreter run. 1156 enum CommandInterpreterResult { 1157 /// Command interpreter finished successfully. 1158 eCommandInterpreterResultSuccess, 1159 /// Stopped because the corresponding option was set and the inferior 1160 /// crashed. 1161 eCommandInterpreterResultInferiorCrash, 1162 /// Stopped because the corresponding option was set and a command returned 1163 /// an error. 1164 eCommandInterpreterResultCommandError, 1165 /// Stopped because quit was requested. 1166 eCommandInterpreterResultQuitRequested, 1167 }; 1168 1169 // Style of core file to create when calling SaveCore. 1170 enum SaveCoreStyle { 1171 eSaveCoreUnspecified = 0, 1172 eSaveCoreFull = 1, 1173 eSaveCoreDirtyOnly = 2, 1174 eSaveCoreStackOnly = 3, 1175 }; 1176 1177 /// Events that might happen during a trace session. 1178 enum TraceEvent { 1179 /// Tracing was disabled for some time due to a software trigger. 1180 eTraceEventDisabledSW, 1181 /// Tracing was disable for some time due to a hardware trigger. 1182 eTraceEventDisabledHW, 1183 /// Event due to CPU change for a thread. This event is also fired when 1184 /// suddenly it's not possible to identify the cpu of a given thread. 1185 eTraceEventCPUChanged, 1186 /// Event due to a CPU HW clock tick. 1187 eTraceEventHWClockTick, 1188 /// The underlying tracing technology emitted a synchronization event used by 1189 /// trace processors. 1190 eTraceEventSyncPoint, 1191 }; 1192 1193 // Enum used to identify which kind of item a \a TraceCursor is pointing at 1194 enum TraceItemKind { 1195 eTraceItemKindError = 0, 1196 eTraceItemKindEvent, 1197 eTraceItemKindInstruction, 1198 }; 1199 1200 /// Enum to indicate the reference point when invoking 1201 /// \a TraceCursor::Seek(). 1202 /// The following values are inspired by \a std::istream::seekg. 1203 enum TraceCursorSeekType { 1204 /// The beginning of the trace, i.e the oldest item. 1205 eTraceCursorSeekTypeBeginning = 0, 1206 /// The current position in the trace. 1207 eTraceCursorSeekTypeCurrent, 1208 /// The end of the trace, i.e the most recent item. 1209 eTraceCursorSeekTypeEnd 1210 }; 1211 1212 /// Enum to control the verbosity level of `dwim-print` execution. 1213 enum DWIMPrintVerbosity { 1214 /// Run `dwim-print` with no verbosity. 1215 eDWIMPrintVerbosityNone, 1216 /// Print a message when `dwim-print` uses `expression` evaluation. 1217 eDWIMPrintVerbosityExpression, 1218 /// Always print a message indicating how `dwim-print` is evaluating its 1219 /// expression. 1220 eDWIMPrintVerbosityFull, 1221 }; 1222 1223 } // namespace lldb 1224 1225 #endif // LLDB_LLDB_ENUMERATIONS_H 1226