lldb-enumerations.h 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116
  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. #ifndef LLDB_LLDB_ENUMERATIONS_H
  9. #define LLDB_LLDB_ENUMERATIONS_H
  10. #include <type_traits>
  11. #ifndef SWIG
  12. // Macro to enable bitmask operations on an enum. Without this, Enum | Enum
  13. // gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar). If
  14. // you mark Enum with LLDB_MARK_AS_BITMASK_ENUM(Enum), however, you can simply
  15. // write Enum a = eFoo | eBar.
  16. // Unfortunately, swig<3.0 doesn't recognise the constexpr keyword, so remove
  17. // this entire block, as it is not necessary for swig processing.
  18. #define LLDB_MARK_AS_BITMASK_ENUM(Enum) \
  19. constexpr Enum operator|(Enum a, Enum b) { \
  20. return static_cast<Enum>( \
  21. static_cast<std::underlying_type<Enum>::type>(a) | \
  22. static_cast<std::underlying_type<Enum>::type>(b)); \
  23. } \
  24. constexpr Enum operator&(Enum a, Enum b) { \
  25. return static_cast<Enum>( \
  26. static_cast<std::underlying_type<Enum>::type>(a) & \
  27. static_cast<std::underlying_type<Enum>::type>(b)); \
  28. } \
  29. constexpr Enum operator~(Enum a) { \
  30. return static_cast<Enum>( \
  31. ~static_cast<std::underlying_type<Enum>::type>(a)); \
  32. } \
  33. inline Enum &operator|=(Enum &a, Enum b) { \
  34. a = a | b; \
  35. return a; \
  36. } \
  37. inline Enum &operator&=(Enum &a, Enum b) { \
  38. a = a & b; \
  39. return a; \
  40. }
  41. #else
  42. #define LLDB_MARK_AS_BITMASK_ENUM(Enum)
  43. #endif
  44. #ifndef SWIG
  45. // With MSVC, the default type of an enum is always signed, even if one of the
  46. // enumerator values is too large to fit into a signed integer but would
  47. // otherwise fit into an unsigned integer. As a result of this, all of LLDB's
  48. // flag-style enumerations that specify something like eValueFoo = 1u << 31
  49. // result in negative values. This usually just results in a benign warning,
  50. // but in a few places we actually do comparisons on the enum values, which
  51. // would cause a real bug. Furthermore, there's no way to silence only this
  52. // warning, as it's part of -Wmicrosoft which also catches a whole slew of
  53. // other useful issues.
  54. //
  55. // To make matters worse, early versions of SWIG don't recognize the syntax of
  56. // specifying the underlying type of an enum (and Python doesn't care anyway)
  57. // so we need a way to specify the underlying type when the enum is being used
  58. // from C++ code, but just use a regular enum when swig is pre-processing.
  59. #define FLAGS_ENUM(Name) enum Name : unsigned
  60. #define FLAGS_ANONYMOUS_ENUM() enum : unsigned
  61. #else
  62. #define FLAGS_ENUM(Name) enum Name
  63. #define FLAGS_ANONYMOUS_ENUM() enum
  64. #endif
  65. namespace lldb {
  66. /// Process and Thread States.
  67. enum StateType {
  68. eStateInvalid = 0,
  69. eStateUnloaded, ///< Process is object is valid, but not currently loaded
  70. eStateConnected, ///< Process is connected to remote debug services, but not
  71. /// launched or attached to anything yet
  72. eStateAttaching, ///< Process is currently trying to attach
  73. eStateLaunching, ///< Process is in the process of launching
  74. // The state changes eStateAttaching and eStateLaunching are both sent while
  75. // the private state thread is either not yet started or paused. For that
  76. // reason, they should only be signaled as public state changes, and not
  77. // private state changes.
  78. eStateStopped, ///< Process or thread is stopped and can be examined.
  79. eStateRunning, ///< Process or thread is running and can't be examined.
  80. eStateStepping, ///< Process or thread is in the process of stepping and can
  81. /// not be examined.
  82. eStateCrashed, ///< Process or thread has crashed and can be examined.
  83. eStateDetached, ///< Process has been detached and can't be examined.
  84. eStateExited, ///< Process has exited and can't be examined.
  85. eStateSuspended, ///< Process or thread is in a suspended state as far
  86. ///< as the debugger is concerned while other processes
  87. ///< or threads get the chance to run.
  88. kLastStateType = eStateSuspended
  89. };
  90. /// Launch Flags.
  91. FLAGS_ENUM(LaunchFlags){
  92. eLaunchFlagNone = 0u,
  93. eLaunchFlagExec = (1u << 0), ///< Exec when launching and turn the calling
  94. /// process into a new process
  95. eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to
  96. /// allow the process to be debugged
  97. eLaunchFlagStopAtEntry = (1u
  98. << 2), ///< Stop at the program entry point
  99. /// instead of auto-continuing when
  100. /// launching or attaching at entry point
  101. eLaunchFlagDisableASLR =
  102. (1u << 3), ///< Disable Address Space Layout Randomization
  103. eLaunchFlagDisableSTDIO =
  104. (1u << 4), ///< Disable stdio for inferior process (e.g. for a GUI app)
  105. eLaunchFlagLaunchInTTY =
  106. (1u << 5), ///< Launch the process in a new TTY if supported by the host
  107. eLaunchFlagLaunchInShell =
  108. (1u << 6), ///< Launch the process inside a shell to get shell expansion
  109. eLaunchFlagLaunchInSeparateProcessGroup =
  110. (1u << 7), ///< Launch the process in a separate process group
  111. ///< If you are going to hand the process off (e.g. to
  112. ///< debugserver)
  113. eLaunchFlagDontSetExitStatus = (1u << 8),
  114. ///< set this flag so lldb & the handee don't race to set its exit status.
  115. eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub
  116. ///< should detach rather than killing
  117. ///< the debugee
  118. ///< if it loses connection with lldb.
  119. eLaunchFlagShellExpandArguments =
  120. (1u << 10), ///< Perform shell-style argument expansion
  121. eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
  122. eLaunchFlagInheritTCCFromParent =
  123. (1u << 12), ///< Don't make the inferior responsible for its own TCC
  124. ///< permissions but instead inherit them from its parent.
  125. };
  126. /// Thread Run Modes.
  127. enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping };
  128. /// Byte ordering definitions.
  129. enum ByteOrder {
  130. eByteOrderInvalid = 0,
  131. eByteOrderBig = 1,
  132. eByteOrderPDP = 2,
  133. eByteOrderLittle = 4
  134. };
  135. /// Register encoding definitions.
  136. enum Encoding {
  137. eEncodingInvalid = 0,
  138. eEncodingUint, ///< unsigned integer
  139. eEncodingSint, ///< signed integer
  140. eEncodingIEEE754, ///< float
  141. eEncodingVector ///< vector registers
  142. };
  143. /// Display format definitions.
  144. enum Format {
  145. eFormatDefault = 0,
  146. eFormatInvalid = 0,
  147. eFormatBoolean,
  148. eFormatBinary,
  149. eFormatBytes,
  150. eFormatBytesWithASCII,
  151. eFormatChar,
  152. eFormatCharPrintable, ///< Only printable characters, '.' if not printable
  153. eFormatComplex, ///< Floating point complex type
  154. eFormatComplexFloat = eFormatComplex,
  155. eFormatCString, ///< NULL terminated C strings
  156. eFormatDecimal,
  157. eFormatEnum,
  158. eFormatHex,
  159. eFormatHexUppercase,
  160. eFormatFloat,
  161. eFormatOctal,
  162. eFormatOSType, ///< OS character codes encoded into an integer 'PICT' 'text'
  163. ///< etc...
  164. eFormatUnicode16,
  165. eFormatUnicode32,
  166. eFormatUnsigned,
  167. eFormatPointer,
  168. eFormatVectorOfChar,
  169. eFormatVectorOfSInt8,
  170. eFormatVectorOfUInt8,
  171. eFormatVectorOfSInt16,
  172. eFormatVectorOfUInt16,
  173. eFormatVectorOfSInt32,
  174. eFormatVectorOfUInt32,
  175. eFormatVectorOfSInt64,
  176. eFormatVectorOfUInt64,
  177. eFormatVectorOfFloat16,
  178. eFormatVectorOfFloat32,
  179. eFormatVectorOfFloat64,
  180. eFormatVectorOfUInt128,
  181. eFormatComplexInteger, ///< Integer complex type
  182. eFormatCharArray, ///< Print characters with no single quotes, used for
  183. ///< character arrays that can contain non printable
  184. ///< characters
  185. eFormatAddressInfo, ///< Describe what an address points to (func + offset
  186. ///< with file/line, symbol + offset, data, etc)
  187. eFormatHexFloat, ///< ISO C99 hex float string
  188. eFormatInstruction, ///< Disassemble an opcode
  189. eFormatVoid, ///< Do not print this
  190. eFormatUnicode8,
  191. kNumFormats
  192. };
  193. /// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
  194. /// calls.
  195. enum DescriptionLevel {
  196. eDescriptionLevelBrief = 0,
  197. eDescriptionLevelFull,
  198. eDescriptionLevelVerbose,
  199. eDescriptionLevelInitial,
  200. kNumDescriptionLevels
  201. };
  202. /// Script interpreter types.
  203. enum ScriptLanguage {
  204. eScriptLanguageNone = 0,
  205. eScriptLanguagePython,
  206. eScriptLanguageLua,
  207. eScriptLanguageUnknown,
  208. eScriptLanguageDefault = eScriptLanguagePython
  209. };
  210. /// Register numbering types.
  211. // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert any of
  212. // these to the lldb internal register numbering scheme (eRegisterKindLLDB).
  213. enum RegisterKind {
  214. eRegisterKindEHFrame = 0, ///< the register numbers seen in eh_frame
  215. eRegisterKindDWARF, ///< the register numbers seen DWARF
  216. eRegisterKindGeneric, ///< insn ptr reg, stack ptr reg, etc not specific to
  217. ///< any particular target
  218. eRegisterKindProcessPlugin, ///< num used by the process plugin - e.g. by the
  219. ///< remote gdb-protocol stub program
  220. eRegisterKindLLDB, ///< lldb's internal register numbers
  221. kNumRegisterKinds
  222. };
  223. /// Thread stop reasons.
  224. enum StopReason {
  225. eStopReasonInvalid = 0,
  226. eStopReasonNone,
  227. eStopReasonTrace,
  228. eStopReasonBreakpoint,
  229. eStopReasonWatchpoint,
  230. eStopReasonSignal,
  231. eStopReasonException,
  232. eStopReasonExec, ///< Program was re-exec'ed
  233. eStopReasonPlanComplete,
  234. eStopReasonThreadExiting,
  235. eStopReasonInstrumentation,
  236. eStopReasonProcessorTrace,
  237. eStopReasonFork,
  238. eStopReasonVFork,
  239. eStopReasonVForkDone,
  240. };
  241. /// Command Return Status Types.
  242. enum ReturnStatus {
  243. eReturnStatusInvalid,
  244. eReturnStatusSuccessFinishNoResult,
  245. eReturnStatusSuccessFinishResult,
  246. eReturnStatusSuccessContinuingNoResult,
  247. eReturnStatusSuccessContinuingResult,
  248. eReturnStatusStarted,
  249. eReturnStatusFailed,
  250. eReturnStatusQuit
  251. };
  252. /// The results of expression evaluation.
  253. enum ExpressionResults {
  254. eExpressionCompleted = 0,
  255. eExpressionSetupError,
  256. eExpressionParseError,
  257. eExpressionDiscarded,
  258. eExpressionInterrupted,
  259. eExpressionHitBreakpoint,
  260. eExpressionTimedOut,
  261. eExpressionResultUnavailable,
  262. eExpressionStoppedForDebug,
  263. eExpressionThreadVanished
  264. };
  265. enum SearchDepth {
  266. eSearchDepthInvalid = 0,
  267. eSearchDepthTarget,
  268. eSearchDepthModule,
  269. eSearchDepthCompUnit,
  270. eSearchDepthFunction,
  271. eSearchDepthBlock,
  272. eSearchDepthAddress,
  273. kLastSearchDepthKind = eSearchDepthAddress
  274. };
  275. /// Connection Status Types.
  276. enum ConnectionStatus {
  277. eConnectionStatusSuccess, ///< Success
  278. eConnectionStatusEndOfFile, ///< End-of-file encountered
  279. eConnectionStatusError, ///< Check GetError() for details
  280. eConnectionStatusTimedOut, ///< Request timed out
  281. eConnectionStatusNoConnection, ///< No connection
  282. eConnectionStatusLostConnection, ///< Lost connection while connected to a
  283. ///< valid connection
  284. eConnectionStatusInterrupted ///< Interrupted read
  285. };
  286. enum ErrorType {
  287. eErrorTypeInvalid,
  288. eErrorTypeGeneric, ///< Generic errors that can be any value.
  289. eErrorTypeMachKernel, ///< Mach kernel error codes.
  290. eErrorTypePOSIX, ///< POSIX error codes.
  291. eErrorTypeExpression, ///< These are from the ExpressionResults enum.
  292. eErrorTypeWin32 ///< Standard Win32 error codes.
  293. };
  294. enum ValueType {
  295. eValueTypeInvalid = 0,
  296. eValueTypeVariableGlobal = 1, ///< globals variable
  297. eValueTypeVariableStatic = 2, ///< static variable
  298. eValueTypeVariableArgument = 3, ///< function argument variables
  299. eValueTypeVariableLocal = 4, ///< function local variables
  300. eValueTypeRegister = 5, ///< stack frame register value
  301. eValueTypeRegisterSet = 6, ///< A collection of stack frame register values
  302. eValueTypeConstResult = 7, ///< constant result variables
  303. eValueTypeVariableThreadLocal = 8 ///< thread local storage variable
  304. };
  305. /// Token size/granularities for Input Readers.
  306. enum InputReaderGranularity {
  307. eInputReaderGranularityInvalid = 0,
  308. eInputReaderGranularityByte,
  309. eInputReaderGranularityWord,
  310. eInputReaderGranularityLine,
  311. eInputReaderGranularityAll
  312. };
  313. /// These mask bits allow a common interface for queries that can
  314. /// limit the amount of information that gets parsed to only the
  315. /// information that is requested. These bits also can indicate what
  316. /// actually did get resolved during query function calls.
  317. ///
  318. /// Each definition corresponds to a one of the member variables
  319. /// in this class, and requests that that item be resolved, or
  320. /// indicates that the member did get resolved.
  321. FLAGS_ENUM(SymbolContextItem){
  322. /// Set when \a target is requested from a query, or was located
  323. /// in query results
  324. eSymbolContextTarget = (1u << 0),
  325. /// Set when \a module is requested from a query, or was located
  326. /// in query results
  327. eSymbolContextModule = (1u << 1),
  328. /// Set when \a comp_unit is requested from a query, or was
  329. /// located in query results
  330. eSymbolContextCompUnit = (1u << 2),
  331. /// Set when \a function is requested from a query, or was located
  332. /// in query results
  333. eSymbolContextFunction = (1u << 3),
  334. /// Set when the deepest \a block is requested from a query, or
  335. /// was located in query results
  336. eSymbolContextBlock = (1u << 4),
  337. /// Set when \a line_entry is requested from a query, or was
  338. /// located in query results
  339. eSymbolContextLineEntry = (1u << 5),
  340. /// Set when \a symbol is requested from a query, or was located
  341. /// in query results
  342. eSymbolContextSymbol = (1u << 6),
  343. /// Indicates to try and lookup everything up during a routine
  344. /// symbol context query.
  345. eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u),
  346. /// Set when \a global or static variable is requested from a
  347. /// query, or was located in query results.
  348. /// eSymbolContextVariable is potentially expensive to lookup so
  349. /// it isn't included in eSymbolContextEverything which stops it
  350. /// from being used during frame PC lookups and many other
  351. /// potential address to symbol context lookups.
  352. eSymbolContextVariable = (1u << 7),
  353. };
  354. LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem)
  355. FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0),
  356. ePermissionsReadable = (1u << 1),
  357. ePermissionsExecutable = (1u << 2)};
  358. LLDB_MARK_AS_BITMASK_ENUM(Permissions)
  359. enum InputReaderAction {
  360. eInputReaderActivate, ///< reader is newly pushed onto the reader stack
  361. eInputReaderAsynchronousOutputWritten, ///< an async output event occurred;
  362. ///< the reader may want to do
  363. ///< something
  364. eInputReaderReactivate, ///< reader is on top of the stack again after another
  365. ///< 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
  369. ///< a control-c)
  370. eInputReaderEndOfFile, ///< reader received an EOF char (probably from a
  371. ///< control-d)
  372. eInputReaderDone ///< reader was just popped off the stack and is done
  373. };
  374. FLAGS_ENUM(BreakpointEventType){
  375. eBreakpointEventTypeInvalidType = (1u << 0),
  376. eBreakpointEventTypeAdded = (1u << 1),
  377. eBreakpointEventTypeRemoved = (1u << 2),
  378. eBreakpointEventTypeLocationsAdded = (1u << 3), ///< Locations added doesn't
  379. ///< get sent when the
  380. ///< breakpoint is created
  381. eBreakpointEventTypeLocationsRemoved = (1u << 4),
  382. eBreakpointEventTypeLocationsResolved = (1u << 5),
  383. eBreakpointEventTypeEnabled = (1u << 6),
  384. eBreakpointEventTypeDisabled = (1u << 7),
  385. eBreakpointEventTypeCommandChanged = (1u << 8),
  386. eBreakpointEventTypeConditionChanged = (1u << 9),
  387. eBreakpointEventTypeIgnoreChanged = (1u << 10),
  388. eBreakpointEventTypeThreadChanged = (1u << 11),
  389. eBreakpointEventTypeAutoContinueChanged = (1u << 12)};
  390. FLAGS_ENUM(WatchpointEventType){
  391. eWatchpointEventTypeInvalidType = (1u << 0),
  392. eWatchpointEventTypeAdded = (1u << 1),
  393. eWatchpointEventTypeRemoved = (1u << 2),
  394. eWatchpointEventTypeEnabled = (1u << 6),
  395. eWatchpointEventTypeDisabled = (1u << 7),
  396. eWatchpointEventTypeCommandChanged = (1u << 8),
  397. eWatchpointEventTypeConditionChanged = (1u << 9),
  398. eWatchpointEventTypeIgnoreChanged = (1u << 10),
  399. eWatchpointEventTypeThreadChanged = (1u << 11),
  400. eWatchpointEventTypeTypeChanged = (1u << 12)};
  401. /// Programming language type.
  402. ///
  403. /// These enumerations use the same language enumerations as the DWARF
  404. /// specification for ease of use and consistency.
  405. /// The enum -> string code is in Language.cpp, don't change this
  406. /// table without updating that code as well.
  407. enum LanguageType {
  408. eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
  409. eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
  410. eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
  411. eLanguageTypeAda83 = 0x0003, ///< ISO Ada:1983.
  412. eLanguageTypeC_plus_plus = 0x0004, ///< ISO C++:1998.
  413. eLanguageTypeCobol74 = 0x0005, ///< ISO Cobol:1974.
  414. eLanguageTypeCobol85 = 0x0006, ///< ISO Cobol:1985.
  415. eLanguageTypeFortran77 = 0x0007, ///< ISO Fortran 77.
  416. eLanguageTypeFortran90 = 0x0008, ///< ISO Fortran 90.
  417. eLanguageTypePascal83 = 0x0009, ///< ISO Pascal:1983.
  418. eLanguageTypeModula2 = 0x000a, ///< ISO Modula-2:1996.
  419. eLanguageTypeJava = 0x000b, ///< Java.
  420. eLanguageTypeC99 = 0x000c, ///< ISO C:1999.
  421. eLanguageTypeAda95 = 0x000d, ///< ISO Ada:1995.
  422. eLanguageTypeFortran95 = 0x000e, ///< ISO Fortran 95.
  423. eLanguageTypePLI = 0x000f, ///< ANSI PL/I:1976.
  424. eLanguageTypeObjC = 0x0010, ///< Objective-C.
  425. eLanguageTypeObjC_plus_plus = 0x0011, ///< Objective-C++.
  426. eLanguageTypeUPC = 0x0012, ///< Unified Parallel C.
  427. eLanguageTypeD = 0x0013, ///< D.
  428. eLanguageTypePython = 0x0014, ///< Python.
  429. // NOTE: The below are DWARF5 constants, subject to change upon
  430. // completion of the DWARF5 specification
  431. eLanguageTypeOpenCL = 0x0015, ///< OpenCL.
  432. eLanguageTypeGo = 0x0016, ///< Go.
  433. eLanguageTypeModula3 = 0x0017, ///< Modula 3.
  434. eLanguageTypeHaskell = 0x0018, ///< Haskell.
  435. eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003.
  436. eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011.
  437. eLanguageTypeOCaml = 0x001b, ///< OCaml.
  438. eLanguageTypeRust = 0x001c, ///< Rust.
  439. eLanguageTypeC11 = 0x001d, ///< ISO C:2011.
  440. eLanguageTypeSwift = 0x001e, ///< Swift.
  441. eLanguageTypeJulia = 0x001f, ///< Julia.
  442. eLanguageTypeDylan = 0x0020, ///< Dylan.
  443. eLanguageTypeC_plus_plus_14 = 0x0021, ///< ISO C++:2014.
  444. eLanguageTypeFortran03 = 0x0022, ///< ISO Fortran 2003.
  445. eLanguageTypeFortran08 = 0x0023, ///< ISO Fortran 2008.
  446. // Vendor Extensions
  447. // Note: Language::GetNameForLanguageType
  448. // assumes these can be used as indexes into array language_names, and
  449. // Language::SetLanguageFromCString and Language::AsCString assume these can
  450. // be used as indexes into array g_languages.
  451. eLanguageTypeMipsAssembler = 0x0024, ///< Mips_Assembler.
  452. eLanguageTypeExtRenderScript = 0x0025, ///< RenderScript.
  453. eNumLanguageTypes
  454. };
  455. enum InstrumentationRuntimeType {
  456. eInstrumentationRuntimeTypeAddressSanitizer = 0x0000,
  457. eInstrumentationRuntimeTypeThreadSanitizer = 0x0001,
  458. eInstrumentationRuntimeTypeUndefinedBehaviorSanitizer = 0x0002,
  459. eInstrumentationRuntimeTypeMainThreadChecker = 0x0003,
  460. eInstrumentationRuntimeTypeSwiftRuntimeReporting = 0x0004,
  461. eNumInstrumentationRuntimeTypes
  462. };
  463. enum DynamicValueType {
  464. eNoDynamicValues = 0,
  465. eDynamicCanRunTarget = 1,
  466. eDynamicDontRunTarget = 2
  467. };
  468. enum StopShowColumn {
  469. eStopShowColumnAnsiOrCaret = 0,
  470. eStopShowColumnAnsi = 1,
  471. eStopShowColumnCaret = 2,
  472. eStopShowColumnNone = 3
  473. };
  474. enum AccessType {
  475. eAccessNone,
  476. eAccessPublic,
  477. eAccessPrivate,
  478. eAccessProtected,
  479. eAccessPackage
  480. };
  481. enum CommandArgumentType {
  482. eArgTypeAddress = 0,
  483. eArgTypeAddressOrExpression,
  484. eArgTypeAliasName,
  485. eArgTypeAliasOptions,
  486. eArgTypeArchitecture,
  487. eArgTypeBoolean,
  488. eArgTypeBreakpointID,
  489. eArgTypeBreakpointIDRange,
  490. eArgTypeBreakpointName,
  491. eArgTypeByteSize,
  492. eArgTypeClassName,
  493. eArgTypeCommandName,
  494. eArgTypeCount,
  495. eArgTypeDescriptionVerbosity,
  496. eArgTypeDirectoryName,
  497. eArgTypeDisassemblyFlavor,
  498. eArgTypeEndAddress,
  499. eArgTypeExpression,
  500. eArgTypeExpressionPath,
  501. eArgTypeExprFormat,
  502. eArgTypeFileLineColumn,
  503. eArgTypeFilename,
  504. eArgTypeFormat,
  505. eArgTypeFrameIndex,
  506. eArgTypeFullName,
  507. eArgTypeFunctionName,
  508. eArgTypeFunctionOrSymbol,
  509. eArgTypeGDBFormat,
  510. eArgTypeHelpText,
  511. eArgTypeIndex,
  512. eArgTypeLanguage,
  513. eArgTypeLineNum,
  514. eArgTypeLogCategory,
  515. eArgTypeLogChannel,
  516. eArgTypeMethod,
  517. eArgTypeName,
  518. eArgTypeNewPathPrefix,
  519. eArgTypeNumLines,
  520. eArgTypeNumberPerLine,
  521. eArgTypeOffset,
  522. eArgTypeOldPathPrefix,
  523. eArgTypeOneLiner,
  524. eArgTypePath,
  525. eArgTypePermissionsNumber,
  526. eArgTypePermissionsString,
  527. eArgTypePid,
  528. eArgTypePlugin,
  529. eArgTypeProcessName,
  530. eArgTypePythonClass,
  531. eArgTypePythonFunction,
  532. eArgTypePythonScript,
  533. eArgTypeQueueName,
  534. eArgTypeRegisterName,
  535. eArgTypeRegularExpression,
  536. eArgTypeRunArgs,
  537. eArgTypeRunMode,
  538. eArgTypeScriptedCommandSynchronicity,
  539. eArgTypeScriptLang,
  540. eArgTypeSearchWord,
  541. eArgTypeSelector,
  542. eArgTypeSettingIndex,
  543. eArgTypeSettingKey,
  544. eArgTypeSettingPrefix,
  545. eArgTypeSettingVariableName,
  546. eArgTypeShlibName,
  547. eArgTypeSourceFile,
  548. eArgTypeSortOrder,
  549. eArgTypeStartAddress,
  550. eArgTypeSummaryString,
  551. eArgTypeSymbol,
  552. eArgTypeThreadID,
  553. eArgTypeThreadIndex,
  554. eArgTypeThreadName,
  555. eArgTypeTypeName,
  556. eArgTypeUnsignedInteger,
  557. eArgTypeUnixSignal,
  558. eArgTypeVarName,
  559. eArgTypeValue,
  560. eArgTypeWidth,
  561. eArgTypeNone,
  562. eArgTypePlatform,
  563. eArgTypeWatchpointID,
  564. eArgTypeWatchpointIDRange,
  565. eArgTypeWatchType,
  566. eArgRawInput,
  567. eArgTypeCommand,
  568. eArgTypeColumnNum,
  569. eArgTypeModuleUUID,
  570. eArgTypeLastArg // Always keep this entry as the last entry in this
  571. // enumeration!!
  572. };
  573. /// Symbol types.
  574. // Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63
  575. // entries you will have to resize that field.
  576. enum SymbolType {
  577. eSymbolTypeAny = 0,
  578. eSymbolTypeInvalid = 0,
  579. eSymbolTypeAbsolute,
  580. eSymbolTypeCode,
  581. eSymbolTypeResolver,
  582. eSymbolTypeData,
  583. eSymbolTypeTrampoline,
  584. eSymbolTypeRuntime,
  585. eSymbolTypeException,
  586. eSymbolTypeSourceFile,
  587. eSymbolTypeHeaderFile,
  588. eSymbolTypeObjectFile,
  589. eSymbolTypeCommonBlock,
  590. eSymbolTypeBlock,
  591. eSymbolTypeLocal,
  592. eSymbolTypeParam,
  593. eSymbolTypeVariable,
  594. eSymbolTypeVariableType,
  595. eSymbolTypeLineEntry,
  596. eSymbolTypeLineHeader,
  597. eSymbolTypeScopeBegin,
  598. eSymbolTypeScopeEnd,
  599. eSymbolTypeAdditional, ///< When symbols take more than one entry, the extra
  600. ///< entries get this type
  601. eSymbolTypeCompiler,
  602. eSymbolTypeInstrumentation,
  603. eSymbolTypeUndefined,
  604. eSymbolTypeObjCClass,
  605. eSymbolTypeObjCMetaClass,
  606. eSymbolTypeObjCIVar,
  607. eSymbolTypeReExported
  608. };
  609. enum SectionType {
  610. eSectionTypeInvalid,
  611. eSectionTypeCode,
  612. eSectionTypeContainer, ///< The section contains child sections
  613. eSectionTypeData,
  614. eSectionTypeDataCString, ///< Inlined C string data
  615. eSectionTypeDataCStringPointers, ///< Pointers to C string data
  616. eSectionTypeDataSymbolAddress, ///< Address of a symbol in the symbol table
  617. eSectionTypeData4,
  618. eSectionTypeData8,
  619. eSectionTypeData16,
  620. eSectionTypeDataPointers,
  621. eSectionTypeDebug,
  622. eSectionTypeZeroFill,
  623. eSectionTypeDataObjCMessageRefs, ///< Pointer to function pointer + selector
  624. eSectionTypeDataObjCCFStrings, ///< Objective-C const CFString/NSString
  625. ///< objects
  626. eSectionTypeDWARFDebugAbbrev,
  627. eSectionTypeDWARFDebugAddr,
  628. eSectionTypeDWARFDebugAranges,
  629. eSectionTypeDWARFDebugCuIndex,
  630. eSectionTypeDWARFDebugFrame,
  631. eSectionTypeDWARFDebugInfo,
  632. eSectionTypeDWARFDebugLine,
  633. eSectionTypeDWARFDebugLoc,
  634. eSectionTypeDWARFDebugMacInfo,
  635. eSectionTypeDWARFDebugMacro,
  636. eSectionTypeDWARFDebugPubNames,
  637. eSectionTypeDWARFDebugPubTypes,
  638. eSectionTypeDWARFDebugRanges,
  639. eSectionTypeDWARFDebugStr,
  640. eSectionTypeDWARFDebugStrOffsets,
  641. eSectionTypeDWARFAppleNames,
  642. eSectionTypeDWARFAppleTypes,
  643. eSectionTypeDWARFAppleNamespaces,
  644. eSectionTypeDWARFAppleObjC,
  645. eSectionTypeELFSymbolTable, ///< Elf SHT_SYMTAB section
  646. eSectionTypeELFDynamicSymbols, ///< Elf SHT_DYNSYM section
  647. eSectionTypeELFRelocationEntries, ///< Elf SHT_REL or SHT_REL section
  648. eSectionTypeELFDynamicLinkInfo, ///< Elf SHT_DYNAMIC section
  649. eSectionTypeEHFrame,
  650. eSectionTypeARMexidx,
  651. eSectionTypeARMextab,
  652. eSectionTypeCompactUnwind, ///< compact unwind section in Mach-O,
  653. ///< __TEXT,__unwind_info
  654. eSectionTypeGoSymtab,
  655. eSectionTypeAbsoluteAddress, ///< Dummy section for symbols with absolute
  656. ///< address
  657. eSectionTypeDWARFGNUDebugAltLink,
  658. eSectionTypeDWARFDebugTypes, ///< DWARF .debug_types section
  659. eSectionTypeDWARFDebugNames, ///< DWARF v5 .debug_names
  660. eSectionTypeOther,
  661. eSectionTypeDWARFDebugLineStr, ///< DWARF v5 .debug_line_str
  662. eSectionTypeDWARFDebugRngLists, ///< DWARF v5 .debug_rnglists
  663. eSectionTypeDWARFDebugLocLists, ///< DWARF v5 .debug_loclists
  664. eSectionTypeDWARFDebugAbbrevDwo,
  665. eSectionTypeDWARFDebugInfoDwo,
  666. eSectionTypeDWARFDebugStrDwo,
  667. eSectionTypeDWARFDebugStrOffsetsDwo,
  668. eSectionTypeDWARFDebugTypesDwo,
  669. eSectionTypeDWARFDebugRngListsDwo,
  670. eSectionTypeDWARFDebugLocDwo,
  671. eSectionTypeDWARFDebugLocListsDwo,
  672. eSectionTypeDWARFDebugTuIndex,
  673. };
  674. FLAGS_ENUM(EmulateInstructionOptions){
  675. eEmulateInstructionOptionNone = (0u),
  676. eEmulateInstructionOptionAutoAdvancePC = (1u << 0),
  677. eEmulateInstructionOptionIgnoreConditions = (1u << 1)};
  678. FLAGS_ENUM(FunctionNameType){
  679. eFunctionNameTypeNone = 0u,
  680. eFunctionNameTypeAuto =
  681. (1u << 1), ///< Automatically figure out which FunctionNameType
  682. ///< bits to set based on the function name.
  683. eFunctionNameTypeFull = (1u << 2), ///< The function name.
  684. ///< For C this is the same as just the name of the function For C++ this is
  685. ///< the mangled or demangled version of the mangled name. For ObjC this is
  686. ///< the full function signature with the + or - and the square brackets and
  687. ///< the class and selector
  688. eFunctionNameTypeBase = (1u
  689. << 3), ///< The function name only, no namespaces
  690. ///< or arguments and no class
  691. ///< methods or selectors will be searched.
  692. eFunctionNameTypeMethod = (1u << 4), ///< Find function by method name (C++)
  693. ///< with no namespace or arguments
  694. eFunctionNameTypeSelector =
  695. (1u << 5), ///< Find function by selector name (ObjC) names
  696. eFunctionNameTypeAny =
  697. eFunctionNameTypeAuto ///< DEPRECATED: use eFunctionNameTypeAuto
  698. };
  699. LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType)
  700. /// Basic types enumeration for the public API SBType::GetBasicType().
  701. enum BasicType {
  702. eBasicTypeInvalid = 0,
  703. eBasicTypeVoid = 1,
  704. eBasicTypeChar,
  705. eBasicTypeSignedChar,
  706. eBasicTypeUnsignedChar,
  707. eBasicTypeWChar,
  708. eBasicTypeSignedWChar,
  709. eBasicTypeUnsignedWChar,
  710. eBasicTypeChar16,
  711. eBasicTypeChar32,
  712. eBasicTypeShort,
  713. eBasicTypeUnsignedShort,
  714. eBasicTypeInt,
  715. eBasicTypeUnsignedInt,
  716. eBasicTypeLong,
  717. eBasicTypeUnsignedLong,
  718. eBasicTypeLongLong,
  719. eBasicTypeUnsignedLongLong,
  720. eBasicTypeInt128,
  721. eBasicTypeUnsignedInt128,
  722. eBasicTypeBool,
  723. eBasicTypeHalf,
  724. eBasicTypeFloat,
  725. eBasicTypeDouble,
  726. eBasicTypeLongDouble,
  727. eBasicTypeFloatComplex,
  728. eBasicTypeDoubleComplex,
  729. eBasicTypeLongDoubleComplex,
  730. eBasicTypeObjCID,
  731. eBasicTypeObjCClass,
  732. eBasicTypeObjCSel,
  733. eBasicTypeNullPtr,
  734. eBasicTypeOther
  735. };
  736. /// Deprecated
  737. enum TraceType {
  738. eTraceTypeNone = 0,
  739. /// Intel Processor Trace
  740. eTraceTypeProcessorTrace
  741. };
  742. enum StructuredDataType {
  743. eStructuredDataTypeInvalid = -1,
  744. eStructuredDataTypeNull = 0,
  745. eStructuredDataTypeGeneric,
  746. eStructuredDataTypeArray,
  747. eStructuredDataTypeInteger,
  748. eStructuredDataTypeFloat,
  749. eStructuredDataTypeBoolean,
  750. eStructuredDataTypeString,
  751. eStructuredDataTypeDictionary
  752. };
  753. FLAGS_ENUM(TypeClass){
  754. eTypeClassInvalid = (0u), eTypeClassArray = (1u << 0),
  755. eTypeClassBlockPointer = (1u << 1), eTypeClassBuiltin = (1u << 2),
  756. eTypeClassClass = (1u << 3), eTypeClassComplexFloat = (1u << 4),
  757. eTypeClassComplexInteger = (1u << 5), eTypeClassEnumeration = (1u << 6),
  758. eTypeClassFunction = (1u << 7), eTypeClassMemberPointer = (1u << 8),
  759. eTypeClassObjCObject = (1u << 9), eTypeClassObjCInterface = (1u << 10),
  760. eTypeClassObjCObjectPointer = (1u << 11), eTypeClassPointer = (1u << 12),
  761. eTypeClassReference = (1u << 13), eTypeClassStruct = (1u << 14),
  762. eTypeClassTypedef = (1u << 15), eTypeClassUnion = (1u << 16),
  763. eTypeClassVector = (1u << 17),
  764. // Define the last type class as the MSBit of a 32 bit value
  765. eTypeClassOther = (1u << 31),
  766. // Define a mask that can be used for any type when finding types
  767. eTypeClassAny = (0xffffffffu)};
  768. LLDB_MARK_AS_BITMASK_ENUM(TypeClass)
  769. enum TemplateArgumentKind {
  770. eTemplateArgumentKindNull = 0,
  771. eTemplateArgumentKindType,
  772. eTemplateArgumentKindDeclaration,
  773. eTemplateArgumentKindIntegral,
  774. eTemplateArgumentKindTemplate,
  775. eTemplateArgumentKindTemplateExpansion,
  776. eTemplateArgumentKindExpression,
  777. eTemplateArgumentKindPack,
  778. eTemplateArgumentKindNullPtr,
  779. };
  780. /// Options that can be set for a formatter to alter its behavior. Not
  781. /// all of these are applicable to all formatter types.
  782. FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
  783. eTypeOptionCascade = (1u << 0),
  784. eTypeOptionSkipPointers = (1u << 1),
  785. eTypeOptionSkipReferences = (1u << 2),
  786. eTypeOptionHideChildren = (1u << 3),
  787. eTypeOptionHideValue = (1u << 4),
  788. eTypeOptionShowOneLiner = (1u << 5),
  789. eTypeOptionHideNames = (1u << 6),
  790. eTypeOptionNonCacheable = (1u << 7),
  791. eTypeOptionHideEmptyAggregates = (1u << 8),
  792. eTypeOptionFrontEndWantsDereference = (1u << 9)};
  793. /// This is the return value for frame comparisons. If you are comparing frame
  794. /// A to frame B the following cases arise:
  795. ///
  796. /// 1) When frame A pushes frame B (or a frame that ends up pushing
  797. /// B) A is Older than B.
  798. ///
  799. /// 2) When frame A pushed frame B (or if frameA is on the stack
  800. /// but B is not) A is Younger than B.
  801. ///
  802. /// 3) When frame A and frame B have the same StackID, they are
  803. /// Equal.
  804. ///
  805. /// 4) When frame A and frame B have the same immediate parent
  806. /// frame, but are not equal, the comparison yields SameParent.
  807. ///
  808. /// 5) If the two frames are on different threads or processes the
  809. /// comparison is Invalid.
  810. ///
  811. /// 6) If for some reason we can't figure out what went on, we
  812. /// return Unknown.
  813. enum FrameComparison {
  814. eFrameCompareInvalid,
  815. eFrameCompareUnknown,
  816. eFrameCompareEqual,
  817. eFrameCompareSameParent,
  818. eFrameCompareYounger,
  819. eFrameCompareOlder
  820. };
  821. /// File Permissions.
  822. ///
  823. /// Designed to mimic the unix file permission bits so they can be used with
  824. /// functions that set 'mode_t' to certain values for permissions.
  825. FLAGS_ENUM(FilePermissions){
  826. eFilePermissionsUserRead = (1u << 8),
  827. eFilePermissionsUserWrite = (1u << 7),
  828. eFilePermissionsUserExecute = (1u << 6),
  829. eFilePermissionsGroupRead = (1u << 5),
  830. eFilePermissionsGroupWrite = (1u << 4),
  831. eFilePermissionsGroupExecute = (1u << 3),
  832. eFilePermissionsWorldRead = (1u << 2),
  833. eFilePermissionsWorldWrite = (1u << 1),
  834. eFilePermissionsWorldExecute = (1u << 0),
  835. eFilePermissionsUserRW = (eFilePermissionsUserRead |
  836. eFilePermissionsUserWrite | 0),
  837. eFileFilePermissionsUserRX = (eFilePermissionsUserRead | 0 |
  838. eFilePermissionsUserExecute),
  839. eFilePermissionsUserRWX = (eFilePermissionsUserRead |
  840. eFilePermissionsUserWrite |
  841. eFilePermissionsUserExecute),
  842. eFilePermissionsGroupRW = (eFilePermissionsGroupRead |
  843. eFilePermissionsGroupWrite | 0),
  844. eFilePermissionsGroupRX = (eFilePermissionsGroupRead | 0 |
  845. eFilePermissionsGroupExecute),
  846. eFilePermissionsGroupRWX = (eFilePermissionsGroupRead |
  847. eFilePermissionsGroupWrite |
  848. eFilePermissionsGroupExecute),
  849. eFilePermissionsWorldRW = (eFilePermissionsWorldRead |
  850. eFilePermissionsWorldWrite | 0),
  851. eFilePermissionsWorldRX = (eFilePermissionsWorldRead | 0 |
  852. eFilePermissionsWorldExecute),
  853. eFilePermissionsWorldRWX = (eFilePermissionsWorldRead |
  854. eFilePermissionsWorldWrite |
  855. eFilePermissionsWorldExecute),
  856. eFilePermissionsEveryoneR = (eFilePermissionsUserRead |
  857. eFilePermissionsGroupRead |
  858. eFilePermissionsWorldRead),
  859. eFilePermissionsEveryoneW = (eFilePermissionsUserWrite |
  860. eFilePermissionsGroupWrite |
  861. eFilePermissionsWorldWrite),
  862. eFilePermissionsEveryoneX = (eFilePermissionsUserExecute |
  863. eFilePermissionsGroupExecute |
  864. eFilePermissionsWorldExecute),
  865. eFilePermissionsEveryoneRW = (eFilePermissionsEveryoneR |
  866. eFilePermissionsEveryoneW | 0),
  867. eFilePermissionsEveryoneRX = (eFilePermissionsEveryoneR | 0 |
  868. eFilePermissionsEveryoneX),
  869. eFilePermissionsEveryoneRWX = (eFilePermissionsEveryoneR |
  870. eFilePermissionsEveryoneW |
  871. eFilePermissionsEveryoneX),
  872. eFilePermissionsFileDefault = eFilePermissionsUserRW,
  873. eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
  874. };
  875. /// Queue work item types.
  876. ///
  877. /// The different types of work that can be enqueued on a libdispatch aka Grand
  878. /// Central Dispatch (GCD) queue.
  879. enum QueueItemKind {
  880. eQueueItemKindUnknown = 0,
  881. eQueueItemKindFunction,
  882. eQueueItemKindBlock
  883. };
  884. /// Queue type.
  885. ///
  886. /// libdispatch aka Grand Central Dispatch (GCD) queues can be either
  887. /// serial (executing on one thread) or concurrent (executing on
  888. /// multiple threads).
  889. enum QueueKind {
  890. eQueueKindUnknown = 0,
  891. eQueueKindSerial,
  892. eQueueKindConcurrent
  893. };
  894. /// Expression Evaluation Stages.
  895. ///
  896. /// These are the cancellable stages of expression evaluation, passed
  897. /// to the expression evaluation callback, so that you can interrupt
  898. /// expression evaluation at the various points in its lifecycle.
  899. enum ExpressionEvaluationPhase {
  900. eExpressionEvaluationParse = 0,
  901. eExpressionEvaluationIRGen,
  902. eExpressionEvaluationExecution,
  903. eExpressionEvaluationComplete
  904. };
  905. /// Watchpoint Kind.
  906. ///
  907. /// Indicates what types of events cause the watchpoint to fire. Used by Native
  908. /// *Protocol-related classes.
  909. FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
  910. eWatchpointKindRead = (1u << 1)};
  911. enum GdbSignal {
  912. eGdbSignalBadAccess = 0x91,
  913. eGdbSignalBadInstruction = 0x92,
  914. eGdbSignalArithmetic = 0x93,
  915. eGdbSignalEmulation = 0x94,
  916. eGdbSignalSoftware = 0x95,
  917. eGdbSignalBreakpoint = 0x96
  918. };
  919. /// Used with SBHostOS::GetLLDBPath (lldb::PathType) to find files that are
  920. /// related to LLDB on the current host machine. Most files are
  921. /// relative to LLDB or are in known locations.
  922. enum PathType {
  923. ePathTypeLLDBShlibDir, ///< The directory where the lldb.so (unix) or LLDB
  924. ///< mach-o file in LLDB.framework (MacOSX) exists
  925. ePathTypeSupportExecutableDir, ///< Find LLDB support executable directory
  926. ///< (debugserver, etc)
  927. ePathTypeHeaderDir, ///< Find LLDB header file directory
  928. ePathTypePythonDir, ///< Find Python modules (PYTHONPATH) directory
  929. ePathTypeLLDBSystemPlugins, ///< System plug-ins directory
  930. ePathTypeLLDBUserPlugins, ///< User plug-ins directory
  931. ePathTypeLLDBTempSystemDir, ///< The LLDB temp directory for this system that
  932. ///< will be cleaned up on exit
  933. ePathTypeGlobalLLDBTempSystemDir, ///< The LLDB temp directory for this
  934. ///< system, NOT cleaned up on a process
  935. ///< exit.
  936. ePathTypeClangDir ///< Find path to Clang builtin headers
  937. };
  938. /// Kind of member function.
  939. ///
  940. /// Used by the type system.
  941. enum MemberFunctionKind {
  942. eMemberFunctionKindUnknown = 0, ///< Not sure what the type of this is
  943. eMemberFunctionKindConstructor, ///< A function used to create instances
  944. eMemberFunctionKindDestructor, ///< A function used to tear down existing
  945. ///< instances
  946. eMemberFunctionKindInstanceMethod, ///< A function that applies to a specific
  947. ///< instance
  948. eMemberFunctionKindStaticMethod ///< A function that applies to a type rather
  949. ///< than any instance
  950. };
  951. /// String matching algorithm used by SBTarget.
  952. enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith };
  953. /// Bitmask that describes details about a type.
  954. FLAGS_ENUM(TypeFlags){
  955. eTypeHasChildren = (1u << 0), eTypeHasValue = (1u << 1),
  956. eTypeIsArray = (1u << 2), eTypeIsBlock = (1u << 3),
  957. eTypeIsBuiltIn = (1u << 4), eTypeIsClass = (1u << 5),
  958. eTypeIsCPlusPlus = (1u << 6), eTypeIsEnumeration = (1u << 7),
  959. eTypeIsFuncPrototype = (1u << 8), eTypeIsMember = (1u << 9),
  960. eTypeIsObjC = (1u << 10), eTypeIsPointer = (1u << 11),
  961. eTypeIsReference = (1u << 12), eTypeIsStructUnion = (1u << 13),
  962. eTypeIsTemplate = (1u << 14), eTypeIsTypedef = (1u << 15),
  963. eTypeIsVector = (1u << 16), eTypeIsScalar = (1u << 17),
  964. eTypeIsInteger = (1u << 18), eTypeIsFloat = (1u << 19),
  965. eTypeIsComplex = (1u << 20), eTypeIsSigned = (1u << 21),
  966. eTypeInstanceIsPointer = (1u << 22)};
  967. FLAGS_ENUM(CommandFlags){
  968. /// eCommandRequiresTarget
  969. ///
  970. /// Ensures a valid target is contained in m_exe_ctx prior to executing the
  971. /// command. If a target doesn't exist or is invalid, the command will fail
  972. /// and CommandObject::GetInvalidTargetDescription() will be returned as the
  973. /// error. CommandObject subclasses can override the virtual function for
  974. /// GetInvalidTargetDescription() to provide custom strings when needed.
  975. eCommandRequiresTarget = (1u << 0),
  976. /// eCommandRequiresProcess
  977. ///
  978. /// Ensures a valid process is contained in m_exe_ctx prior to executing the
  979. /// command. If a process doesn't exist or is invalid, the command will fail
  980. /// and CommandObject::GetInvalidProcessDescription() will be returned as
  981. /// the error. CommandObject subclasses can override the virtual function
  982. /// for GetInvalidProcessDescription() to provide custom strings when
  983. /// needed.
  984. eCommandRequiresProcess = (1u << 1),
  985. /// eCommandRequiresThread
  986. ///
  987. /// Ensures a valid thread is contained in m_exe_ctx prior to executing the
  988. /// command. If a thread doesn't exist or is invalid, the command will fail
  989. /// and CommandObject::GetInvalidThreadDescription() will be returned as the
  990. /// error. CommandObject subclasses can override the virtual function for
  991. /// GetInvalidThreadDescription() to provide custom strings when needed.
  992. eCommandRequiresThread = (1u << 2),
  993. /// eCommandRequiresFrame
  994. ///
  995. /// Ensures a valid frame is contained in m_exe_ctx prior to executing the
  996. /// command. If a frame doesn't exist or is invalid, the command will fail
  997. /// and CommandObject::GetInvalidFrameDescription() will be returned as the
  998. /// error. CommandObject subclasses can override the virtual function for
  999. /// GetInvalidFrameDescription() to provide custom strings when needed.
  1000. eCommandRequiresFrame = (1u << 3),
  1001. /// eCommandRequiresRegContext
  1002. ///
  1003. /// Ensures a valid register context (from the selected frame if there is a
  1004. /// frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is
  1005. /// available from m_exe_ctx prior to executing the command. If a target
  1006. /// doesn't exist or is invalid, the command will fail and
  1007. /// CommandObject::GetInvalidRegContextDescription() will be returned as the
  1008. /// error. CommandObject subclasses can override the virtual function for
  1009. /// GetInvalidRegContextDescription() to provide custom strings when needed.
  1010. eCommandRequiresRegContext = (1u << 4),
  1011. /// eCommandTryTargetAPILock
  1012. ///
  1013. /// Attempts to acquire the target lock if a target is selected in the
  1014. /// command interpreter. If the command object fails to acquire the API
  1015. /// lock, the command will fail with an appropriate error message.
  1016. eCommandTryTargetAPILock = (1u << 5),
  1017. /// eCommandProcessMustBeLaunched
  1018. ///
  1019. /// Verifies that there is a launched process in m_exe_ctx, if there isn't,
  1020. /// the command will fail with an appropriate error message.
  1021. eCommandProcessMustBeLaunched = (1u << 6),
  1022. /// eCommandProcessMustBePaused
  1023. ///
  1024. /// Verifies that there is a paused process in m_exe_ctx, if there isn't,
  1025. /// the command will fail with an appropriate error message.
  1026. eCommandProcessMustBePaused = (1u << 7),
  1027. /// eCommandProcessMustBeTraced
  1028. ///
  1029. /// Verifies that the process is being traced by a Trace plug-in, if it
  1030. /// isn't the command will fail with an appropriate error message.
  1031. eCommandProcessMustBeTraced = (1u << 8)};
  1032. /// Whether a summary should cap how much data it returns to users or not.
  1033. enum TypeSummaryCapping {
  1034. eTypeSummaryCapped = true,
  1035. eTypeSummaryUncapped = false
  1036. };
  1037. /// The result from a command interpreter run.
  1038. enum CommandInterpreterResult {
  1039. /// Command interpreter finished successfully.
  1040. eCommandInterpreterResultSuccess,
  1041. /// Stopped because the corresponding option was set and the inferior
  1042. /// crashed.
  1043. eCommandInterpreterResultInferiorCrash,
  1044. /// Stopped because the corresponding option was set and a command returned
  1045. /// an error.
  1046. eCommandInterpreterResultCommandError,
  1047. /// Stopped because quit was requested.
  1048. eCommandInterpreterResultQuitRequested,
  1049. };
  1050. } // namespace lldb
  1051. #endif // LLDB_LLDB_ENUMERATIONS_H