9#ifndef LLDB_API_SBDEBUGGER_H
10#define LLDB_API_SBDEBUGGER_H
28 char const *,
unsigned long),
30 char const *d,
bool e);
32 bool IsActive()
const;
39 eBroadcastBitProgress = (1 << 0),
40 eBroadcastBitWarning = (1 << 1),
41 eBroadcastBitError = (1 << 2),
49 SBDebugger(
const lldb::DebuggerSP &debugger_sp);
54 static const char *GetBroadcasterClass();
86 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
88 uint64_t &OUTPUT, uint64_t &OUTPUT,
91 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
92 uint64_t &progress_id,
93 uint64_t &completed, uint64_t &total,
94 bool &is_debugger_specific);
105 static void Initialize();
109 static void PrintStackTraceOnError();
111 static void PrintDiagnosticsOnError();
113 static void Terminate();
126 static void MemoryPressureDetected();
128 explicit operator bool()
const;
130 bool IsValid()
const;
149 void SetAsync(
bool b);
153 void SkipLLDBInitFiles(
bool b);
155 void SkipAppInitFiles(
bool b);
158 void SetInputFileHandle(FILE *f,
bool transfer_ownership);
160 void SetOutputFileHandle(FILE *f,
bool transfer_ownership);
162 void SetErrorFileHandle(FILE *f,
bool transfer_ownership);
166 FILE *GetInputFileHandle();
168 FILE *GetOutputFileHandle();
170 FILE *GetErrorFileHandle();
173 SBError SetInputString(
const char *data);
181 SBError SetInputFile(FileSP file);
183 SBError SetOutputFile(FileSP file);
185 SBError SetErrorFile(FileSP file);
193 void SaveInputTerminalState();
195 void RestoreInputTerminalState();
199 void HandleCommand(
const char *command);
201 void RequestInterrupt();
202 void CancelInterruptRequest();
203 bool InterruptRequested();
218 const lldb::SBEvent &event, FileSP BORROWED, FileSP BORROWED);
224 lldb::SBTarget CreateTarget(
const char *filename,
const char *target_triple,
225 const char *platform_name,
228 lldb::SBTarget CreateTargetWithFileAndTargetTriple(
const char *filename,
229 const char *target_triple);
232 const char *archname);
254 void SetSelectedTarget(
SBTarget &target);
270 uint32_t GetNumAvailablePlatforms();
285 bool SetCurrentPlatformSDKRoot(
const char *sysroot);
289 bool SetUseExternalEditor(
bool input);
291 bool GetUseExternalEditor();
293 bool SetUseColor(
bool use_color);
295 bool GetUseColor()
const;
297 bool SetUseSourceCache(
bool use_source_cache);
299 bool GetUseSourceCache()
const;
301 static bool GetDefaultArchitecture(
char *arch_name,
size_t arch_name_len);
303 static bool SetDefaultArchitecture(
const char *arch_name);
309 static const char *GetVersionString();
319 bool EnableLog(
const char *channel,
const char **categories);
328 void DispatchInput(
void *baton,
const void *data,
size_t data_len);
331 void DispatchInput(
const void *data,
size_t data_len);
333 void DispatchInputInterrupt();
335 void DispatchInputEndOfFile();
341 const char *GetInstanceName();
345 static lldb::SBError SetInternalVariable(
const char *var_name,
347 const char *debugger_instance_name);
350 GetInternalVariableValue(
const char *var_name,
351 const char *debugger_instance_name);
357 void SetTerminalWidth(
uint32_t term_width);
361 const char *GetPrompt()
const;
363 void SetPrompt(
const char *prompt);
365 const char *GetReproducerPath()
const;
375 bool GetCloseInputOnEOF()
const;
377 void SetCloseInputOnEOF(
bool b);
385 bool DeleteCategory(
const char *category_name);
413 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread);
440 %apply
int& INOUT {
int& num_errors };
441 %apply
bool& INOUT {
bool& quit_requested };
442 %apply
bool& INOUT {
bool& stopped_for_crash };
444 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread,
445 SBCommandInterpreterRunOptions &options,
446 int &num_errors,
bool &quit_requested,
447 bool &stopped_for_crash);
451 RunCommandInterpreter(
const SBCommandInterpreterRunOptions &options);
465 const SBFileSpec &trace_description_file);
476 lldb::SBTarget FindTargetWithLLDBProcess(
const lldb::ProcessSP &processSP);
478 void reset(
const lldb::DebuggerSP &debugger_sp);
484 const lldb::DebuggerSP &get_sp()
const;
static llvm::raw_ostream & error(Stream &strm)
lldb::DebuggerSP m_opaque_sp
A class to manage flag bits.
ScriptLanguage
Script interpreter types.
StateType
Process and Thread States.
LanguageType
Programming language type.
void(* SBDebuggerDestroyCallback)(lldb::user_id_t debugger_id, void *baton)
void(* LogOutputCallback)(const char *, void *baton)
class LLDB_API SBCommandInterpreterRunResult
InputReaderGranularity
Token size/granularities for Input Readers.