lldb-enumerations.h revision cd548034fa23113e995b8463d14f910ba2f7298c
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_enumerations_h_ 11#define LLDB_enumerations_h_ 12 13namespace lldb { 14 15//---------------------------------------------------------------------- 16// Process and Thread States 17//---------------------------------------------------------------------- 18typedef enum StateType 19{ 20 eStateInvalid = 0, 21 eStateUnloaded, 22 eStateAttaching, 23 eStateLaunching, 24 eStateStopped, 25 eStateRunning, 26 eStateStepping, 27 eStateCrashed, 28 eStateDetached, 29 eStateExited, 30 eStateSuspended 31} StateType; 32 33//---------------------------------------------------------------------- 34// Thread Step Types 35//---------------------------------------------------------------------- 36typedef enum StepType 37{ 38 eStepTypeNone, 39 eStepTypeTrace, ///< Single step one instruction. 40 eStepTypeTraceOver, ///< Single step one instruction, stepping over. 41 eStepTypeInto, ///< Single step into a specified context. 42 eStepTypeOver, ///< Single step over a specified context. 43 eStepTypeOut ///< Single step out a specified context. 44} StepType; 45 46//---------------------------------------------------------------------- 47// Launch Flags 48//---------------------------------------------------------------------- 49typedef enum LaunchFlags 50{ 51 eLaunchFlagNone = 0u, 52 eLaunchFlagDisableASLR = (1u << 0), ///< Disable Address Space Layout Randomization 53 eLaunchFlagDisableSTDIO = (1u << 1), ///< Disable stdio for inferior process (e.g. for a GUI app) 54 eLaunchFlagLaunchInTTY = (1u << 2) ///< Launch the process in a new TTY if supported by the host 55} LaunchFlags; 56 57//---------------------------------------------------------------------- 58// Thread Run Modes 59//---------------------------------------------------------------------- 60typedef enum RunMode { 61 eOnlyThisThread, 62 eAllThreads, 63 eOnlyDuringStepping 64} RunMode; 65 66//---------------------------------------------------------------------- 67// Address Types 68//---------------------------------------------------------------------- 69typedef enum AddressType 70{ 71 eAddressTypeInvalid = 0, 72 eAddressTypeFile, ///< Address is an address as found in an object or symbol file 73 eAddressTypeLoad, ///< Address is an address as in the current target inferior process 74 eAddressTypeHost ///< Address is an address in the process that is running this code 75} AddressType; 76 77//---------------------------------------------------------------------- 78// Byte ordering definitions 79//---------------------------------------------------------------------- 80typedef enum ByteOrder 81{ 82 eByteOrderInvalid = 0, 83 eByteOrderBig = 1, 84 eByteOrderPDP = 2, 85 eByteOrderLittle = 4, 86} ByteOrder; 87 88//---------------------------------------------------------------------- 89// Register encoding definitions 90//---------------------------------------------------------------------- 91typedef enum Encoding 92{ 93 eEncodingInvalid = 0, 94 eEncodingUint, // unsigned integer 95 eEncodingSint, // signed integer 96 eEncodingIEEE754, // float 97 eEncodingVector // vector registers 98} Encoding; 99 100//---------------------------------------------------------------------- 101// Display format definitions 102//---------------------------------------------------------------------- 103typedef enum Format 104{ 105 eFormatDefault = 0, 106 eFormatInvalid = 0, 107 eFormatBoolean, 108 eFormatBinary, 109 eFormatBytes, 110 eFormatBytesWithASCII, 111 eFormatChar, 112 eFormatCharPrintable, // Only printable characters, space if not printable 113 eFormatComplex, // Floating point complex type 114 eFormatComplexFloat = eFormatComplex, 115 eFormatCString, // NULL terminated C strings 116 eFormatDecimal, 117 eFormatEnum, 118 eFormatHex, 119 eFormatFloat, 120 eFormatOctal, 121 eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc... 122 eFormatUnicode16, 123 eFormatUnicode32, 124 eFormatUnsigned, 125 eFormatPointer, 126 eFormatVectorOfChar, 127 eFormatVectorOfSInt8, 128 eFormatVectorOfUInt8, 129 eFormatVectorOfSInt16, 130 eFormatVectorOfUInt16, 131 eFormatVectorOfSInt32, 132 eFormatVectorOfUInt32, 133 eFormatVectorOfSInt64, 134 eFormatVectorOfUInt64, 135 eFormatVectorOfFloat32, 136 eFormatVectorOfFloat64, 137 eFormatVectorOfUInt128, 138 eFormatComplexInteger // Integer complex type 139 140} Format; 141 142//---------------------------------------------------------------------- 143// Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls 144//---------------------------------------------------------------------- 145typedef enum DescriptionLevel 146{ 147 eDescriptionLevelBrief = 0, 148 eDescriptionLevelFull, 149 eDescriptionLevelVerbose, 150 kNumDescriptionLevels 151} DescriptionLevel; 152 153//---------------------------------------------------------------------- 154// Script interpreter types 155//---------------------------------------------------------------------- 156typedef enum ScriptLanguage 157{ 158 eScriptLanguageNone, 159 eScriptLanguagePython, 160 eScriptLanguageDefault = eScriptLanguagePython 161} ScriptLanguage; 162 163//---------------------------------------------------------------------- 164// Register numbering types 165//---------------------------------------------------------------------- 166typedef enum RegisterKind 167{ 168 eRegisterKindGCC = 0, // the register numbers seen in eh_frame 169 eRegisterKindDWARF, // the register numbers seen DWARF 170 eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target 171 eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers?) 172 eRegisterKindLLDB, // lldb's internal register numbers 173 kNumRegisterKinds 174} RegisterKind; 175 176//---------------------------------------------------------------------- 177// Thread stop reasons 178//---------------------------------------------------------------------- 179typedef enum StopReason 180{ 181 eStopReasonInvalid = 0, 182 eStopReasonNone, 183 eStopReasonTrace, 184 eStopReasonBreakpoint, 185 eStopReasonWatchpoint, 186 eStopReasonSignal, 187 eStopReasonException, 188 eStopReasonPlanComplete 189} StopReason; 190 191//---------------------------------------------------------------------- 192// Votes - Need a tri-state, yes, no, no opinion... 193//---------------------------------------------------------------------- 194typedef enum Vote 195{ 196 eVoteNo = -1, 197 eVoteNoOpinion = 0, 198 eVoteYes = 1 199} Vote; 200 201//---------------------------------------------------------------------- 202// Symbol types 203//---------------------------------------------------------------------- 204typedef enum SymbolType 205{ 206 eSymbolTypeAny = 0, 207 eSymbolTypeInvalid = 0, 208 eSymbolTypeAbsolute, 209 eSymbolTypeExtern, 210 eSymbolTypeCode, 211 eSymbolTypeData, 212 eSymbolTypeTrampoline, 213 eSymbolTypeRuntime, 214 eSymbolTypeException, 215 eSymbolTypeSourceFile, 216 eSymbolTypeHeaderFile, 217 eSymbolTypeObjectFile, 218 eSymbolTypeCommonBlock, 219 eSymbolTypeBlock, 220 eSymbolTypeLocal, 221 eSymbolTypeParam, 222 eSymbolTypeVariable, 223 eSymbolTypeVariableType, 224 eSymbolTypeLineEntry, 225 eSymbolTypeLineHeader, 226 eSymbolTypeScopeBegin, 227 eSymbolTypeScopeEnd, 228 eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type 229 eSymbolTypeCompiler, 230 eSymbolTypeInstrumentation, 231 eSymbolTypeUndefined 232} SymbolType; 233 234 235//---------------------------------------------------------------------- 236// Command Return Status Types 237//---------------------------------------------------------------------- 238typedef enum ReturnStatus 239{ 240 eReturnStatusInvalid, 241 eReturnStatusSuccessFinishNoResult, 242 eReturnStatusSuccessFinishResult, 243 eReturnStatusSuccessContinuingNoResult, 244 eReturnStatusSuccessContinuingResult, 245 eReturnStatusStarted, 246 eReturnStatusFailed, 247 eReturnStatusQuit 248} ReturnStatus; 249 250 251//---------------------------------------------------------------------- 252// Connection Status Types 253//---------------------------------------------------------------------- 254typedef enum ConnectionStatus 255{ 256 eConnectionStatusSuccess, // Success 257 eConnectionStatusEndOfFile, // End-of-file encountered 258 eConnectionStatusError, // Check GetError() for details 259 eConnectionStatusTimedOut, // Request timed out 260 eConnectionStatusNoConnection, // No connection 261 eConnectionStatusLostConnection // Lost connection while connected to a valid connection 262} ConnectionStatus; 263 264 265typedef enum ErrorType 266{ 267 eErrorTypeInvalid, 268 eErrorTypeGeneric, ///< Generic errors that can be any value. 269 eErrorTypeMachKernel, ///< Mach kernel error codes. 270 eErrorTypePOSIX ///< POSIX error codes. 271} ErrorType; 272 273 274typedef enum ValueType 275{ 276 eValueTypeInvalid = 0, 277 eValueTypeVariableGlobal = 1, // globals variable 278 eValueTypeVariableStatic = 2, // static variable 279 eValueTypeVariableArgument = 3, // function argument variables 280 eValueTypeVariableLocal = 4, // function local variables 281 eValueTypeRegister = 5, // stack frame register value 282 eValueTypeRegisterSet = 6, // A collection of stack frame register values 283 eValueTypeConstResult = 7 // constant result variables 284} ValueType; 285 286//---------------------------------------------------------------------- 287// Token size/granularities for Input Readers 288//---------------------------------------------------------------------- 289 290typedef enum InputReaderGranularity 291{ 292 eInputReaderGranularityInvalid = 0, 293 eInputReaderGranularityByte, 294 eInputReaderGranularityWord, 295 eInputReaderGranularityLine, 296 eInputReaderGranularityAll 297} InputReaderGranularity; 298 299//------------------------------------------------------------------ 300/// These mask bits allow a common interface for queries that can 301/// limit the amount of information that gets parsed to only the 302/// information that is requested. These bits also can indicate what 303/// actually did get resolved during query function calls. 304/// 305/// Each definition corresponds to a one of the member variables 306/// in this class, and requests that that item be resolved, or 307/// indicates that the member did get resolved. 308//------------------------------------------------------------------ 309typedef enum SymbolContextItem 310{ 311 eSymbolContextTarget = (1 << 0), ///< Set when \a target is requested from a query, or was located in query results 312 eSymbolContextModule = (1 << 1), ///< Set when \a module is requested from a query, or was located in query results 313 eSymbolContextCompUnit = (1 << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results 314 eSymbolContextFunction = (1 << 3), ///< Set when \a function is requested from a query, or was located in query results 315 eSymbolContextBlock = (1 << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results 316 eSymbolContextLineEntry = (1 << 5), ///< Set when \a line_entry is requested from a query, or was located in query results 317 eSymbolContextSymbol = (1 << 6), ///< Set when \a symbol is requested from a query, or was located in query results 318 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1) ///< Indicates to try and lookup everything up during a query. 319} SymbolContextItem; 320 321typedef enum Permissions 322{ 323 ePermissionsWritable = (1 << 0), 324 ePermissionsReadable = (1 << 1), 325 ePermissionsExecutable = (1 << 2) 326} Permissions; 327 328typedef enum SectionType 329{ 330 eSectionTypeInvalid, 331 eSectionTypeCode, 332 eSectionTypeContainer, // The section contains child sections 333 eSectionTypeData, 334 eSectionTypeDataCString, // Inlined C string data 335 eSectionTypeDataCStringPointers, // Pointers to C string data 336 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table 337 eSectionTypeData4, 338 eSectionTypeData8, 339 eSectionTypeData16, 340 eSectionTypeDataPointers, 341 eSectionTypeDebug, 342 eSectionTypeZeroFill, 343 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector 344 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects 345 eSectionTypeDWARFDebugAbbrev, 346 eSectionTypeDWARFDebugAranges, 347 eSectionTypeDWARFDebugFrame, 348 eSectionTypeDWARFDebugInfo, 349 eSectionTypeDWARFDebugLine, 350 eSectionTypeDWARFDebugLoc, 351 eSectionTypeDWARFDebugMacInfo, 352 eSectionTypeDWARFDebugPubNames, 353 eSectionTypeDWARFDebugPubTypes, 354 eSectionTypeDWARFDebugRanges, 355 eSectionTypeDWARFDebugStr, 356 eSectionTypeEHFrame, 357 eSectionTypeOther 358 359} SectionType; 360 361 362typedef enum InputReaderAction 363{ 364 eInputReaderActivate, // reader is newly pushed onto the reader stack 365 eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off 366 eInputReaderDeactivate, // another reader was pushed on the stack 367 eInputReaderGotToken, // reader got one of its tokens (granularity) 368 eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c) 369 eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d) 370 eInputReaderDone // reader was just popped off the stack and is done 371} InputReaderAction; 372 373 374typedef enum ArchitectureType 375{ 376 eArchTypeInvalid, 377 eArchTypeMachO, 378 eArchTypeELF, 379 kNumArchTypes 380} ArchitectureType; 381 382typedef enum FunctionNameType 383{ 384 eFunctionNameTypeNone = 0u, 385 eFunctionNameTypeAuto = (1u << 1), // Automatically figure out which FunctionNameType 386 // bits to set based on the function name. 387 eFunctionNameTypeFull = (1u << 2), // The function name. 388 // For C this is the same as just the name of the function 389 // For C++ this is the demangled version of the mangled name. 390 // For ObjC this is the full function signature with the + or 391 // - and the square brackets and the class and selector 392 eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces or arguments and no class 393 // methods or selectors will be searched. 394 eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++) with no namespace or arguments 395 eFunctionNameTypeSelector = (1u << 5) // Find function by selector name (ObjC) names 396} FunctionNameType; 397 398 399typedef enum BreakpointEventType 400{ 401 eBreakpointEventTypeInvalidType = (1u << 0), 402 eBreakpointEventTypeAdded = (1u << 1), 403 eBreakpointEventTypeRemoved = (1u << 2), 404 eBreakpointEventTypeLocationsAdded = (1u << 3), 405 eBreakpointEventTypeLocationsRemoved = (1u << 4), 406 eBreakpointEventTypeLocationsResolved = (1u << 5) 407} BreakpointEventType; 408 409 410//---------------------------------------------------------------------- 411/// Programming language type. 412/// 413/// These enumerations use the same language enumerations as the DWARF 414/// specification for ease of use and consistency. 415//---------------------------------------------------------------------- 416typedef enum LanguageType 417{ 418 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value. 419 eLanguageTypeC89 = 0x0001, ///< ISO C:1989. 420 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R. 421 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983. 422 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998. 423 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974. 424 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985. 425 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77. 426 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90. 427 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983. 428 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996. 429 eLanguageTypeJava = 0x000b, ///< Java. 430 eLanguageTypeC99 = 0x000c, ///< ISO C:1999. 431 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995. 432 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95. 433 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976. 434 eLanguageTypeObjC = 0x0010, ///< Objective-C. 435 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++. 436 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C. 437 eLanguageTypeD = 0x0013, ///< D. 438 eLanguageTypePython = 0x0014 ///< Python. 439} LanguageType; 440 441 442typedef enum AccessType 443{ 444 eAccessNone, 445 eAccessPublic, 446 eAccessPrivate, 447 eAccessProtected, 448 eAccessPackage 449} AccessType; 450 451//---------------------------------------------------------------------- 452/// Settable state variable types. 453/// 454//---------------------------------------------------------------------- 455 456typedef enum SettableVariableType 457{ 458 eSetVarTypeInt, 459 eSetVarTypeBoolean, 460 eSetVarTypeString, 461 eSetVarTypeArray, 462 eSetVarTypeDictionary, 463 eSetVarTypeEnum, 464 eSetVarTypeNone 465} SettableVariableType; 466 467typedef enum VarSetOperationType 468{ 469 eVarSetOperationReplace, 470 eVarSetOperationInsertBefore, 471 eVarSetOperationInsertAfter, 472 eVarSetOperationRemove, 473 eVarSetOperationAppend, 474 eVarSetOperationClear, 475 eVarSetOperationAssign, 476 eVarSetOperationInvalid 477} VarSetOperationType; 478 479//---------------------------------------------------------------------- 480/// Command argument types. 481/// 482//---------------------------------------------------------------------- 483 484typedef enum CommandArgumentType 485{ 486 eArgTypeAddress = 0, 487 eArgTypeAliasName, 488 eArgTypeAliasOptions, 489 eArgTypeArchitecture, 490 eArgTypeBoolean, 491 eArgTypeBreakpointID, 492 eArgTypeBreakpointIDRange, 493 eArgTypeByteSize, 494 eArgTypeCommandName, 495 eArgTypeCount, 496 eArgTypeEndAddress, 497 eArgTypeExpression, 498 eArgTypeExprFormat, 499 eArgTypeFilename, 500 eArgTypeFormat, 501 eArgTypeFrameIndex, 502 eArgTypeFullName, 503 eArgTypeFunctionName, 504 eArgTypeIndex, 505 eArgTypeLineNum, 506 eArgTypeLogCategory, 507 eArgTypeLogChannel, 508 eArgTypeMethod, 509 eArgTypeName, 510 eArgTypeNewPathPrefix, 511 eArgTypeNumLines, 512 eArgTypeNumberPerLine, 513 eArgTypeOffset, 514 eArgTypeOldPathPrefix, 515 eArgTypeOneLiner, 516 eArgTypePath, 517 eArgTypePid, 518 eArgTypePlugin, 519 eArgTypeProcessName, 520 eArgTypeQueueName, 521 eArgTypeRegisterName, 522 eArgTypeRegularExpression, 523 eArgTypeRunArgs, 524 eArgTypeRunMode, 525 eArgTypeScriptLang, 526 eArgTypeSearchWord, 527 eArgTypeSelector, 528 eArgTypeSettingIndex, 529 eArgTypeSettingKey, 530 eArgTypeSettingPrefix, 531 eArgTypeSettingVariableName, 532 eArgTypeShlibName, 533 eArgTypeSourceFile, 534 eArgTypeSortOrder, 535 eArgTypeStartAddress, 536 eArgTypeSymbol, 537 eArgTypeThreadID, 538 eArgTypeThreadIndex, 539 eArgTypeThreadName, 540 eArgTypeUnixSignal, 541 eArgTypeVarName, 542 eArgTypeValue, 543 eArgTypeWidth, 544 eArgTypeNone, 545 eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!! 546} CommandArgumentType; 547 548typedef enum ArgumentRepetitionType 549{ 550 eArgRepeatPlain, // Exactly one occurrence 551 eArgRepeatOptional, // At most one occurrence, but it's optional 552 eArgRepeatPlus, // One or more occurrences 553 eArgRepeatStar, // Zero or more occurrences 554 eArgRepeatRange, // Repetition of same argument, from 1 to n 555 eArgRepeatPairPlain, // A pair of arguments that must always go together ([arg-type arg-value]), occurs exactly once 556 eArgRepeatPairOptional, // A pair that occurs at most once (optional) 557 eArgRepeatPairPlus, // One or more occurrences of a pair 558 eArgRepeatPairStar, // Zero or more occurrences of a pair 559 eArgRepeatPairRange, // A pair that repeats from 1 to n 560 eArgRepeatPairRangeOptional // A pair that repeats from 1 to n, but is optional 561} ArgumentRepetitionType; 562 563typedef enum SortOrder 564{ 565 eSortOrderNone, 566 eSortOrderByAddress, 567 eSortOrderByName 568} SortOrder; 569 570 571//---------------------------------------------------------------------- 572// Used in conjunction with Host::GetLLDBResource () to find files that 573// are related to 574//---------------------------------------------------------------------- 575typedef enum PathType 576{ 577 ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB mach-o file in LLDB.framework (MacOSX) exists 578 ePathTypeSupportExecutableDir, // Find LLDB support executable directory (debugserver, etc) 579 ePathTypeHeaderDir, // Find LLDB header file directory 580 ePathTypePythonDir // Find Python modules (PYTHONPATH) directory 581} PathType; 582 583 584//---------------------------------------------------------------------- 585// We can execute ThreadPlans on one thread with various fall-back modes 586// (try other threads after timeout, etc.) This enum gives the result of 587// thread plan executions. 588//---------------------------------------------------------------------- 589typedef enum ExecutionResults 590{ 591 eExecutionSetupError, 592 eExecutionCompleted, 593 eExecutionDiscarded, 594 eExecutionInterrupted, 595 eExecutionTimedOut 596} ExecutionResults; 597 598typedef enum ObjCRuntimeVersions { 599 eObjC_VersionUnknown = 0, 600 eAppleObjC_V1 = 1, 601 eAppleObjC_V2 = 2 602} ObjCRuntimeVersions; 603 604} // namespace lldb 605 606 607#endif // LLDB_enumerations_h_ 608