lldb-enumerations.h revision 10de7d1db3ec782ea2ccda1f39c0a40b9c301594
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 } LaunchFlags; 49 50 //---------------------------------------------------------------------- 51 // Thread Run Modes 52 //---------------------------------------------------------------------- 53 typedef enum RunMode { 54 eOnlyThisThread, 55 eAllThreads, 56 eOnlyDuringStepping 57 } RunMode; 58 59 //---------------------------------------------------------------------- 60 // Byte ordering definitions 61 //---------------------------------------------------------------------- 62 typedef enum ByteOrder 63 { 64 eByteOrderInvalid = 0, 65 eByteOrderBig = 1, 66 eByteOrderPDP = 2, 67 eByteOrderLittle = 4 68 } ByteOrder; 69 70 //---------------------------------------------------------------------- 71 // Register encoding definitions 72 //---------------------------------------------------------------------- 73 typedef enum Encoding 74 { 75 eEncodingInvalid = 0, 76 eEncodingUint, // unsigned integer 77 eEncodingSint, // signed integer 78 eEncodingIEEE754, // float 79 eEncodingVector // vector registers 80 } Encoding; 81 82 //---------------------------------------------------------------------- 83 // Display format definitions 84 //---------------------------------------------------------------------- 85 typedef enum Format 86 { 87 eFormatDefault = 0, 88 eFormatInvalid = 0, 89 eFormatBoolean, 90 eFormatBinary, 91 eFormatBytes, 92 eFormatBytesWithASCII, 93 eFormatChar, 94 eFormatCharPrintable, // Only printable characters, space if not printable 95 eFormatComplex, // Floating point complex type 96 eFormatComplexFloat = eFormatComplex, 97 eFormatCString, // NULL terminated C strings 98 eFormatDecimal, 99 eFormatEnum, 100 eFormatHex, 101 eFormatFloat, 102 eFormatOctal, 103 eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text' etc... 104 eFormatUnicode16, 105 eFormatUnicode32, 106 eFormatUnsigned, 107 eFormatPointer, 108 eFormatVectorOfChar, 109 eFormatVectorOfSInt8, 110 eFormatVectorOfUInt8, 111 eFormatVectorOfSInt16, 112 eFormatVectorOfUInt16, 113 eFormatVectorOfSInt32, 114 eFormatVectorOfUInt32, 115 eFormatVectorOfSInt64, 116 eFormatVectorOfUInt64, 117 eFormatVectorOfFloat32, 118 eFormatVectorOfFloat64, 119 eFormatVectorOfUInt128, 120 eFormatComplexInteger // Integer complex type 121 122 } Format; 123 124 //---------------------------------------------------------------------- 125 // Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls 126 //---------------------------------------------------------------------- 127 typedef enum DescriptionLevel 128 { 129 eDescriptionLevelBrief = 0, 130 eDescriptionLevelFull, 131 eDescriptionLevelVerbose, 132 kNumDescriptionLevels 133 } DescriptionLevel; 134 135 //---------------------------------------------------------------------- 136 // Script interpreter types 137 //---------------------------------------------------------------------- 138 typedef enum ScriptLanguage 139 { 140 eScriptLanguageNone, 141 eScriptLanguagePython, 142 eScriptLanguageDefault = eScriptLanguagePython 143 } ScriptLanguage; 144 145 //---------------------------------------------------------------------- 146 // Register numbering types 147 //---------------------------------------------------------------------- 148 typedef enum RegisterKind 149 { 150 eRegisterKindGCC = 0, // the register numbers seen in eh_frame 151 eRegisterKindDWARF, // the register numbers seen DWARF 152 eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any particular target 153 eRegisterKindGDB, // the register numbers gdb uses (matches stabs numbers?) 154 eRegisterKindLLDB, // lldb's internal register numbers 155 kNumRegisterKinds 156 } RegisterKind; 157 158 //---------------------------------------------------------------------- 159 // Thread stop reasons 160 //---------------------------------------------------------------------- 161 typedef enum StopReason 162 { 163 eStopReasonInvalid = 0, 164 eStopReasonNone, 165 eStopReasonTrace, 166 eStopReasonBreakpoint, 167 eStopReasonWatchpoint, 168 eStopReasonSignal, 169 eStopReasonException, 170 eStopReasonPlanComplete 171 } StopReason; 172 173 //---------------------------------------------------------------------- 174 // Command Return Status Types 175 //---------------------------------------------------------------------- 176 typedef enum ReturnStatus 177 { 178 eReturnStatusInvalid, 179 eReturnStatusSuccessFinishNoResult, 180 eReturnStatusSuccessFinishResult, 181 eReturnStatusSuccessContinuingNoResult, 182 eReturnStatusSuccessContinuingResult, 183 eReturnStatusStarted, 184 eReturnStatusFailed, 185 eReturnStatusQuit 186 } ReturnStatus; 187 188 189 //---------------------------------------------------------------------- 190 // Connection Status Types 191 //---------------------------------------------------------------------- 192 typedef enum ConnectionStatus 193 { 194 eConnectionStatusSuccess, // Success 195 eConnectionStatusEndOfFile, // End-of-file encountered 196 eConnectionStatusError, // Check GetError() for details 197 eConnectionStatusTimedOut, // Request timed out 198 eConnectionStatusNoConnection, // No connection 199 eConnectionStatusLostConnection // Lost connection while connected to a valid connection 200 } ConnectionStatus; 201 202 typedef enum ErrorType 203 { 204 eErrorTypeInvalid, 205 eErrorTypeGeneric, ///< Generic errors that can be any value. 206 eErrorTypeMachKernel, ///< Mach kernel error codes. 207 eErrorTypePOSIX ///< POSIX error codes. 208 } ErrorType; 209 210 211 typedef enum ValueType 212 { 213 eValueTypeInvalid = 0, 214 eValueTypeVariableGlobal = 1, // globals variable 215 eValueTypeVariableStatic = 2, // static variable 216 eValueTypeVariableArgument = 3, // function argument variables 217 eValueTypeVariableLocal = 4, // function local variables 218 eValueTypeRegister = 5, // stack frame register value 219 eValueTypeRegisterSet = 6, // A collection of stack frame register values 220 eValueTypeConstResult = 7 // constant result variables 221 } ValueType; 222 223 //---------------------------------------------------------------------- 224 // Token size/granularities for Input Readers 225 //---------------------------------------------------------------------- 226 227 typedef enum InputReaderGranularity 228 { 229 eInputReaderGranularityInvalid = 0, 230 eInputReaderGranularityByte, 231 eInputReaderGranularityWord, 232 eInputReaderGranularityLine, 233 eInputReaderGranularityAll 234 } InputReaderGranularity; 235 236 //------------------------------------------------------------------ 237 /// These mask bits allow a common interface for queries that can 238 /// limit the amount of information that gets parsed to only the 239 /// information that is requested. These bits also can indicate what 240 /// actually did get resolved during query function calls. 241 /// 242 /// Each definition corresponds to a one of the member variables 243 /// in this class, and requests that that item be resolved, or 244 /// indicates that the member did get resolved. 245 //------------------------------------------------------------------ 246 typedef enum SymbolContextItem 247 { 248 eSymbolContextTarget = (1 << 0), ///< Set when \a target is requested from a query, or was located in query results 249 eSymbolContextModule = (1 << 1), ///< Set when \a module is requested from a query, or was located in query results 250 eSymbolContextCompUnit = (1 << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results 251 eSymbolContextFunction = (1 << 3), ///< Set when \a function is requested from a query, or was located in query results 252 eSymbolContextBlock = (1 << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results 253 eSymbolContextLineEntry = (1 << 5), ///< Set when \a line_entry is requested from a query, or was located in query results 254 eSymbolContextSymbol = (1 << 6), ///< Set when \a symbol is requested from a query, or was located in query results 255 eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1) ///< Indicates to try and lookup everything up during a query. 256 } SymbolContextItem; 257 258 typedef enum Permissions 259 { 260 ePermissionsWritable = (1 << 0), 261 ePermissionsReadable = (1 << 1), 262 ePermissionsExecutable = (1 << 2) 263 } Permissions; 264 265 typedef enum InputReaderAction 266 { 267 eInputReaderActivate, // reader is newly pushed onto the reader stack 268 eInputReaderAsynchronousOutputWritten, // an async output event occurred; the reader may want to do something 269 eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off 270 eInputReaderDeactivate, // another reader was pushed on the stack 271 eInputReaderGotToken, // reader got one of its tokens (granularity) 272 eInputReaderInterrupt, // reader received an interrupt signal (probably from a control-c) 273 eInputReaderEndOfFile, // reader received an EOF char (probably from a control-d) 274 eInputReaderDone // reader was just popped off the stack and is done 275 } InputReaderAction; 276 277 typedef enum BreakpointEventType 278 { 279 eBreakpointEventTypeInvalidType = (1u << 0), 280 eBreakpointEventTypeAdded = (1u << 1), 281 eBreakpointEventTypeRemoved = (1u << 2), 282 eBreakpointEventTypeLocationsAdded = (1u << 3), 283 eBreakpointEventTypeLocationsRemoved = (1u << 4), 284 eBreakpointEventTypeLocationsResolved = (1u << 5) 285 } BreakpointEventType; 286 287 288 //---------------------------------------------------------------------- 289 /// Programming language type. 290 /// 291 /// These enumerations use the same language enumerations as the DWARF 292 /// specification for ease of use and consistency. 293 //---------------------------------------------------------------------- 294 typedef enum LanguageType 295 { 296 eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value. 297 eLanguageTypeC89 = 0x0001, ///< ISO C:1989. 298 eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R. 299 eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983. 300 eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998. 301 eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974. 302 eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985. 303 eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77. 304 eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90. 305 eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983. 306 eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996. 307 eLanguageTypeJava = 0x000b, ///< Java. 308 eLanguageTypeC99 = 0x000c, ///< ISO C:1999. 309 eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995. 310 eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95. 311 eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976. 312 eLanguageTypeObjC = 0x0010, ///< Objective-C. 313 eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++. 314 eLanguageTypeUPC = 0x0012, ///< Unified Parallel C. 315 eLanguageTypeD = 0x0013, ///< D. 316 eLanguageTypePython = 0x0014 ///< Python. 317 } LanguageType; 318 319 typedef enum DynamicValueType 320 { 321 eNoDynamicValues = 0, 322 eDynamicCanRunTarget = 1, 323 eDynamicDontRunTarget = 2 324 } DynamicValueType; 325 326 typedef enum AccessType 327 { 328 eAccessNone, 329 eAccessPublic, 330 eAccessPrivate, 331 eAccessProtected, 332 eAccessPackage 333 } AccessType; 334 335 typedef enum CommandArgumentType 336 { 337 eArgTypeAddress = 0, 338 eArgTypeAliasName, 339 eArgTypeAliasOptions, 340 eArgTypeArchitecture, 341 eArgTypeBoolean, 342 eArgTypeBreakpointID, 343 eArgTypeBreakpointIDRange, 344 eArgTypeByteSize, 345 eArgTypeClassName, 346 eArgTypeCommandName, 347 eArgTypeCount, 348 eArgTypeEndAddress, 349 eArgTypeExpression, 350 eArgTypeExprFormat, 351 eArgTypeFilename, 352 eArgTypeFormat, 353 eArgTypeFrameIndex, 354 eArgTypeFullName, 355 eArgTypeFunctionName, 356 eArgTypeIndex, 357 eArgTypeLineNum, 358 eArgTypeLogCategory, 359 eArgTypeLogChannel, 360 eArgTypeMethod, 361 eArgTypeName, 362 eArgTypeNewPathPrefix, 363 eArgTypeNumLines, 364 eArgTypeNumberPerLine, 365 eArgTypeOffset, 366 eArgTypeOldPathPrefix, 367 eArgTypeOneLiner, 368 eArgTypePath, 369 eArgTypePid, 370 eArgTypePlugin, 371 eArgTypeProcessName, 372 eArgTypeQueueName, 373 eArgTypeRegisterName, 374 eArgTypeRegularExpression, 375 eArgTypeRunArgs, 376 eArgTypeRunMode, 377 eArgTypeScriptLang, 378 eArgTypeSearchWord, 379 eArgTypeSelector, 380 eArgTypeSettingIndex, 381 eArgTypeSettingKey, 382 eArgTypeSettingPrefix, 383 eArgTypeSettingVariableName, 384 eArgTypeShlibName, 385 eArgTypeSourceFile, 386 eArgTypeSortOrder, 387 eArgTypeStartAddress, 388 eArgTypeSymbol, 389 eArgTypeThreadID, 390 eArgTypeThreadIndex, 391 eArgTypeThreadName, 392 eArgTypeUnixSignal, 393 eArgTypeVarName, 394 eArgTypeValue, 395 eArgTypeWidth, 396 eArgTypeNone, 397 eArgTypePlatform, 398 eArgTypeLastArg // Always keep this entry as the last entry in this enumeration!! 399 } CommandArgumentType; 400 401 //---------------------------------------------------------------------- 402 // Symbol types 403 //---------------------------------------------------------------------- 404 typedef enum SymbolType 405 { 406 eSymbolTypeAny = 0, 407 eSymbolTypeInvalid = 0, 408 eSymbolTypeAbsolute, 409 eSymbolTypeExtern, 410 eSymbolTypeCode, 411 eSymbolTypeData, 412 eSymbolTypeTrampoline, 413 eSymbolTypeRuntime, 414 eSymbolTypeException, 415 eSymbolTypeSourceFile, 416 eSymbolTypeHeaderFile, 417 eSymbolTypeObjectFile, 418 eSymbolTypeCommonBlock, 419 eSymbolTypeBlock, 420 eSymbolTypeLocal, 421 eSymbolTypeParam, 422 eSymbolTypeVariable, 423 eSymbolTypeVariableType, 424 eSymbolTypeLineEntry, 425 eSymbolTypeLineHeader, 426 eSymbolTypeScopeBegin, 427 eSymbolTypeScopeEnd, 428 eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type 429 eSymbolTypeCompiler, 430 eSymbolTypeInstrumentation, 431 eSymbolTypeUndefined 432 } SymbolType; 433 434 typedef enum SectionType 435 { 436 eSectionTypeInvalid, 437 eSectionTypeCode, 438 eSectionTypeContainer, // The section contains child sections 439 eSectionTypeData, 440 eSectionTypeDataCString, // Inlined C string data 441 eSectionTypeDataCStringPointers, // Pointers to C string data 442 eSectionTypeDataSymbolAddress, // Address of a symbol in the symbol table 443 eSectionTypeData4, 444 eSectionTypeData8, 445 eSectionTypeData16, 446 eSectionTypeDataPointers, 447 eSectionTypeDebug, 448 eSectionTypeZeroFill, 449 eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector 450 eSectionTypeDataObjCCFStrings, // Objective C const CFString/NSString objects 451 eSectionTypeDWARFDebugAbbrev, 452 eSectionTypeDWARFDebugAranges, 453 eSectionTypeDWARFDebugFrame, 454 eSectionTypeDWARFDebugInfo, 455 eSectionTypeDWARFDebugLine, 456 eSectionTypeDWARFDebugLoc, 457 eSectionTypeDWARFDebugMacInfo, 458 eSectionTypeDWARFDebugPubNames, 459 eSectionTypeDWARFDebugPubTypes, 460 eSectionTypeDWARFDebugRanges, 461 eSectionTypeDWARFDebugStr, 462 eSectionTypeEHFrame, 463 eSectionTypeOther 464 465 } SectionType; 466 467 typedef enum EmulateInstructionOptions 468 { 469 eEmulateInstructionOptionNone = (0u), 470 eEmulateInstructionOptionAutoAdvancePC = (1u << 0), 471 eEmulateInstructionOptionIgnoreConditions = (1u << 1) 472 } EmulateInstructionOptions; 473 474} // namespace lldb 475 476 477#endif // LLDB_lldb_enumerations_h_ 478