9#ifndef LLDB_API_SBDEBUGGER_H
10#define LLDB_API_SBDEBUGGER_H
18class CommandPluginInterfaceImplementation;
35 char const *,
unsigned long),
37 char const *d,
bool e);
39 bool IsActive()
const;
58 static const char *GetBroadcasterClass();
92 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
94 uint64_t &OUTPUT, uint64_t &OUTPUT,
97 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
98 uint64_t &progress_id,
99 uint64_t &completed, uint64_t &total,
100 bool &is_debugger_specific);
111 static void Initialize();
115 static void PrintStackTraceOnError();
117 static void PrintDiagnosticsOnError();
119 static void Terminate();
127 lldb::LogOutputCallback log_callback,
132 static
void MemoryPressureDetected();
134 explicit operator
bool() const;
136 bool IsValid() const;
155 void SetAsync(
bool b);
159 void SkipLLDBInitFiles(
bool b);
161 void SkipAppInitFiles(
bool b);
164 void SetInputFileHandle(FILE *f,
bool transfer_ownership);
166 void SetOutputFileHandle(FILE *f,
bool transfer_ownership);
168 void SetErrorFileHandle(FILE *f,
bool transfer_ownership);
172 FILE *GetInputFileHandle();
174 FILE *GetOutputFileHandle();
176 FILE *GetErrorFileHandle();
179 SBError SetInputString(
const char *data);
199 void SaveInputTerminalState();
201 void RestoreInputTerminalState();
205 void HandleCommand(
const char *command);
207 void RequestInterrupt();
208 void CancelInterruptRequest();
209 bool InterruptRequested();
215 "Use HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, "
216 "SBFile) or HandleProcessEvent(const SBProcess &, const SBEvent &, "
218 "HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, SBFile)")
234 lldb::SBTarget CreateTarget(
const char *filename,
const char *target_triple,
235 const char *platform_name,
238 lldb::SBTarget CreateTargetWithFileAndTargetTriple(
const char *filename,
239 const char *target_triple);
242 const char *archname);
260 uint32_t GetNumTargets();
264 void SetSelectedTarget(
SBTarget &target);
271 uint32_t GetNumPlatforms();
280 uint32_t GetNumAvailablePlatforms();
295 bool SetCurrentPlatformSDKRoot(
const char *sysroot);
299 bool SetUseExternalEditor(
bool input);
301 bool GetUseExternalEditor();
303 bool SetUseColor(
bool use_color);
305 bool GetUseColor()
const;
307 bool SetUseSourceCache(
bool use_source_cache);
309 bool GetUseSourceCache()
const;
311 static bool GetDefaultArchitecture(
char *arch_name,
size_t arch_name_len);
313 static bool SetDefaultArchitecture(
const char *arch_name);
319 static const char *GetVersionString();
329 bool EnableLog(
const char *channel,
const char **categories);
335 "AddDestroyCallback")
336 void SetDestroyCallback(
lldb::SBDebuggerDestroyCallback destroy_callback,
343 AddDestroyCallback(
lldb::SBDebuggerDestroyCallback destroy_callback,
351 "DispatchInput(const void *, size_t)")
352 void DispatchInput(
void *baton, const
void *data,
size_t data_len);
355 void DispatchInput(
const void *data,
size_t data_len);
357 void DispatchInputInterrupt();
359 void DispatchInputEndOfFile();
365 const char *GetInstanceName();
369 static lldb::SBError SetInternalVariable(
const char *var_name,
371 const char *debugger_instance_name);
374 GetInternalVariableValue(
const char *var_name,
375 const char *debugger_instance_name);
379 uint32_t GetTerminalWidth()
const;
381 void SetTerminalWidth(uint32_t term_width);
385 const char *GetPrompt()
const;
387 void SetPrompt(
const char *prompt);
389 const char *GetReproducerPath()
const;
400 bool GetCloseInputOnEOF() const;
403 void SetCloseInputOnEOF(
bool b);
411 bool DeleteCategory(const
char *category_name);
413 uint32_t GetNumCategories();
439 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread);
466 %apply
int& INOUT {
int& num_errors };
467 %apply
bool& INOUT {
bool& quit_requested };
468 %apply
bool& INOUT {
bool& stopped_for_crash };
470 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread,
471 SBCommandInterpreterRunOptions &options,
472 int &num_errors,
bool &quit_requested,
473 bool &stopped_for_crash);
477 RunCommandInterpreter(
const SBCommandInterpreterRunOptions &options);
495 friend class lldb_private::python::SWIGBridge;
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_DEPRECATED_FIXME(MSG, FIX)
#define LLDB_DEPRECATED(MSG)
Set the output file path.
LLDB_DEPRECATED_FIXME("Use DispatchInput(const void *, size_t)", "DispatchInput(const void *, size_t)") void DispatchInput(void *baton
lldb::DebuggerSP m_opaque_sp
void HandleProcessEvent(const lldb::SBProcess &process, const lldb::SBEvent &event, FileSP out, FileSP err)
LLDB_DEPRECATED_FIXME("Use HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, " "SBFile) or HandleProcessEvent(const SBProcess &, const SBEvent &, " "FileSP, FileSP)", "HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, SBFile)") void HandleProcessEvent(const lldb void HandleProcessEvent(const lldb::SBProcess &process, const lldb::SBEvent &event, SBFile out, SBFile err)
A class to manage flag bits.
A class that represents a running process on the host machine.
ScriptLanguage
Script interpreter types.
@ eBroadcastBitProgressCategory
StateType
Process and Thread States.
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Debugger > DebuggerSP
void(* LogOutputCallback)(const char *, void *baton)
std::shared_ptr< lldb_private::File > FileSP
class LLDB_API SBCommandInterpreterRunResult
InputReaderGranularity
Token size/granularities for Input Readers.