lldb-sys 0.0.31

Raw bindings to the LLDB C++ API. LLDB is the debugger that is part of the LLVM project and is the default system debugger on Mac OS X. Building and using this is currently slightly tricky, so be sure to see the README.md in the repository.
Documentation
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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
//===-- SBCommandInterpreterBinding.cpp -------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/API/LLDB.h"
#include "lldb/API/SBCommandInterpreterRunOptions.h"
#include "lldb/Bindings/LLDBBinding.h"

using namespace lldb;

#ifdef __cplusplus
extern "C" {
#endif

SBCommandInterpreterRunOptionsRef CreateSBCommandInterpreterRunOptions() {
  return reinterpret_cast<SBCommandInterpreterRunOptionsRef>(
      new SBCommandInterpreterRunOptions());
}

void DisposeSBCommandInterpreterRunOptions(
    SBCommandInterpreterRunOptionsRef instance) {
  delete reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
}

bool SBCommandInterpreterRunOptionsGetStopOnContinue(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetStopOnContinue();
}

void SBCommandInterpreterRunOptionsSetStopOnContinue(
    SBCommandInterpreterRunOptionsRef instance, bool var0) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetStopOnContinue(var0);
}

bool SBCommandInterpreterRunOptionsGetStopOnError(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetStopOnError();
}

void SBCommandInterpreterRunOptionsSetStopOnError(
    SBCommandInterpreterRunOptionsRef instance, bool var0) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetStopOnError(var0);
}

bool SBCommandInterpreterRunOptionsGetStopOnCrash(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetStopOnCrash();
}

void SBCommandInterpreterRunOptionsSetStopOnCrash(
    SBCommandInterpreterRunOptionsRef instance, bool var0) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetStopOnCrash(var0);
}

bool SBCommandInterpreterRunOptionsGetEchoCommands(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetEchoCommands();
}

void SBCommandInterpreterRunOptionsSetEchoCommands(
    SBCommandInterpreterRunOptionsRef instance, bool var0) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetEchoCommands(var0);
}

bool SBCommandInterpreterRunOptionsGetEchoCommentCommands(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetEchoCommentCommands();
}

void SBCommandInterpreterRunOptionsSetEchoCommentCommands(
    SBCommandInterpreterRunOptionsRef instance, bool echo) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetEchoCommentCommands(echo);
}

bool SBCommandInterpreterRunOptionsGetPrintResults(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetPrintResults();
}

void SBCommandInterpreterRunOptionsSetPrintResults(
    SBCommandInterpreterRunOptionsRef instance, bool var0) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetPrintResults(var0);
}

bool SBCommandInterpreterRunOptionsGetAddToHistory(
    SBCommandInterpreterRunOptionsRef instance) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  return unwrapped->GetAddToHistory();
}

void SBCommandInterpreterRunOptionsSetAddToHistory(
    SBCommandInterpreterRunOptionsRef instance, bool var0) {
  SBCommandInterpreterRunOptions *unwrapped =
      reinterpret_cast<SBCommandInterpreterRunOptions *>(instance);
  unwrapped->SetAddToHistory(var0);
}

SBCommandInterpreterRef
CloneSBCommandInterpreter(SBCommandInterpreterRef instance) {
  return reinterpret_cast<SBCommandInterpreterRef>(new SBCommandInterpreter(
      *reinterpret_cast<SBCommandInterpreter *>(instance)));
}

void DisposeSBCommandInterpreter(SBCommandInterpreterRef instance) {
  delete reinterpret_cast<SBCommandInterpreter *>(instance);
}

const char *SBCommandInterpreterGetArgumentTypeAsCString(
    const lldb::CommandArgumentType arg_type) {
  return lldb::SBCommandInterpreter::GetArgumentTypeAsCString(arg_type);
}

const char *SBCommandInterpreterGetArgumentDescriptionAsCString(
    const lldb::CommandArgumentType arg_type) {
  return lldb::SBCommandInterpreter::GetArgumentDescriptionAsCString(arg_type);
}

bool SBCommandInterpreterEventIsCommandInterpreterEvent(SBEventRef event) {
  return lldb::SBCommandInterpreter::EventIsCommandInterpreterEvent(
      *reinterpret_cast<SBEvent *>(event));
}

bool SBCommandInterpreterIsValid(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->IsValid();
}

bool SBCommandInterpreterCommandExists(SBCommandInterpreterRef instance,
                                       const char *cmd) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->CommandExists(cmd);
}

bool SBCommandInterpreterAliasExists(SBCommandInterpreterRef instance,
                                     const char *cmd) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->AliasExists(cmd);
}

SBBroadcasterRef
SBCommandInterpreterGetBroadcaster(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return reinterpret_cast<SBBroadcasterRef>(
      new SBBroadcaster(unwrapped->GetBroadcaster()));
}

const char *SBCommandInterpreterGetBroadcasterClass() {
  return lldb::SBCommandInterpreter::GetBroadcasterClass();
}

bool SBCommandInterpreterHasCommands(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HasCommands();
}

bool SBCommandInterpreterHasAliases(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HasAliases();
}

bool SBCommandInterpreterHasAliasOptions(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HasAliasOptions();
}

SBProcessRef SBCommandInterpreterGetProcess(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return reinterpret_cast<SBProcessRef>(new SBProcess(unwrapped->GetProcess()));
}

SBDebuggerRef
SBCommandInterpreterGetDebugger(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return reinterpret_cast<SBDebuggerRef>(
      new SBDebugger(unwrapped->GetDebugger()));
}

SBCommandRef
SBCommandInterpreterAddMultiwordCommand(SBCommandInterpreterRef instance,
                                        const char *name, const char *help) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return reinterpret_cast<SBCommandRef>(
      new SBCommand(unwrapped->AddMultiwordCommand(name, help)));
}

SBCommandRef SBCommandInterpreterAddCommand(SBCommandInterpreterRef instance,
                                            const char *name,
                                            SBCommandPluginInterfaceRef impl,
                                            const char *help) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return reinterpret_cast<SBCommandRef>(new SBCommand(unwrapped->AddCommand(
      name, reinterpret_cast<SBCommandPluginInterface *>(impl), help)));
}

void SBCommandInterpreterSourceInitFileInHomeDirectory(
    SBCommandInterpreterRef instance, SBCommandReturnObjectRef result) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  unwrapped->SourceInitFileInHomeDirectory(
      *reinterpret_cast<SBCommandReturnObject *>(result));
}

void SBCommandInterpreterSourceInitFileInHomeDirectory2(
    SBCommandInterpreterRef instance, SBCommandReturnObjectRef result,
    bool is_repl) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  unwrapped->SourceInitFileInHomeDirectory(
      *reinterpret_cast<SBCommandReturnObject *>(result), is_repl);
}

void SBCommandInterpreterSourceInitFileInCurrentWorkingDirectory(
    SBCommandInterpreterRef instance, SBCommandReturnObjectRef result) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  unwrapped->SourceInitFileInCurrentWorkingDirectory(
      *reinterpret_cast<SBCommandReturnObject *>(result));
}

enum lldb::ReturnStatus SBCommandInterpreterHandleCommand(
    SBCommandInterpreterRef instance, const char *command_line,
    SBCommandReturnObjectRef result, bool add_to_history) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HandleCommand(
      command_line, *reinterpret_cast<SBCommandReturnObject *>(result),
      add_to_history);
}

enum lldb::ReturnStatus SBCommandInterpreterHandleCommand2(
    SBCommandInterpreterRef instance, const char *command_line,
    SBExecutionContextRef exe_ctx, SBCommandReturnObjectRef result,
    bool add_to_history) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HandleCommand(
      command_line, *reinterpret_cast<SBExecutionContext *>(exe_ctx),
      *reinterpret_cast<SBCommandReturnObject *>(result), add_to_history);
}

void SBCommandInterpreterHandleCommandsFromFile(
    SBCommandInterpreterRef instance, SBFileSpecRef file,
    SBExecutionContextRef override_context,
    SBCommandInterpreterRunOptionsRef options,
    SBCommandReturnObjectRef result) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  unwrapped->HandleCommandsFromFile(
      *reinterpret_cast<SBFileSpec *>(file),
      *reinterpret_cast<SBExecutionContext *>(override_context),
      *reinterpret_cast<SBCommandInterpreterRunOptions *>(options),
      *reinterpret_cast<SBCommandReturnObject *>(result));
}

int SBCommandInterpreterHandleCompletion(
    SBCommandInterpreterRef instance, const char *current_line,
    const char *cursor, const char *last_char, int match_start_point,
    int max_return_elements, SBStringListRef matches) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HandleCompletion(
      current_line, cursor, last_char, match_start_point, max_return_elements,
      *reinterpret_cast<SBStringList *>(matches));
}

int SBCommandInterpreterHandleCompletion2(SBCommandInterpreterRef instance,
                                          const char *current_line,
                                          uint32_t cursor_pos,
                                          int match_start_point,
                                          int max_return_elements,
                                          SBStringListRef matches) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HandleCompletion(
      current_line, cursor_pos, match_start_point, max_return_elements,
      *reinterpret_cast<SBStringList *>(matches));
}

int SBCommandInterpreterHandleCompletionWithDescriptions(
    SBCommandInterpreterRef instance, const char *current_line,
    const char *cursor, const char *last_char, int match_start_point,
    int max_return_elements, SBStringListRef matches,
    SBStringListRef descriptions) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HandleCompletionWithDescriptions(
      current_line, cursor, last_char, match_start_point, max_return_elements,
      *reinterpret_cast<SBStringList *>(matches),
      *reinterpret_cast<SBStringList *>(descriptions));
}

int SBCommandInterpreterHandleCompletionWithDescriptions2(
    SBCommandInterpreterRef instance, const char *current_line,
    uint32_t cursor_pos, int match_start_point, int max_return_elements,
    SBStringListRef matches, SBStringListRef descriptions) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->HandleCompletionWithDescriptions(
      current_line, cursor_pos, match_start_point, max_return_elements,
      *reinterpret_cast<SBStringList *>(matches),
      *reinterpret_cast<SBStringList *>(descriptions));
}

bool SBCommandInterpreterWasInterrupted(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->WasInterrupted();
}

bool SBCommandInterpreterSetCommandOverrideCallback(
    SBCommandInterpreterRef instance, const char *command_name,
    lldb::CommandOverrideCallback callback, void *baton) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->SetCommandOverrideCallback(command_name, callback, baton);
}

bool SBCommandInterpreterIsActive(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->IsActive();
}

const char *SBCommandInterpreterGetIOHandlerControlSequence(
    SBCommandInterpreterRef instance, char ch) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->GetIOHandlerControlSequence(ch);
}

bool SBCommandInterpreterGetPromptOnQuit(SBCommandInterpreterRef instance) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  return unwrapped->GetPromptOnQuit();
}

void SBCommandInterpreterSetPromptOnQuit(SBCommandInterpreterRef instance,
                                         bool b) {
  SBCommandInterpreter *unwrapped =
      reinterpret_cast<SBCommandInterpreter *>(instance);
  unwrapped->SetPromptOnQuit(b);
}

bool SBCommandPluginInterfaceDoExecute(SBCommandPluginInterfaceRef instance,
                                       SBDebuggerRef, char **var0,
                                       SBCommandReturnObjectRef var1) {
  SBCommandPluginInterface *unwrapped =
      reinterpret_cast<SBCommandPluginInterface *>(instance);
  return unwrapped->DoExecute(*reinterpret_cast<SBDebugger *>(var1), var0,
                              *reinterpret_cast<SBCommandReturnObject *>(var1));
}

SBCommandPluginInterfaceRef
CloneSBCommandPluginInterface(SBCommandPluginInterfaceRef instance) {
  return reinterpret_cast<SBCommandPluginInterfaceRef>(
      new SBCommandPluginInterface(
          *reinterpret_cast<SBCommandPluginInterface *>(instance)));
}

void DisposeSBCommandPluginInterface(SBCommandPluginInterfaceRef instance) {
  delete reinterpret_cast<SBCommandPluginInterface *>(instance);
}

SBCommandRef CreateSBCommand() {
  return reinterpret_cast<SBCommandRef>(new SBCommand());
}

bool SBCommandIsValid(SBCommandRef instance) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  return unwrapped->IsValid();
}

const char *SBCommandGetName(SBCommandRef instance) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  return unwrapped->GetName();
}

const char *SBCommandGetHelp(SBCommandRef instance) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  return unwrapped->GetHelp();
}

const char *SBCommandGetHelpLong(SBCommandRef instance) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  return unwrapped->GetHelpLong();
}

void SBCommandSetHelp(SBCommandRef instance, const char *var0) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  unwrapped->SetHelp(var0);
}

void SBCommandSetHelpLong(SBCommandRef instance, const char *var0) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  unwrapped->SetHelpLong(var0);
}

SBCommandRef SBCommandAddMultiwordCommand(SBCommandRef instance,
                                          const char *name, const char *help) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  return reinterpret_cast<SBCommandRef>(
      new SBCommand(unwrapped->AddMultiwordCommand(name, help)));
}

SBCommandRef SBCommandAddCommand(SBCommandRef instance, const char *name,
                                 SBCommandPluginInterfaceRef impl,
                                 const char *help) {
  SBCommand *unwrapped = reinterpret_cast<SBCommand *>(instance);
  return reinterpret_cast<SBCommandRef>(new SBCommand(unwrapped->AddCommand(
      name, reinterpret_cast<SBCommandPluginInterface *>(impl), help)));
}

SBCommandRef CloneSBCommand(SBCommandRef instance) {
  return reinterpret_cast<SBCommandRef>(
      new SBCommand(*reinterpret_cast<SBCommand *>(instance)));
}

void DisposeSBCommand(SBCommandRef instance) {
  delete reinterpret_cast<SBCommand *>(instance);
}

#ifdef __cplusplus
}
#endif