lldb-enumerations.h revision 3f69eacbb218a37390822c89d3675bd740590382
1//===-- lldb-enumerations.h -------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef LLDB_lldb_enumerations_h_ 11#define LLDB_lldb_enumerations_h_ 12 13namespace lldb { 14 15 //---------------------------------------------------------------------- 16 // Process and Thread States 17 //---------------------------------------------------------------------- 18 typedef enum StateType 19 { 20 eStateInvalid = 0, 21 eStateUnloaded, ///< Process is object is valid, but not currently loaded 22 eStateConnected, ///< Process is connected to remote debug services, but not launched or attached to anything yet 23 eStateAttaching, ///< Process is currently trying to attach 24 eStateLaunching, ///< Process is in the process of launching 25 eStateStopped, ///< Process or thread is stopped and can be examined. 26 eStateRunning, ///< Process or thread is running and can't be examined. 27 eStateStepping, ///< Process or thread is in the process of stepping and can not be examined. 28 eStateCrashed, ///< Process or thread has crashed and can be examined. 29 eStateDetached, ///< Process has been detached and can't be examined. 30 eStateExited, ///< Process has exited and can't be examined. 31 eStateSuspended ///< Process or thread is in a suspended state as far 32 ///< as the debugger is concerned while other processes 33 ///< or threads get the chance to run. 34 } StateType; 35 36 //---------------------------------------------------------------------- 37 // Launch Flags 38 //---------------------------------------------------------------------- 39 typedef enum LaunchFlags 40 { 41 eLaunchFlagNone = 0u, 42 eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling process into a new process 43 eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to allow the process to be debugged 44 eLaunchFlagStopAtEntry = (1u << 2), ///< Stop at the program entry point instead of auto-continuing when launching or attaching at entry point 45 eLaunchFlagDisableASLR = (1u << 3), ///< Disable Address Space Layout Randomization 46 eLaunchFlagDisableSTDIO = (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app) 47 eLaunchFlagLaunchInTTY = (1u << 5), ///< Launch the process in a new TTY if supported by the host 48 eLaunchFlagLaunchInShell= (1u << 6) ///< Launch the process inside a shell to get shell expansion 49 } LaunchFlags; 50 51 //---------------------------------------------------------------------- 52 // Thread Run Modes 53 //---------------------------------------------------------------------- 54 typedef enum RunMode { 55 eOnlyThisThread, 56 eAllThreads, 57 eOnlyDuringStepping 58 } RunMode; 59 60 //---------------------------------------------------------------------- 61 // Byte ordering definitions 62 //---------------------------------------------------------------------- 63 typedef enum ByteOrder 64 { 65 eByteOrderInvalid = 0, 66 eByteOrderBig = 1, 67 eByteOrderPDP = 2, 68 eByteOrderLittle = 4 69 } ByteOrder; 70 71 //---------------------------------------------------------------------- 72 // Register encoding definitions 73 //---------------------------------------------------------------------- 74 typedef enum Encoding 75 { 76 eEncodingInvalid = 0, 77 eEncodingUint, // unsigned integer 78 eEncodingSint, // signed integer 79 eEncodingIEEE754, // float 80 eEncodingVector // vector registers 81 } Encoding; 82 83 //---------------------------------------------------------------------- 84 // Display format definitions 85 //---------------------------------------------------------------------- 86 typedef enum Format 87 { 88 eFormatDefault = 0, 89 eFormatInvalid = 0, 90 eFormatBoolean, 91 eFormatBinary, 92 eFormatBytes, 93 eFormatBytesWithASCII, 94 eFormatChar, 95 eFormatCharPrintable, // Only printable characters, space if not printable 96 eFormatComplex, // Floating point complex type 97 eFormatComplexFloat = eFormatComplex, 98 eFormatCString, // NULL terminated C strings 99 eFormatDecimal, 100 eFormatEnum, 101 eFormatHex, 102 eFormatFloat, 103 eFormatOctal, 104 eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc... 105 eFormatUnicode16, 106 eFormatUnicode32, 107 eFormatUnsigned, 108 eFormatPointer, 109 eFormatVectorOfChar, 110 eFormatVectorOfSInt8, 111 eFormatVectorOfUInt8, 112 eFormatVectorOfSInt16, 113 eFormatVectorOfUInt16, 114 eFormatVectorOfSInt32, 115 eFormatVectorOfUInt32, 116 eFormatVectorOfSInt64, 117 eFormatVectorOfUInt64, 118 eFormatVectorOfFloat32, 119 eFormatVectorOfFloat64, 120 eFormatVectorOfUInt128, 121 eFormatComplexInteger, // Integer complex type 122 eFormatCharArray, // Print characters with no single quotes, used for character arrays that can contain non printable characters 123 eFormatAddressInfo, // Describe what an address points to (func + offset with file/line, symbol + offset, data, etc) 124 eFormatHexFloat, // ISO C99 hex float string 125 eFormatInstruction, // Disassemble an opcode 126 kNumFormats 127 } Format; 128 129 //---------------------------------------------------------------------- 130 // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls 131 //---------------------------------------------------------------------- 132 typedef enum DescriptionLevel 133 { 134 eDescriptionLevelBrief = 0, 135 eDescriptionLevelFull, 136 eDescriptionLevelVerbose, 137 kNumDescriptionLevels 138 } DescriptionLevel; 139 140 //---------------------------------------------------------------------- 141 // Script interpreter types 142 //---------------------------------------------------------------------- 143 typedef enum ScriptLanguage 144 { 145 eScriptLanguageNone, 146 eScriptLanguagePython, 147 eScriptLanguageDefault = eScriptLanguagePython 148 } ScriptLanguage; 149 150 //---------------------------------------------------------------------- 151 // Register numbering types 152 //---------------------------------------------------------------------- 153 typedef enum RegisterKind 154 { 155 eRegisterKindGCC = 0, // the register numbers seen in eh_frame 156 eRegisterKindDWARF, // the register numbers seen DWARF 157 eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target 158 eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers?) 159 eRegisterKindLLDB, // lldb's internal register numbers 160 kNumRegisterKinds 161 } RegisterKind; 162 163 //---------------------------------------------------------------------- 164 // Thread stop reasons 165 //---------------------------------------------------------------------- 166 typedef enum StopReason 167 { 168 eStopReasonInvalid = 0, 169 eStopReasonNone, 170 eStopReasonTrace, 171 eStopReasonBreakpoint, 172 eStopReasonWatchpoint, 173 eStopReasonSignal, 174 eStopReasonException, 175 eStopReasonPlanComplete 176 } StopReason; 177 178 //---------------------------------------------------------------------- 179 // Command Return Status Types 180 //---------------------------------------------------------------------- 181 typedef enum ReturnStatus 182 { 183 eReturnStatusInvalid, 184 eReturnStatusSuccessFinishNoResult, 185 eReturnStatusSuccessFinishResult, 186 eReturnStatusSuccessContinuingNoResult, 187 eReturnStatusSuccessContinuingResult, 188 eReturnStatusStarted, 189 eReturnStatusFailed, 190 eReturnStatusQuit 191 } ReturnStatus; 192 193 194 //---------------------------------------------------------------------- 195 // Connection Status Types 196 //---------------------------------------------------------------------- 197 typedef enum ConnectionStatus 198 { 199 eConnectionStatusSuccess, // Success 200 eConnectionStatusEndOfFile, // End-of-file encountered 201 eConnectionStatusError, // Check GetError() for details 202 eConnectionStatusTimedOut, // Request timed out 203 eConnectionStatusNoConnection, // No connection 204 eConnectionStatusLostConnection // Lost connection while connected to a valid connection 205 } ConnectionStatus; 206 207 typedef enum ErrorType 208 { 209 eErrorTypeInvalid, 210 eErrorTypeGeneric, ///< Generic errors that can be any value. 211 eErrorTypeMachKernel, ///< Mach kernel error codes. 212 eErrorTypePOSIX ///< POSIX error codes. 213 } ErrorType; 214 215 216 typedef enum ValueType 217 { 218 eValueTypeInvalid = 0, 219 eValueTypeVariableGlobal = 1, // globals variable 220 eValueTypeVariableStatic = 2, // static variable 221 eValueTypeVariableArgument = 3, // function argument variables 222 eValueTypeVariableLocal = 4, // function local variables 223 eValueTypeRegister = 5, // stack frame register value 224 eValueTypeRegisterSet = 6, // A collection of stack frame register values 225 eValueTypeConstResult = 7 // constant result variables 226 } ValueType; 227 228 //---------------------------------------------------------------------- 229 // Token size/granularities for Input Readers 230 //---------------------------------------------------------------------- 231 232 typedef enum InputReaderGranularity 233 { 234 eInputReaderGranularityInvalid = 0, 235 eInputReaderGranularityByte, 236 eInputReaderGranularityWord, 237 eInputReaderGranularityLine, 238 eInputReaderGranularityAll 239 } InputReaderGranularity; 240 241 //------------------------------------------------------------------ 242 /// These mask bits allow a common interface for queries that can 243 /// limit the amount of information that gets parsed to only the 244 /// information that is requested. These bits also can indicate what 245 /// actually did get resolved during query function calls. 246 /// 247 /// Each definition corresponds to a one of the member variables 248 /// in this class, and requests that that item be resolved, or 249 /// indicates that the member did get resolved. 250 //------------------------------------------------------------------ 251 typedef enum SymbolContextItem 252 { 253 eSymbolContextTarget = (1 << 0), ///< Set when \a target is requested from a query, or was located in query results 254 eSymbolContextModule = (1 << 1), ///< Set when \a module is requested from a query, or was located in query results 255 eSymbolContextCompUnit = (1 << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results 256 eSymbolContextFunction = (1 << 3), ///< Set when \a function is requested from a query, or was located in query results 257 eSymbolContextBlock = (1 << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results 258 eSymbolContextLineEntry = (1 << 5), ///< Set when \a line_entry is requested from a query, or was located in query results 259 eSymbolContextSymbol = (1 << 6), ///< Set when \a symbol is requested from a query, or was located in query results 260 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1) ///< Indicates to try and lookup everything up during a query. 261 } SymbolContextItem; 262 263 typedef enum Permissions 264 { 265 ePermissionsWritable = (1 << 0), 266 ePermissionsReadable = (1 << 1), 267 ePermissionsExecutable = (1 << 2) 268 } Permissions; 269 270 typedef enum InputReaderAction 271 { 272 eInputReaderActivate, // reader is newly pushed onto the reader stack 273 eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something 274 eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off 275 eInputReaderDeactivate, // another reader was pushed on the stack 276 eInputReaderGotToken, // reader got one of its tokens (granularity) 277 eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c) 278 eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d) 279 eInputReaderDone // reader was just popped off the stack and is done 280 } InputReaderAction; 281 282 typedef enum BreakpointEventType 283 { 284 eBreakpointEventTypeInvalidType = (1u << 0), 285 eBreakpointEventTypeAdded = (1u << 1), 286 eBreakpointEventTypeRemoved = (1u << 2), 287 eBreakpointEventTypeLocationsAdded = (1u << 3), 288 eBreakpointEventTypeLocationsRemoved = (1u << 4), 289 eBreakpointEventTypeLocationsResolved = (1u << 5) 290 } BreakpointEventType; 291 292 293 //---------------------------------------------------------------------- 294 /// Programming language type. 295 /// 296 /// These enumerations use the same language enumerations as the DWARF 297 /// specification for ease of use and consistency. 298 //---------------------------------------------------------------------- 299 typedef enum LanguageType 300 { 301 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value. 302 eLanguageTypeC89 = 0x0001, ///< ISO C:1989. 303 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R. 304 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983. 305 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998. 306 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974. 307 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985. 308 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77. 309 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90. 310 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983. 311 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996. 312 eLanguageTypeJava = 0x000b, ///< Java. 313 eLanguageTypeC99 = 0x000c, ///< ISO C:1999. 314 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995. 315 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95. 316 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976. 317 eLanguageTypeObjC = 0x0010, ///< Objective-C. 318 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++. 319 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C. 320 eLanguageTypeD = 0x0013, ///< D. 321 eLanguageTypePython = 0x0014 ///< Python. 322 } LanguageType; 323 324 typedef enum DynamicValueType 325 { 326 eNoDynamicValues = 0, 327 eDynamicCanRunTarget = 1, 328 eDynamicDontRunTarget = 2 329 } DynamicValueType; 330 331 typedef enum SyntheticValueType 332 { 333 eNoSyntheticFilter = false, 334 eUseSyntheticFilter = true 335 } SyntheticValueType; 336 337 typedef enum AccessType 338 { 339 eAccessNone, 340 eAccessPublic, 341 eAccessPrivate, 342 eAccessProtected, 343 eAccessPackage 344 } AccessType; 345 346 typedef enum CommandArgumentType 347 { 348 eArgTypeAddress = 0, 349 eArgTypeAliasName, 350 eArgTypeAliasOptions, 351 eArgTypeArchitecture, 352 eArgTypeBoolean, 353 eArgTypeBreakpointID, 354 eArgTypeBreakpointIDRange, 355 eArgTypeByteSize, 356 eArgTypeClassName, 357 eArgTypeCommandName, 358 eArgTypeCount, 359 eArgTypeEndAddress, 360 eArgTypeExpression, 361 eArgTypeExpressionPath, 362 eArgTypeExprFormat, 363 eArgTypeFilename, 364 eArgTypeFormat, 365 eArgTypeFrameIndex, 366 eArgTypeFullName, 367 eArgTypeFunctionName, 368 eArgTypeGDBFormat, 369 eArgTypeIndex, 370 eArgTypeLineNum, 371 eArgTypeLogCategory, 372 eArgTypeLogChannel, 373 eArgTypeMethod, 374 eArgTypeName, 375 eArgTypeNewPathPrefix, 376 eArgTypeNumLines, 377 eArgTypeNumberPerLine, 378 eArgTypeOffset, 379 eArgTypeOldPathPrefix, 380 eArgTypeOneLiner, 381 eArgTypePath, 382 eArgTypePid, 383 eArgTypePlugin, 384 eArgTypeProcessName, 385 eArgTypePythonClass, 386 eArgTypePythonFunction, 387 eArgTypePythonScript, 388 eArgTypeQueueName, 389 eArgTypeRegisterName, 390 eArgTypeRegularExpression, 391 eArgTypeRunArgs, 392 eArgTypeRunMode, 393 eArgTypeScriptedCommandSynchronicity, 394 eArgTypeScriptLang, 395 eArgTypeSearchWord, 396 eArgTypeSelector, 397 eArgTypeSettingIndex, 398 eArgTypeSettingKey, 399 eArgTypeSettingPrefix, 400 eArgTypeSettingVariableName, 401 eArgTypeShlibName, 402 eArgTypeSourceFile, 403 eArgTypeSortOrder, 404 eArgTypeStartAddress, 405 eArgTypeSummaryString, 406 eArgTypeSymbol, 407 eArgTypeThreadID, 408 eArgTypeThreadIndex, 409 eArgTypeThreadName, 410 eArgTypeUnsignedInteger, 411 eArgTypeUnixSignal, 412 eArgTypeVarName, 413 eArgTypeValue, 414 eArgTypeWidth, 415 eArgTypeNone, 416 eArgTypePlatform, 417 eArgTypeWatchpointID, 418 eArgTypeWatchpointIDRange, 419 eArgTypeWatchType, 420 eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!! 421 } CommandArgumentType; 422 423 //---------------------------------------------------------------------- 424 // Symbol types 425 //---------------------------------------------------------------------- 426 typedef enum SymbolType 427 { 428 eSymbolTypeAny = 0, 429 eSymbolTypeInvalid = 0, 430 eSymbolTypeAbsolute, 431 eSymbolTypeCode, 432 eSymbolTypeData, 433 eSymbolTypeTrampoline, 434 eSymbolTypeRuntime, 435 eSymbolTypeException, 436 eSymbolTypeSourceFile, 437 eSymbolTypeHeaderFile, 438 eSymbolTypeObjectFile, 439 eSymbolTypeCommonBlock, 440 eSymbolTypeBlock, 441 eSymbolTypeLocal, 442 eSymbolTypeParam, 443 eSymbolTypeVariable, 444 eSymbolTypeVariableType, 445 eSymbolTypeLineEntry, 446 eSymbolTypeLineHeader, 447 eSymbolTypeScopeBegin, 448 eSymbolTypeScopeEnd, 449 eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type 450 eSymbolTypeCompiler, 451 eSymbolTypeInstrumentation, 452 eSymbolTypeUndefined, 453 eSymbolTypeObjCClass, 454 eSymbolTypeObjCMetaClass, 455 eSymbolTypeObjCIVar 456 } SymbolType; 457 458 typedef enum SectionType 459 { 460 eSectionTypeInvalid, 461 eSectionTypeCode, 462 eSectionTypeContainer, // The section contains child sections 463 eSectionTypeData, 464 eSectionTypeDataCString, // Inlined C string data 465 eSectionTypeDataCStringPointers, // Pointers to C string data 466 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table 467 eSectionTypeData4, 468 eSectionTypeData8, 469 eSectionTypeData16, 470 eSectionTypeDataPointers, 471 eSectionTypeDebug, 472 eSectionTypeZeroFill, 473 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector 474 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects 475 eSectionTypeDWARFDebugAbbrev, 476 eSectionTypeDWARFDebugAranges, 477 eSectionTypeDWARFDebugFrame, 478 eSectionTypeDWARFDebugInfo, 479 eSectionTypeDWARFDebugLine, 480 eSectionTypeDWARFDebugLoc, 481 eSectionTypeDWARFDebugMacInfo, 482 eSectionTypeDWARFDebugPubNames, 483 eSectionTypeDWARFDebugPubTypes, 484 eSectionTypeDWARFDebugRanges, 485 eSectionTypeDWARFDebugStr, 486 eSectionTypeDWARFAppleNames, 487 eSectionTypeDWARFAppleTypes, 488 eSectionTypeDWARFAppleNamespaces, 489 eSectionTypeDWARFAppleObjC, 490 eSectionTypeEHFrame, 491 eSectionTypeOther 492 493 } SectionType; 494 495 typedef enum EmulateInstructionOptions 496 { 497 eEmulateInstructionOptionNone = (0u), 498 eEmulateInstructionOptionAutoAdvancePC = (1u << 0), 499 eEmulateInstructionOptionIgnoreConditions = (1u << 1) 500 } EmulateInstructionOptions; 501 502 typedef enum FunctionNameType 503 { 504 eFunctionNameTypeNone = 0u, 505 eFunctionNameTypeAuto = (1u << 1), // Automatically figure out which FunctionNameType 506 // bits to set based on the function name. 507 eFunctionNameTypeFull = (1u << 2), // The function name. 508 // For C this is the same as just the name of the function 509 // For C++ this is the mangled or demangled version of the mangled name. 510 // For ObjC this is the full function signature with the + or 511 // - and the square brackets and the class and selector 512 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces or arguments and no class 513 // methods or selectors will be searched. 514 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++) with no namespace or arguments 515 eFunctionNameTypeSelector = (1u << 5) // Find function by selector name (ObjC) names 516 } FunctionNameType; 517 518 519 //---------------------------------------------------------------------- 520 // Basic types enumeration for the public API SBType::GetBasicType() 521 //---------------------------------------------------------------------- 522 typedef enum BasicType 523 { 524 eBasicTypeInvalid = 0, 525 eBasicTypeVoid = 1, 526 eBasicTypeChar, 527 eBasicTypeSignedChar, 528 eBasicTypeWChar, 529 eBasicTypeChar16, 530 eBasicTypeChar32, 531 eBasicTypeShort, 532 eBasicTypeUnsignedShort, 533 eBasicTypeInt, 534 eBasicTypeUnsignedInt, 535 eBasicTypeLong, 536 eBasicTypeUnsignedLong, 537 eBasicTypeLongLong, 538 eBasicTypeUnsignedLongLong, 539 eBasicTypeInt128, 540 eBasicTypeUnsignedInt128, 541 eBasicTypeBool, 542 eBasicTypeFloat, 543 eBasicTypeDouble, 544 eBasicTypeLongDouble, 545 eBasicTypeFloatComplex, 546 eBasicTypeDoubleComplex, 547 eBasicTypeLongDoubleComplex, 548 eBasicTypeObjCID, 549 eBasicTypeObjCClass, 550 eBasicTypeObjCSel 551 } BasicType; 552 553 typedef enum TypeClass 554 { 555 eTypeClassInvalid = (0u), 556 eTypeClassArray = (1u << 0), 557 eTypeClassBlockPointer = (1u << 1), 558 eTypeClassBuiltin = (1u << 2), 559 eTypeClassClass = (1u << 3), 560 eTypeClassComplexFloat = (1u << 4), 561 eTypeClassComplexInteger = (1u << 5), 562 eTypeClassEnumeration = (1u << 6), 563 eTypeClassFunction = (1u << 7), 564 eTypeClassMemberPointer = (1u << 8), 565 eTypeClassObjCObject = (1u << 9), 566 eTypeClassObjCInterface = (1u << 10), 567 eTypeClassObjCObjectPointer = (1u << 11), 568 eTypeClassPointer = (1u << 12), 569 eTypeClassReference = (1u << 13), 570 eTypeClassStruct = (1u << 14), 571 eTypeClassTypedef = (1u << 15), 572 eTypeClassUnion = (1u << 16), 573 eTypeClassVector = (1u << 17), 574 // Define the last type class as the MSBit of a 32 bit value 575 eTypeClassOther = (1u << 31), 576 // Define a mask that can be used for any type when finding types 577 eTypeClassAny = (0xffffffffu) 578 }TypeClass; 579 580} // namespace lldb 581 582 583#endif // LLDB_lldb_enumerations_h_ 584