summaryrefslogtreecommitdiffstats
path: root/lldb/include/lldb/lldb-enumerations.h
blob: 8ad33500ee4263ab6a47144a0f9661a3e09466d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
//===-- lldb-enumerations.h -------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_enumerations_h_
#define LLDB_enumerations_h_

namespace lldb {

//----------------------------------------------------------------------
// Process and Thread States
//----------------------------------------------------------------------
typedef enum StateType
{
    eStateInvalid = 0,
    eStateUnloaded,
    eStateAttaching,
    eStateLaunching,
    eStateStopped,
    eStateRunning,
    eStateStepping,
    eStateCrashed,
    eStateDetached,
    eStateExited,
    eStateSuspended
} StateType;

//----------------------------------------------------------------------
// Thread Step Types
//----------------------------------------------------------------------
typedef enum StepType
{
    eStepTypeNone,
    eStepTypeTrace,     ///< Single step one instruction.
    eStepTypeTraceOver, ///< Single step one instruction, stepping over.
    eStepTypeInto,      ///< Single step into a specified context.
    eStepTypeOver,      ///< Single step over a specified context.
    eStepTypeOut        ///< Single step out a specified context.
} StepType;

//----------------------------------------------------------------------
// Thread Run Modes
//----------------------------------------------------------------------
typedef enum RunMode {
    eOnlyThisThread,
    eAllThreads,
    eOnlyDuringStepping
} RunMode;

//----------------------------------------------------------------------
// Address Types
//----------------------------------------------------------------------
typedef enum AddressType
{
    eAddressTypeInvalid = 0,
    eAddressTypeFile, ///< Address is an address as found in an object or symbol file
    eAddressTypeLoad, ///< Address is an address as in the current target inferior process
    eAddressTypeHost  ///< Address is an address in the process that is running this code
} AddressType;

//----------------------------------------------------------------------
// Byte ordering definitions
//----------------------------------------------------------------------
typedef enum ByteOrder
{
    eByteOrderInvalid   = 0,
    eByteOrderLittle    = 1234,
    eByteOrderBig       = 4321,
    eByteOrderPDP       = 3412,
#if   defined (__LITTLE_ENDIAN__)
    eByteOrderHost      = eByteOrderLittle
#elif defined (__BIG_ENDIAN__)
    eByteOrderHost      = eByteOrderBig
#elif defined (__PDP_ENDIAN__)
    eByteOrderHost      = eByteOrderPDP
#else
#error unable to detect endianness
#endif
} ByteOrder;

//----------------------------------------------------------------------
// Register encoding definitions
//----------------------------------------------------------------------
typedef enum Encoding
{
    eEncodingInvalid = 0,
    eEncodingUint,               // unsigned integer
    eEncodingSint,               // signed integer
    eEncodingIEEE754,            // float
    eEncodingVector              // vector registers
} Encoding;

//----------------------------------------------------------------------
// Display format definitions
//----------------------------------------------------------------------
typedef enum Format
{
    eFormatDefault = 0,
    eFormatInvalid = 0,
    eFormatBoolean,
    eFormatBinary,
    eFormatBytes,
    eFormatBytesWithASCII,
    eFormatChar,
    eFormatCharPrintable,   // Only printable characters, space if not printable
    eFormatComplex,
    eFormatCString,         // NULL terminated C strings
    eFormatDecimal,
    eFormatEnum,
    eFormatHex,
    eFormatFloat,
    eFormatOctal,
    eFormatUnicode16,
    eFormatUnicode32,
    eFormatUnsigned,
    eFormatPointer,
    eFormatVectorOfChar,
    eFormatVectorOfSInt8,
    eFormatVectorOfUInt8,
    eFormatVectorOfSInt16,
    eFormatVectorOfUInt16,
    eFormatVectorOfSInt32,
    eFormatVectorOfUInt32,
    eFormatVectorOfSInt64,
    eFormatVectorOfUInt64,
    eFormatVectorOfFloat32,
    eFormatVectorOfFloat64,
    eFormatVectorOfUInt128,

} Format;

//----------------------------------------------------------------------
// Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls
//----------------------------------------------------------------------
typedef enum DescriptionLevel
{
    eDescriptionLevelBrief = 0,
    eDescriptionLevelFull,
    eDescriptionLevelVerbose,
    kNumDescriptionLevels
} DescriptionLevel;

//----------------------------------------------------------------------
// Script interpreter types
//----------------------------------------------------------------------
typedef enum ScriptLanguage
{
    eScriptLanguageNone,
    eScriptLanguagePython,
    eScriptLanguageDefault = eScriptLanguagePython
} ScriptLanguage;

//----------------------------------------------------------------------
// Register numbering types
//----------------------------------------------------------------------
typedef enum RegisterKind
{
    eRegisterKindGCC = 0,
    eRegisterKindDWARF,
    eRegisterKindGeneric,
    eRegisterKindGDB,
    kNumRegisterKinds
} RegisterKind;

//----------------------------------------------------------------------
// Thread stop reasons
//----------------------------------------------------------------------
typedef enum StopReason
{
    eStopReasonInvalid = 0,
    eStopReasonNone,
    eStopReasonTrace,
    eStopReasonBreakpoint,
    eStopReasonWatchpoint,
    eStopReasonSignal,
    eStopReasonException,
    eStopReasonPlanComplete
} StopReason;

//----------------------------------------------------------------------
// Votes - Need a tri-state, yes, no, no opinion...
//----------------------------------------------------------------------
typedef enum Vote
{
    eVoteNo         = -1,
    eVoteNoOpinion  =  0,
    eVoteYes        =  1,
} Vote;

//----------------------------------------------------------------------
// Symbol types
//----------------------------------------------------------------------
typedef enum SymbolType
{
    eSymbolTypeAny = 0,
    eSymbolTypeInvalid = 0,
    eSymbolTypeAbsolute,
    eSymbolTypeExtern,
    eSymbolTypeCode,
    eSymbolTypeData,
    eSymbolTypeTrampoline,
    eSymbolTypeRuntime,
    eSymbolTypeException,
    eSymbolTypeSourceFile,
    eSymbolTypeHeaderFile,
    eSymbolTypeObjectFile,
    eSymbolTypeFunction,
    eSymbolTypeFunctionEnd,
    eSymbolTypeCommonBlock,
    eSymbolTypeBlock,
    eSymbolTypeStatic,
    eSymbolTypeGlobal,
    eSymbolTypeLocal,
    eSymbolTypeParam,
    eSymbolTypeVariable,
    eSymbolTypeVariableType,
    eSymbolTypeLineEntry,
    eSymbolTypeLineHeader,
    eSymbolTypeScopeBegin,
    eSymbolTypeScopeEnd,
    eSymbolTypeAdditional, // When symbols take more than one entry, the extra entries get this type
    eSymbolTypeCompiler,
    eSymbolTypeInstrumentation,
    eSymbolTypeUndefined
} SymbolType;


//----------------------------------------------------------------------
// Command Return Status Types
//----------------------------------------------------------------------
typedef enum ReturnStatus
{
    eReturnStatusInvalid,
    eReturnStatusSuccessFinishNoResult,
    eReturnStatusSuccessFinishResult,
    eReturnStatusSuccessContinuingNoResult,
    eReturnStatusSuccessContinuingResult,
    eReturnStatusStarted,
    eReturnStatusFailed,
    eReturnStatusQuit
} ReturnStatus;


//----------------------------------------------------------------------
// Connection Status Types
//----------------------------------------------------------------------
typedef enum ConnectionStatus
{
    eConnectionStatusSuccess,         // Success
    eConnectionStatusError,           // Check GetError() for details
    eConnectionStatusTimedOut,        // Request timed out
    eConnectionStatusNoConnection,    // No connection
    eConnectionStatusLostConnection   // Lost connection while connected to a valid connection
} ConnectionStatus;


typedef enum ErrorType
{
    eErrorTypeInvalid,
    eErrorTypeGeneric,      ///< Generic errors that can be any value.
    eErrorTypeMachKernel,   ///< Mach kernel error codes.
    eErrorTypePOSIX         ///< POSIX error codes.
} ErrorType;


typedef enum ValueType
{
    eValueTypeInvalid           = 0,
    eValueTypeVariableGlobal    = 1,    // globals variable
    eValueTypeVariableStatic    = 2,    // static variable
    eValueTypeVariableArgument  = 3,    // function argument variables
    eValueTypeVariableLocal     = 4,    // function local variables
    eValueTypeRegister          = 5,    // stack frame register value
    eValueTypeRegisterSet       = 6     // A collection of stack frame register values
} ValueType;

//----------------------------------------------------------------------
// Token size/granularities for Input Readers
//----------------------------------------------------------------------

typedef enum InputReaderGranularity
{
    eInputReaderGranularityInvalid = 0,
    eInputReaderGranularityByte,
    eInputReaderGranularityWord,
    eInputReaderGranularityLine,
    eInputReaderGranularityAll,
} InputReaderGranularity;

//------------------------------------------------------------------
/// These mask bits allow a common interface for queries that can
/// limit the amount of information that gets parsed to only the
/// information that is requested. These bits also can indicate what
/// actually did get resolved during query function calls.
///
/// Each definition corresponds to a one of the member variables
/// in this class, and requests that that item be resolved, or
/// indicates that the member did get resolved.
//------------------------------------------------------------------
typedef enum SymbolContextItem
{
    eSymbolContextTarget     = (1 << 0), ///< Set when \a target is requested from a query, or was located in query results
    eSymbolContextModule     = (1 << 1), ///< Set when \a module is requested from a query, or was located in query results
    eSymbolContextCompUnit   = (1 << 2), ///< Set when \a comp_unit is requested from a query, or was located in query results
    eSymbolContextFunction   = (1 << 3), ///< Set when \a function is requested from a query, or was located in query results
    eSymbolContextBlock      = (1 << 4), ///< Set when the deepest \a block is requested from a query, or was located in query results
    eSymbolContextLineEntry  = (1 << 5), ///< Set when \a line_entry is requested from a query, or was located in query results
    eSymbolContextSymbol     = (1 << 6), ///< Set when \a symbol is requested from a query, or was located in query results
    eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1)  ///< Indicates to try and lookup everything up during a query.
} SymbolContextItem;

typedef enum Permissions
{
    ePermissionsWritable = (1 << 0),
    ePermissionsReadable = (1 << 1),
    ePermissionsExecutable = (1 << 2)
};

typedef enum SectionType
{
    eSectionTypeInvalid,
    eSectionTypeCode,
    eSectionTypeContainer,              // The section contains child sections
    eSectionTypeData,
    eSectionTypeDataCString,            // Inlined C string data
    eSectionTypeDataCStringPointers,    // Pointers to C string data
    eSectionTypeDataSymbolAddress,      // Address of a symbol in the symbol table
    eSectionTypeData4,
    eSectionTypeData8,
    eSectionTypeData16,
    eSectionTypeDataPointers,
    eSectionTypeDebug,
    eSectionTypeZeroFill,
    eSectionTypeDataObjCMessageRefs,    // Pointer to function pointer + selector
    eSectionTypeDataObjCCFStrings,      // Objective C const CFString/NSString objects
    eSectionTypeOther

} SectionType;


typedef enum InputReaderAction
{
    eInputReaderActivate,   // reader is newly pushed onto the reader stack 
    eInputReaderReactivate, // reader is on top of the stack again after another reader was popped off 
    eInputReaderDeactivate, // another reader was pushed on the stack 
    eInputReaderGotToken,   // reader got one of its tokens (granularity)
    eInputReaderDone,       // reader was just popped off the stack and is done
} InputReaderAction;

} // namespace lldb


#endif  // LLDB_enumerations_h_
OpenPOWER on IntegriCloud