| 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 | /// Execution directions |
| 139 | enum RunDirection { eRunForward, eRunReverse }; |
| 140 | |
| 141 | /// Byte ordering definitions. |
| 142 | enum ByteOrder { |
| 143 | eByteOrderInvalid = 0, |
| 144 | eByteOrderBig = 1, |
| 145 | eByteOrderPDP = 2, |
| 146 | eByteOrderLittle = 4 |
| 147 | }; |
| 148 | |
| 149 | /// Register encoding definitions. |
| 150 | enum 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. |
| 159 | enum 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. |
| 211 | enum DescriptionLevel { |
| 212 | eDescriptionLevelBrief = 0, |
| 213 | eDescriptionLevelFull, |
| 214 | eDescriptionLevelVerbose, |
| 215 | eDescriptionLevelInitial, |
| 216 | kNumDescriptionLevels |
| 217 | }; |
| 218 | |
| 219 | /// Script interpreter types. |
| 220 | enum 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). |
| 231 | enum 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. |
| 243 | enum 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. |
| 266 | enum 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. |
| 278 | enum ExpressionResults { |
| 279 | eExpressionCompleted = 0, |
| 280 | eExpressionSetupError, |
| 281 | eExpressionParseError, |
| 282 | eExpressionDiscarded, |
| 283 | eExpressionInterrupted, |
| 284 | eExpressionHitBreakpoint, |
| 285 | eExpressionTimedOut, |
| 286 | eExpressionResultUnavailable, |
| 287 | eExpressionStoppedForDebug, |
| 288 | eExpressionThreadVanished |
| 289 | }; |
| 290 | |
| 291 | enum 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. |
| 303 | enum 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 | |
| 314 | enum 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 | |
| 323 | enum 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 | |
| 339 | enum 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. |
| 355 | FLAGS_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 | }; |
| 391 | LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem) |
| 392 | |
| 393 | FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0), |
| 394 | ePermissionsReadable = (1u << 1), |
| 395 | ePermissionsExecutable = (1u << 2)}; |
| 396 | LLDB_MARK_AS_BITMASK_ENUM(Permissions) |
| 397 | |
| 398 | enum 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 | |
| 414 | FLAGS_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 | |
| 431 | FLAGS_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 | |
| 443 | enum 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! |
| 467 | enum 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 | |
| 533 | enum InstrumentationRuntimeType { |
| 534 | eInstrumentationRuntimeTypeAddressSanitizer = 0x0000, |
| 535 | eInstrumentationRuntimeTypeThreadSanitizer = 0x0001, |
| 536 | eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002, |
| 537 | eInstrumentationRuntimeTypeMainThreadChecker = 0x0003, |
| 538 | eInstrumentationRuntimeTypeSwiftRuntimeReporting = 0x0004, |
| 539 | eInstrumentationRuntimeTypeLibsanitizersAsan = 0x0005, |
| 540 | eNumInstrumentationRuntimeTypes |
| 541 | }; |
| 542 | |
| 543 | enum DynamicValueType { |
| 544 | eNoDynamicValues = 0, |
| 545 | eDynamicCanRunTarget = 1, |
| 546 | eDynamicDontRunTarget = 2 |
| 547 | }; |
| 548 | |
| 549 | enum StopShowColumn { |
| 550 | eStopShowColumnAnsiOrCaret = 0, |
| 551 | eStopShowColumnAnsi = 1, |
| 552 | eStopShowColumnCaret = 2, |
| 553 | eStopShowColumnNone = 3 |
| 554 | }; |
| 555 | |
| 556 | enum AccessType { |
| 557 | eAccessNone, |
| 558 | eAccessPublic, |
| 559 | eAccessPrivate, |
| 560 | eAccessProtected, |
| 561 | eAccessPackage |
| 562 | }; |
| 563 | |
| 564 | enum 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 | eArgTypeProtocol, |
| 668 | eArgTypeLastArg // Always keep this entry as the last entry in this |
| 669 | // enumeration!! |
| 670 | }; |
| 671 | |
| 672 | /// Symbol types. |
| 673 | // Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63 |
| 674 | // entries you will have to resize that field. |
| 675 | enum SymbolType { |
| 676 | eSymbolTypeAny = 0, |
| 677 | eSymbolTypeInvalid = 0, |
| 678 | eSymbolTypeAbsolute, |
| 679 | eSymbolTypeCode, |
| 680 | eSymbolTypeResolver, |
| 681 | eSymbolTypeData, |
| 682 | eSymbolTypeTrampoline, |
| 683 | eSymbolTypeRuntime, |
| 684 | eSymbolTypeException, |
| 685 | eSymbolTypeSourceFile, |
| 686 | , |
| 687 | eSymbolTypeObjectFile, |
| 688 | eSymbolTypeCommonBlock, |
| 689 | eSymbolTypeBlock, |
| 690 | eSymbolTypeLocal, |
| 691 | eSymbolTypeParam, |
| 692 | eSymbolTypeVariable, |
| 693 | eSymbolTypeVariableType, |
| 694 | eSymbolTypeLineEntry, |
| 695 | , |
| 696 | eSymbolTypeScopeBegin, |
| 697 | eSymbolTypeScopeEnd, |
| 698 | eSymbolTypeAdditional, ///< When symbols take more than one entry, the extra |
| 699 | ///< entries get this type |
| 700 | eSymbolTypeCompiler, |
| 701 | eSymbolTypeInstrumentation, |
| 702 | eSymbolTypeUndefined, |
| 703 | eSymbolTypeObjCClass, |
| 704 | eSymbolTypeObjCMetaClass, |
| 705 | eSymbolTypeObjCIVar, |
| 706 | eSymbolTypeReExported |
| 707 | }; |
| 708 | |
| 709 | enum SectionType { |
| 710 | eSectionTypeInvalid, |
| 711 | eSectionTypeCode, |
| 712 | eSectionTypeContainer, ///< The section contains child sections |
| 713 | eSectionTypeData, |
| 714 | eSectionTypeDataCString, ///< Inlined C string data |
| 715 | eSectionTypeDataCStringPointers, ///< Pointers to C string data |
| 716 | eSectionTypeDataSymbolAddress, ///< Address of a symbol in the symbol table |
| 717 | eSectionTypeData4, |
| 718 | eSectionTypeData8, |
| 719 | eSectionTypeData16, |
| 720 | eSectionTypeDataPointers, |
| 721 | eSectionTypeDebug, |
| 722 | eSectionTypeZeroFill, |
| 723 | eSectionTypeDataObjCMessageRefs, ///< Pointer to function pointer + selector |
| 724 | eSectionTypeDataObjCCFStrings, ///< Objective-C const CFString/NSString |
| 725 | ///< objects |
| 726 | eSectionTypeDWARFDebugAbbrev, |
| 727 | eSectionTypeDWARFDebugAddr, |
| 728 | eSectionTypeDWARFDebugAranges, |
| 729 | eSectionTypeDWARFDebugCuIndex, |
| 730 | eSectionTypeDWARFDebugFrame, |
| 731 | eSectionTypeDWARFDebugInfo, |
| 732 | eSectionTypeDWARFDebugLine, |
| 733 | eSectionTypeDWARFDebugLoc, |
| 734 | eSectionTypeDWARFDebugMacInfo, |
| 735 | eSectionTypeDWARFDebugMacro, |
| 736 | eSectionTypeDWARFDebugPubNames, |
| 737 | eSectionTypeDWARFDebugPubTypes, |
| 738 | eSectionTypeDWARFDebugRanges, |
| 739 | eSectionTypeDWARFDebugStr, |
| 740 | eSectionTypeDWARFDebugStrOffsets, |
| 741 | eSectionTypeDWARFAppleNames, |
| 742 | eSectionTypeDWARFAppleTypes, |
| 743 | eSectionTypeDWARFAppleNamespaces, |
| 744 | eSectionTypeDWARFAppleObjC, |
| 745 | eSectionTypeELFSymbolTable, ///< Elf SHT_SYMTAB section |
| 746 | eSectionTypeELFDynamicSymbols, ///< Elf SHT_DYNSYM section |
| 747 | eSectionTypeELFRelocationEntries, ///< Elf SHT_REL or SHT_REL section |
| 748 | eSectionTypeELFDynamicLinkInfo, ///< Elf SHT_DYNAMIC section |
| 749 | eSectionTypeEHFrame, |
| 750 | eSectionTypeARMexidx, |
| 751 | eSectionTypeARMextab, |
| 752 | eSectionTypeCompactUnwind, ///< compact unwind section in Mach-O, |
| 753 | ///< __TEXT,__unwind_info |
| 754 | eSectionTypeGoSymtab, |
| 755 | eSectionTypeAbsoluteAddress, ///< Dummy section for symbols with absolute |
| 756 | ///< address |
| 757 | eSectionTypeDWARFGNUDebugAltLink, |
| 758 | eSectionTypeDWARFDebugTypes, ///< DWARF .debug_types section |
| 759 | eSectionTypeDWARFDebugNames, ///< DWARF v5 .debug_names |
| 760 | eSectionTypeOther, |
| 761 | eSectionTypeDWARFDebugLineStr, ///< DWARF v5 .debug_line_str |
| 762 | eSectionTypeDWARFDebugRngLists, ///< DWARF v5 .debug_rnglists |
| 763 | eSectionTypeDWARFDebugLocLists, ///< DWARF v5 .debug_loclists |
| 764 | eSectionTypeDWARFDebugAbbrevDwo, |
| 765 | eSectionTypeDWARFDebugInfoDwo, |
| 766 | eSectionTypeDWARFDebugStrDwo, |
| 767 | eSectionTypeDWARFDebugStrOffsetsDwo, |
| 768 | eSectionTypeDWARFDebugTypesDwo, |
| 769 | eSectionTypeDWARFDebugRngListsDwo, |
| 770 | eSectionTypeDWARFDebugLocDwo, |
| 771 | eSectionTypeDWARFDebugLocListsDwo, |
| 772 | eSectionTypeDWARFDebugTuIndex, |
| 773 | eSectionTypeCTF, |
| 774 | eSectionTypeLLDBTypeSummaries, |
| 775 | eSectionTypeLLDBFormatters, |
| 776 | eSectionTypeSwiftModules, |
| 777 | }; |
| 778 | |
| 779 | FLAGS_ENUM(EmulateInstructionOptions){ |
| 780 | eEmulateInstructionOptionNone = (0u), |
| 781 | eEmulateInstructionOptionAutoAdvancePC = (1u << 0), |
| 782 | eEmulateInstructionOptionIgnoreConditions = (1u << 1)}; |
| 783 | |
| 784 | FLAGS_ENUM(FunctionNameType){ |
| 785 | eFunctionNameTypeNone = 0u, |
| 786 | eFunctionNameTypeAuto = |
| 787 | (1u << 1), ///< Automatically figure out which FunctionNameType |
| 788 | ///< bits to set based on the function name. |
| 789 | eFunctionNameTypeFull = (1u << 2), ///< The function name. |
| 790 | ///< For C this is the same as just the name of the function For C++ this is |
| 791 | ///< the mangled or demangled version of the mangled name. For ObjC this is |
| 792 | ///< the full function signature with the + or - and the square brackets and |
| 793 | ///< the class and selector |
| 794 | eFunctionNameTypeBase = (1u |
| 795 | << 3), ///< The function name only, no namespaces |
| 796 | ///< or arguments and no class |
| 797 | ///< methods or selectors will be searched. |
| 798 | eFunctionNameTypeMethod = (1u << 4), ///< Find function by method name (C++) |
| 799 | ///< with no namespace or arguments |
| 800 | eFunctionNameTypeSelector = |
| 801 | (1u << 5), ///< Find function by selector name (ObjC) names |
| 802 | eFunctionNameTypeAny = |
| 803 | eFunctionNameTypeAuto ///< DEPRECATED: use eFunctionNameTypeAuto |
| 804 | }; |
| 805 | LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType) |
| 806 | |
| 807 | /// Basic types enumeration for the public API SBType::GetBasicType(). |
| 808 | enum BasicType { |
| 809 | eBasicTypeInvalid = 0, |
| 810 | eBasicTypeVoid = 1, |
| 811 | eBasicTypeChar, |
| 812 | eBasicTypeSignedChar, |
| 813 | eBasicTypeUnsignedChar, |
| 814 | eBasicTypeWChar, |
| 815 | eBasicTypeSignedWChar, |
| 816 | eBasicTypeUnsignedWChar, |
| 817 | eBasicTypeChar16, |
| 818 | eBasicTypeChar32, |
| 819 | eBasicTypeChar8, |
| 820 | eBasicTypeShort, |
| 821 | eBasicTypeUnsignedShort, |
| 822 | eBasicTypeInt, |
| 823 | eBasicTypeUnsignedInt, |
| 824 | eBasicTypeLong, |
| 825 | eBasicTypeUnsignedLong, |
| 826 | eBasicTypeLongLong, |
| 827 | eBasicTypeUnsignedLongLong, |
| 828 | eBasicTypeInt128, |
| 829 | eBasicTypeUnsignedInt128, |
| 830 | eBasicTypeBool, |
| 831 | eBasicTypeHalf, |
| 832 | eBasicTypeFloat, |
| 833 | eBasicTypeDouble, |
| 834 | eBasicTypeLongDouble, |
| 835 | eBasicTypeFloatComplex, |
| 836 | eBasicTypeDoubleComplex, |
| 837 | eBasicTypeLongDoubleComplex, |
| 838 | eBasicTypeObjCID, |
| 839 | eBasicTypeObjCClass, |
| 840 | eBasicTypeObjCSel, |
| 841 | eBasicTypeNullPtr, |
| 842 | eBasicTypeOther |
| 843 | }; |
| 844 | |
| 845 | /// Deprecated |
| 846 | enum TraceType { |
| 847 | eTraceTypeNone = 0, |
| 848 | |
| 849 | /// Intel Processor Trace |
| 850 | eTraceTypeProcessorTrace |
| 851 | }; |
| 852 | |
| 853 | enum StructuredDataType { |
| 854 | eStructuredDataTypeInvalid = -1, |
| 855 | eStructuredDataTypeNull = 0, |
| 856 | eStructuredDataTypeGeneric, |
| 857 | eStructuredDataTypeArray, |
| 858 | eStructuredDataTypeInteger, |
| 859 | eStructuredDataTypeFloat, |
| 860 | eStructuredDataTypeBoolean, |
| 861 | eStructuredDataTypeString, |
| 862 | eStructuredDataTypeDictionary, |
| 863 | eStructuredDataTypeSignedInteger, |
| 864 | eStructuredDataTypeUnsignedInteger = eStructuredDataTypeInteger, |
| 865 | }; |
| 866 | |
| 867 | FLAGS_ENUM(TypeClass){ |
| 868 | eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0), |
| 869 | eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2), |
| 870 | eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4), |
| 871 | eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6), |
| 872 | eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8), |
| 873 | eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10), |
| 874 | eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12), |
| 875 | eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14), |
| 876 | eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16), |
| 877 | eTypeClassVector = (1u << 17), |
| 878 | // Define the last type class as the MSBit of a 32 bit value |
| 879 | eTypeClassOther = (1u << 31), |
| 880 | // Define a mask that can be used for any type when finding types |
| 881 | eTypeClassAny = (0xffffffffu)}; |
| 882 | LLDB_MARK_AS_BITMASK_ENUM(TypeClass) |
| 883 | |
| 884 | enum TemplateArgumentKind { |
| 885 | eTemplateArgumentKindNull = 0, |
| 886 | eTemplateArgumentKindType, |
| 887 | eTemplateArgumentKindDeclaration, |
| 888 | eTemplateArgumentKindIntegral, |
| 889 | eTemplateArgumentKindTemplate, |
| 890 | eTemplateArgumentKindTemplateExpansion, |
| 891 | eTemplateArgumentKindExpression, |
| 892 | eTemplateArgumentKindPack, |
| 893 | eTemplateArgumentKindNullPtr, |
| 894 | eTemplateArgumentKindStructuralValue, |
| 895 | }; |
| 896 | |
| 897 | /// Type of match to be performed when looking for a formatter for a data type. |
| 898 | /// Used by classes like SBTypeNameSpecifier or lldb_private::TypeMatcher. |
| 899 | enum FormatterMatchType { |
| 900 | eFormatterMatchExact, |
| 901 | eFormatterMatchRegex, |
| 902 | eFormatterMatchCallback, |
| 903 | |
| 904 | eLastFormatterMatchType = eFormatterMatchCallback, |
| 905 | }; |
| 906 | |
| 907 | /// Options that can be set for a formatter to alter its behavior. Not |
| 908 | /// all of these are applicable to all formatter types. |
| 909 | FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u), |
| 910 | eTypeOptionCascade = (1u << 0), |
| 911 | eTypeOptionSkipPointers = (1u << 1), |
| 912 | eTypeOptionSkipReferences = (1u << 2), |
| 913 | eTypeOptionHideChildren = (1u << 3), |
| 914 | eTypeOptionHideValue = (1u << 4), |
| 915 | eTypeOptionShowOneLiner = (1u << 5), |
| 916 | eTypeOptionHideNames = (1u << 6), |
| 917 | eTypeOptionNonCacheable = (1u << 7), |
| 918 | eTypeOptionHideEmptyAggregates = (1u << 8), |
| 919 | eTypeOptionFrontEndWantsDereference = (1u << 9)}; |
| 920 | |
| 921 | /// This is the return value for frame comparisons. If you are comparing frame |
| 922 | /// A to frame B the following cases arise: |
| 923 | /// |
| 924 | /// 1) When frame A pushes frame B (or a frame that ends up pushing |
| 925 | /// B) A is Older than B. |
| 926 | /// |
| 927 | /// 2) When frame A pushed frame B (or if frameA is on the stack |
| 928 | /// but B is not) A is Younger than B. |
| 929 | /// |
| 930 | /// 3) When frame A and frame B have the same StackID, they are |
| 931 | /// Equal. |
| 932 | /// |
| 933 | /// 4) When frame A and frame B have the same immediate parent |
| 934 | /// frame, but are not equal, the comparison yields SameParent. |
| 935 | /// |
| 936 | /// 5) If the two frames are on different threads or processes the |
| 937 | /// comparison is Invalid. |
| 938 | /// |
| 939 | /// 6) If for some reason we can't figure out what went on, we |
| 940 | /// return Unknown. |
| 941 | enum FrameComparison { |
| 942 | eFrameCompareInvalid, |
| 943 | eFrameCompareUnknown, |
| 944 | eFrameCompareEqual, |
| 945 | eFrameCompareSameParent, |
| 946 | eFrameCompareYounger, |
| 947 | eFrameCompareOlder |
| 948 | }; |
| 949 | |
| 950 | /// File Permissions. |
| 951 | /// |
| 952 | /// Designed to mimic the unix file permission bits so they can be used with |
| 953 | /// functions that set 'mode_t' to certain values for permissions. |
| 954 | FLAGS_ENUM(FilePermissions){ |
| 955 | eFilePermissionsUserRead = (1u << 8), |
| 956 | eFilePermissionsUserWrite = (1u << 7), |
| 957 | eFilePermissionsUserExecute = (1u << 6), |
| 958 | eFilePermissionsGroupRead = (1u << 5), |
| 959 | eFilePermissionsGroupWrite = (1u << 4), |
| 960 | eFilePermissionsGroupExecute = (1u << 3), |
| 961 | eFilePermissionsWorldRead = (1u << 2), |
| 962 | eFilePermissionsWorldWrite = (1u << 1), |
| 963 | eFilePermissionsWorldExecute = (1u << 0), |
| 964 | |
| 965 | eFilePermissionsUserRW = (eFilePermissionsUserRead | |
| 966 | eFilePermissionsUserWrite | 0), |
| 967 | eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 | |
| 968 | eFilePermissionsUserExecute), |
| 969 | eFilePermissionsUserRWX = (eFilePermissionsUserRead | |
| 970 | eFilePermissionsUserWrite | |
| 971 | eFilePermissionsUserExecute), |
| 972 | |
| 973 | eFilePermissionsGroupRW = (eFilePermissionsGroupRead | |
| 974 | eFilePermissionsGroupWrite | 0), |
| 975 | eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 | |
| 976 | eFilePermissionsGroupExecute), |
| 977 | eFilePermissionsGroupRWX = (eFilePermissionsGroupRead | |
| 978 | eFilePermissionsGroupWrite | |
| 979 | eFilePermissionsGroupExecute), |
| 980 | |
| 981 | eFilePermissionsWorldRW = (eFilePermissionsWorldRead | |
| 982 | eFilePermissionsWorldWrite | 0), |
| 983 | eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 | |
| 984 | eFilePermissionsWorldExecute), |
| 985 | eFilePermissionsWorldRWX = (eFilePermissionsWorldRead | |
| 986 | eFilePermissionsWorldWrite | |
| 987 | eFilePermissionsWorldExecute), |
| 988 | |
| 989 | eFilePermissionsEveryoneR = (eFilePermissionsUserRead | |
| 990 | eFilePermissionsGroupRead | |
| 991 | eFilePermissionsWorldRead), |
| 992 | eFilePermissionsEveryoneW = (eFilePermissionsUserWrite | |
| 993 | eFilePermissionsGroupWrite | |
| 994 | eFilePermissionsWorldWrite), |
| 995 | eFilePermissionsEveryoneX = (eFilePermissionsUserExecute | |
| 996 | eFilePermissionsGroupExecute | |
| 997 | eFilePermissionsWorldExecute), |
| 998 | |
| 999 | eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR | |
| 1000 | eFilePermissionsEveryoneW | 0), |
| 1001 | eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 | |
| 1002 | eFilePermissionsEveryoneX), |
| 1003 | eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR | |
| 1004 | eFilePermissionsEveryoneW | |
| 1005 | eFilePermissionsEveryoneX), |
| 1006 | eFilePermissionsFileDefault = eFilePermissionsUserRW, |
| 1007 | eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX, |
| 1008 | }; |
| 1009 | |
| 1010 | /// Queue work item types. |
| 1011 | /// |
| 1012 | /// The different types of work that can be enqueued on a libdispatch aka Grand |
| 1013 | /// Central Dispatch (GCD) queue. |
| 1014 | enum QueueItemKind { |
| 1015 | eQueueItemKindUnknown = 0, |
| 1016 | eQueueItemKindFunction, |
| 1017 | eQueueItemKindBlock |
| 1018 | }; |
| 1019 | |
| 1020 | /// Queue type. |
| 1021 | /// |
| 1022 | /// libdispatch aka Grand Central Dispatch (GCD) queues can be either |
| 1023 | /// serial (executing on one thread) or concurrent (executing on |
| 1024 | /// multiple threads). |
| 1025 | enum QueueKind { |
| 1026 | eQueueKindUnknown = 0, |
| 1027 | eQueueKindSerial, |
| 1028 | eQueueKindConcurrent |
| 1029 | }; |
| 1030 | |
| 1031 | /// Expression Evaluation Stages. |
| 1032 | /// |
| 1033 | /// These are the cancellable stages of expression evaluation, passed |
| 1034 | /// to the expression evaluation callback, so that you can interrupt |
| 1035 | /// expression evaluation at the various points in its lifecycle. |
| 1036 | enum ExpressionEvaluationPhase { |
| 1037 | eExpressionEvaluationParse = 0, |
| 1038 | eExpressionEvaluationIRGen, |
| 1039 | eExpressionEvaluationExecution, |
| 1040 | eExpressionEvaluationComplete |
| 1041 | }; |
| 1042 | |
| 1043 | /// Architecture-agnostic categorization of instructions for traversing the |
| 1044 | /// control flow of a trace. |
| 1045 | /// |
| 1046 | /// A single instruction can match one or more of these categories. |
| 1047 | enum InstructionControlFlowKind { |
| 1048 | /// The instruction could not be classified. |
| 1049 | eInstructionControlFlowKindUnknown = 0, |
| 1050 | /// The instruction is something not listed below, i.e. it's a sequential |
| 1051 | /// instruction that doesn't affect the control flow of the program. |
| 1052 | eInstructionControlFlowKindOther, |
| 1053 | /// The instruction is a near (function) call. |
| 1054 | eInstructionControlFlowKindCall, |
| 1055 | /// The instruction is a near (function) return. |
| 1056 | eInstructionControlFlowKindReturn, |
| 1057 | /// The instruction is a near unconditional jump. |
| 1058 | eInstructionControlFlowKindJump, |
| 1059 | /// The instruction is a near conditional jump. |
| 1060 | eInstructionControlFlowKindCondJump, |
| 1061 | /// The instruction is a call-like far transfer. |
| 1062 | /// E.g. SYSCALL, SYSENTER, or FAR CALL. |
| 1063 | eInstructionControlFlowKindFarCall, |
| 1064 | /// The instruction is a return-like far transfer. |
| 1065 | /// E.g. SYSRET, SYSEXIT, IRET, or FAR RET. |
| 1066 | eInstructionControlFlowKindFarReturn, |
| 1067 | /// The instruction is a jump-like far transfer. |
| 1068 | /// E.g. FAR JMP. |
| 1069 | eInstructionControlFlowKindFarJump |
| 1070 | }; |
| 1071 | |
| 1072 | /// Watchpoint Kind. |
| 1073 | /// |
| 1074 | /// Indicates what types of events cause the watchpoint to fire. Used by Native |
| 1075 | /// *Protocol-related classes. |
| 1076 | FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0), |
| 1077 | eWatchpointKindRead = (1u << 1)}; |
| 1078 | |
| 1079 | enum GdbSignal { |
| 1080 | eGdbSignalBadAccess = 0x91, |
| 1081 | eGdbSignalBadInstruction = 0x92, |
| 1082 | eGdbSignalArithmetic = 0x93, |
| 1083 | eGdbSignalEmulation = 0x94, |
| 1084 | eGdbSignalSoftware = 0x95, |
| 1085 | eGdbSignalBreakpoint = 0x96 |
| 1086 | }; |
| 1087 | |
| 1088 | /// Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are |
| 1089 | /// related to LLDB on the current host machine. Most files are |
| 1090 | /// relative to LLDB or are in known locations. |
| 1091 | enum PathType { |
| 1092 | ePathTypeLLDBShlibDir, ///< The directory where the lldb.so (unix) or LLDB |
| 1093 | ///< mach-o file in LLDB.framework (MacOSX) exists |
| 1094 | ePathTypeSupportExecutableDir, ///< Find LLDB support executable directory |
| 1095 | ///< (debugserver, etc) |
| 1096 | , ///< Find LLDB header file directory |
| 1097 | ePathTypePythonDir, ///< Find Python modules (PYTHONPATH) directory |
| 1098 | ePathTypeLLDBSystemPlugins, ///< System plug-ins directory |
| 1099 | ePathTypeLLDBUserPlugins, ///< User plug-ins directory |
| 1100 | ePathTypeLLDBTempSystemDir, ///< The LLDB temp directory for this system that |
| 1101 | ///< will be cleaned up on exit |
| 1102 | ePathTypeGlobalLLDBTempSystemDir, ///< The LLDB temp directory for this |
| 1103 | ///< system, NOT cleaned up on a process |
| 1104 | ///< exit. |
| 1105 | ePathTypeClangDir ///< Find path to Clang builtin headers |
| 1106 | }; |
| 1107 | |
| 1108 | /// Kind of member function. |
| 1109 | /// |
| 1110 | /// Used by the type system. |
| 1111 | enum MemberFunctionKind { |
| 1112 | eMemberFunctionKindUnknown = 0, ///< Not sure what the type of this is |
| 1113 | eMemberFunctionKindConstructor, ///< A function used to create instances |
| 1114 | eMemberFunctionKindDestructor, ///< A function used to tear down existing |
| 1115 | ///< instances |
| 1116 | eMemberFunctionKindInstanceMethod, ///< A function that applies to a specific |
| 1117 | ///< instance |
| 1118 | eMemberFunctionKindStaticMethod ///< A function that applies to a type rather |
| 1119 | ///< than any instance |
| 1120 | }; |
| 1121 | |
| 1122 | /// String matching algorithm used by SBTarget. |
| 1123 | enum MatchType { |
| 1124 | eMatchTypeNormal, |
| 1125 | eMatchTypeRegex, |
| 1126 | eMatchTypeStartsWith, |
| 1127 | eMatchTypeRegexInsensitive |
| 1128 | }; |
| 1129 | |
| 1130 | /// Bitmask that describes details about a type. |
| 1131 | FLAGS_ENUM(TypeFlags){ |
| 1132 | eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1), |
| 1133 | eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3), |
| 1134 | eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5), |
| 1135 | eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7), |
| 1136 | eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9), |
| 1137 | eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11), |
| 1138 | eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13), |
| 1139 | eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15), |
| 1140 | eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17), |
| 1141 | eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19), |
| 1142 | eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21), |
| 1143 | eTypeInstanceIsPointer = (1u << 22)}; |
| 1144 | |
| 1145 | FLAGS_ENUM(CommandFlags){ |
| 1146 | /// eCommandRequiresTarget |
| 1147 | /// |
| 1148 | /// Ensures a valid target is contained in m_exe_ctx prior to executing the |
| 1149 | /// command. If a target doesn't exist or is invalid, the command will fail |
| 1150 | /// and CommandObject::GetInvalidTargetDescription() will be returned as the |
| 1151 | /// error. CommandObject subclasses can override the virtual function for |
| 1152 | /// GetInvalidTargetDescription() to provide custom strings when needed. |
| 1153 | eCommandRequiresTarget = (1u << 0), |
| 1154 | /// eCommandRequiresProcess |
| 1155 | /// |
| 1156 | /// Ensures a valid process is contained in m_exe_ctx prior to executing the |
| 1157 | /// command. If a process doesn't exist or is invalid, the command will fail |
| 1158 | /// and CommandObject::GetInvalidProcessDescription() will be returned as |
| 1159 | /// the error. CommandObject subclasses can override the virtual function |
| 1160 | /// for GetInvalidProcessDescription() to provide custom strings when |
| 1161 | /// needed. |
| 1162 | eCommandRequiresProcess = (1u << 1), |
| 1163 | /// eCommandRequiresThread |
| 1164 | /// |
| 1165 | /// Ensures a valid thread is contained in m_exe_ctx prior to executing the |
| 1166 | /// command. If a thread doesn't exist or is invalid, the command will fail |
| 1167 | /// and CommandObject::GetInvalidThreadDescription() will be returned as the |
| 1168 | /// error. CommandObject subclasses can override the virtual function for |
| 1169 | /// GetInvalidThreadDescription() to provide custom strings when needed. |
| 1170 | eCommandRequiresThread = (1u << 2), |
| 1171 | /// eCommandRequiresFrame |
| 1172 | /// |
| 1173 | /// Ensures a valid frame is contained in m_exe_ctx prior to executing the |
| 1174 | /// command. If a frame doesn't exist or is invalid, the command will fail |
| 1175 | /// and CommandObject::GetInvalidFrameDescription() will be returned as the |
| 1176 | /// error. CommandObject subclasses can override the virtual function for |
| 1177 | /// GetInvalidFrameDescription() to provide custom strings when needed. |
| 1178 | eCommandRequiresFrame = (1u << 3), |
| 1179 | /// eCommandRequiresRegContext |
| 1180 | /// |
| 1181 | /// Ensures a valid register context (from the selected frame if there is a |
| 1182 | /// frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is |
| 1183 | /// available from m_exe_ctx prior to executing the command. If a target |
| 1184 | /// doesn't exist or is invalid, the command will fail and |
| 1185 | /// CommandObject::GetInvalidRegContextDescription() will be returned as the |
| 1186 | /// error. CommandObject subclasses can override the virtual function for |
| 1187 | /// GetInvalidRegContextDescription() to provide custom strings when needed. |
| 1188 | eCommandRequiresRegContext = (1u << 4), |
| 1189 | /// eCommandTryTargetAPILock |
| 1190 | /// |
| 1191 | /// Attempts to acquire the target lock if a target is selected in the |
| 1192 | /// command interpreter. If the command object fails to acquire the API |
| 1193 | /// lock, the command will fail with an appropriate error message. |
| 1194 | eCommandTryTargetAPILock = (1u << 5), |
| 1195 | /// eCommandProcessMustBeLaunched |
| 1196 | /// |
| 1197 | /// Verifies that there is a launched process in m_exe_ctx, if there isn't, |
| 1198 | /// the command will fail with an appropriate error message. |
| 1199 | eCommandProcessMustBeLaunched = (1u << 6), |
| 1200 | /// eCommandProcessMustBePaused |
| 1201 | /// |
| 1202 | /// Verifies that there is a paused process in m_exe_ctx, if there isn't, |
| 1203 | /// the command will fail with an appropriate error message. |
| 1204 | eCommandProcessMustBePaused = (1u << 7), |
| 1205 | /// eCommandProcessMustBeTraced |
| 1206 | /// |
| 1207 | /// Verifies that the process is being traced by a Trace plug-in, if it |
| 1208 | /// isn't the command will fail with an appropriate error message. |
| 1209 | eCommandProcessMustBeTraced = (1u << 8)}; |
| 1210 | |
| 1211 | /// Whether a summary should cap how much data it returns to users or not. |
| 1212 | enum TypeSummaryCapping { |
| 1213 | eTypeSummaryCapped = true, |
| 1214 | eTypeSummaryUncapped = false |
| 1215 | }; |
| 1216 | |
| 1217 | /// The result from a command interpreter run. |
| 1218 | enum CommandInterpreterResult { |
| 1219 | /// Command interpreter finished successfully. |
| 1220 | eCommandInterpreterResultSuccess, |
| 1221 | /// Stopped because the corresponding option was set and the inferior |
| 1222 | /// crashed. |
| 1223 | eCommandInterpreterResultInferiorCrash, |
| 1224 | /// Stopped because the corresponding option was set and a command returned |
| 1225 | /// an error. |
| 1226 | eCommandInterpreterResultCommandError, |
| 1227 | /// Stopped because quit was requested. |
| 1228 | eCommandInterpreterResultQuitRequested, |
| 1229 | }; |
| 1230 | |
| 1231 | // Style of core file to create when calling SaveCore. |
| 1232 | enum SaveCoreStyle { |
| 1233 | eSaveCoreUnspecified = 0, |
| 1234 | eSaveCoreFull = 1, |
| 1235 | eSaveCoreDirtyOnly = 2, |
| 1236 | eSaveCoreStackOnly = 3, |
| 1237 | eSaveCoreCustomOnly = 4, |
| 1238 | }; |
| 1239 | |
| 1240 | /// Events that might happen during a trace session. |
| 1241 | enum TraceEvent { |
| 1242 | /// Tracing was disabled for some time due to a software trigger. |
| 1243 | eTraceEventDisabledSW, |
| 1244 | /// Tracing was disable for some time due to a hardware trigger. |
| 1245 | eTraceEventDisabledHW, |
| 1246 | /// Event due to CPU change for a thread. This event is also fired when |
| 1247 | /// suddenly it's not possible to identify the cpu of a given thread. |
| 1248 | eTraceEventCPUChanged, |
| 1249 | /// Event due to a CPU HW clock tick. |
| 1250 | eTraceEventHWClockTick, |
| 1251 | /// The underlying tracing technology emitted a synchronization event used by |
| 1252 | /// trace processors. |
| 1253 | eTraceEventSyncPoint, |
| 1254 | }; |
| 1255 | |
| 1256 | // Enum used to identify which kind of item a \a TraceCursor is pointing at |
| 1257 | enum TraceItemKind { |
| 1258 | eTraceItemKindError = 0, |
| 1259 | eTraceItemKindEvent, |
| 1260 | eTraceItemKindInstruction, |
| 1261 | }; |
| 1262 | |
| 1263 | /// Enum to indicate the reference point when invoking |
| 1264 | /// \a TraceCursor::Seek(). |
| 1265 | /// The following values are inspired by \a std::istream::seekg. |
| 1266 | enum TraceCursorSeekType { |
| 1267 | /// The beginning of the trace, i.e the oldest item. |
| 1268 | eTraceCursorSeekTypeBeginning = 0, |
| 1269 | /// The current position in the trace. |
| 1270 | eTraceCursorSeekTypeCurrent, |
| 1271 | /// The end of the trace, i.e the most recent item. |
| 1272 | eTraceCursorSeekTypeEnd |
| 1273 | }; |
| 1274 | |
| 1275 | /// Enum to control the verbosity level of `dwim-print` execution. |
| 1276 | enum DWIMPrintVerbosity { |
| 1277 | /// Run `dwim-print` with no verbosity. |
| 1278 | eDWIMPrintVerbosityNone, |
| 1279 | /// Print a message when `dwim-print` uses `expression` evaluation. |
| 1280 | eDWIMPrintVerbosityExpression, |
| 1281 | /// Always print a message indicating how `dwim-print` is evaluating its |
| 1282 | /// expression. |
| 1283 | eDWIMPrintVerbosityFull, |
| 1284 | }; |
| 1285 | |
| 1286 | enum WatchpointValueKind { |
| 1287 | eWatchPointValueKindInvalid = 0, |
| 1288 | ///< Watchpoint was created watching a variable |
| 1289 | eWatchPointValueKindVariable = 1, |
| 1290 | ///< Watchpoint was created watching the result of an expression that was |
| 1291 | ///< evaluated at creation time. |
| 1292 | eWatchPointValueKindExpression = 2, |
| 1293 | }; |
| 1294 | |
| 1295 | enum CompletionType { |
| 1296 | eNoCompletion = 0ul, |
| 1297 | eSourceFileCompletion = (1ul << 0), |
| 1298 | eDiskFileCompletion = (1ul << 1), |
| 1299 | eDiskDirectoryCompletion = (1ul << 2), |
| 1300 | eSymbolCompletion = (1ul << 3), |
| 1301 | eModuleCompletion = (1ul << 4), |
| 1302 | eSettingsNameCompletion = (1ul << 5), |
| 1303 | ePlatformPluginCompletion = (1ul << 6), |
| 1304 | eArchitectureCompletion = (1ul << 7), |
| 1305 | eVariablePathCompletion = (1ul << 8), |
| 1306 | eRegisterCompletion = (1ul << 9), |
| 1307 | eBreakpointCompletion = (1ul << 10), |
| 1308 | eProcessPluginCompletion = (1ul << 11), |
| 1309 | eDisassemblyFlavorCompletion = (1ul << 12), |
| 1310 | eTypeLanguageCompletion = (1ul << 13), |
| 1311 | eFrameIndexCompletion = (1ul << 14), |
| 1312 | eModuleUUIDCompletion = (1ul << 15), |
| 1313 | eStopHookIDCompletion = (1ul << 16), |
| 1314 | eThreadIndexCompletion = (1ul << 17), |
| 1315 | eWatchpointIDCompletion = (1ul << 18), |
| 1316 | eBreakpointNameCompletion = (1ul << 19), |
| 1317 | eProcessIDCompletion = (1ul << 20), |
| 1318 | eProcessNameCompletion = (1ul << 21), |
| 1319 | eRemoteDiskFileCompletion = (1ul << 22), |
| 1320 | eRemoteDiskDirectoryCompletion = (1ul << 23), |
| 1321 | eTypeCategoryNameCompletion = (1ul << 24), |
| 1322 | eCustomCompletion = (1ul << 25), |
| 1323 | eThreadIDCompletion = (1ul << 26), |
| 1324 | // This last enum element is just for input validation. |
| 1325 | // Add new completions before this element, |
| 1326 | // and then increment eTerminatorCompletion's shift value |
| 1327 | eTerminatorCompletion = (1ul << 27) |
| 1328 | }; |
| 1329 | |
| 1330 | /// Specifies if children need to be re-computed |
| 1331 | /// after a call to \ref SyntheticChildrenFrontEnd::Update. |
| 1332 | enum ChildCacheState { |
| 1333 | eRefetch = 0, ///< Children need to be recomputed dynamically. |
| 1334 | |
| 1335 | eReuse = 1, ///< Children did not change and don't need to be recomputed; |
| 1336 | ///< re-use what we computed the last time we called Update. |
| 1337 | }; |
| 1338 | |
| 1339 | enum SymbolDownload { |
| 1340 | eSymbolDownloadOff = 0, |
| 1341 | eSymbolDownloadBackground = 1, |
| 1342 | eSymbolDownloadForeground = 2, |
| 1343 | }; |
| 1344 | |
| 1345 | /// Used in the SBProcess AddressMask/FixAddress methods. |
| 1346 | enum AddressMaskType { |
| 1347 | eAddressMaskTypeCode = 0, |
| 1348 | eAddressMaskTypeData, |
| 1349 | eAddressMaskTypeAny, |
| 1350 | eAddressMaskTypeAll = eAddressMaskTypeAny |
| 1351 | }; |
| 1352 | |
| 1353 | /// Used in the SBProcess AddressMask/FixAddress methods. |
| 1354 | enum AddressMaskRange { |
| 1355 | eAddressMaskRangeLow = 0, |
| 1356 | eAddressMaskRangeHigh, |
| 1357 | eAddressMaskRangeAny, |
| 1358 | eAddressMaskRangeAll = eAddressMaskRangeAny, |
| 1359 | }; |
| 1360 | |
| 1361 | /// Used by the debugger to indicate which events are being broadcasted. |
| 1362 | enum DebuggerBroadcastBit { |
| 1363 | eBroadcastBitProgress = (1 << 0), |
| 1364 | eBroadcastBitWarning = (1 << 1), |
| 1365 | eBroadcastBitError = (1 << 2), |
| 1366 | eBroadcastSymbolChange = (1 << 3), |
| 1367 | eBroadcastBitProgressCategory = (1 << 4), ///< Deprecated |
| 1368 | eBroadcastBitExternalProgress = (1 << 5), |
| 1369 | eBroadcastBitExternalProgressCategory = (1 << 6), ///< Deprecated |
| 1370 | }; |
| 1371 | |
| 1372 | /// Used for expressing severity in logs and diagnostics. |
| 1373 | enum Severity { |
| 1374 | eSeverityError, |
| 1375 | eSeverityWarning, |
| 1376 | eSeverityInfo, // Equivalent to Remark used in clang. |
| 1377 | }; |
| 1378 | |
| 1379 | /// Callback return value, indicating whether it handled printing the |
| 1380 | /// CommandReturnObject or deferred doing so to the CommandInterpreter. |
| 1381 | enum CommandReturnObjectCallbackResult { |
| 1382 | /// The callback deferred printing the command return object. |
| 1383 | eCommandReturnObjectPrintCallbackSkipped = 0, |
| 1384 | /// The callback handled printing the command return object. |
| 1385 | eCommandReturnObjectPrintCallbackHandled = 1, |
| 1386 | }; |
| 1387 | |
| 1388 | /// Used to determine when to show disassembly. |
| 1389 | enum StopDisassemblyType { |
| 1390 | eStopDisassemblyTypeNever = 0, |
| 1391 | eStopDisassemblyTypeNoDebugInfo, |
| 1392 | eStopDisassemblyTypeNoSource, |
| 1393 | eStopDisassemblyTypeAlways |
| 1394 | }; |
| 1395 | |
| 1396 | } // namespace lldb |
| 1397 | |
| 1398 | #endif // LLDB_LLDB_ENUMERATIONS_H |
| 1399 | |