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 SetShowInlineDiagnostics(
bool);
309 bool SetUseSourceCache(
bool use_source_cache);
311 bool GetUseSourceCache()
const;
313 static bool GetDefaultArchitecture(
char *arch_name,
size_t arch_name_len);
315 static bool SetDefaultArchitecture(
const char *arch_name);
321 static const char *GetVersionString();
331 bool EnableLog(
const char *channel,
const char **categories);
337 "AddDestroyCallback")
338 void SetDestroyCallback(
lldb::SBDebuggerDestroyCallback destroy_callback,
345 AddDestroyCallback(
lldb::SBDebuggerDestroyCallback destroy_callback,
353 "DispatchInput(const void *, size_t)")
354 void DispatchInput(
void *baton, const
void *data,
size_t data_len);
357 void DispatchInput(
const void *data,
size_t data_len);
359 void DispatchInputInterrupt();
361 void DispatchInputEndOfFile();
367 const char *GetInstanceName();
371 static lldb::SBError SetInternalVariable(
const char *var_name,
373 const char *debugger_instance_name);
376 GetInternalVariableValue(
const char *var_name,
377 const char *debugger_instance_name);
381 uint32_t GetTerminalWidth()
const;
383 void SetTerminalWidth(uint32_t term_width);
385 uint32_t GetTerminalHeight()
const;
387 void SetTerminalHeight(uint32_t term_height);
391 const char *GetPrompt()
const;
393 void SetPrompt(
const char *prompt);
395 const char *GetReproducerPath()
const;
406 bool GetCloseInputOnEOF() const;
409 void SetCloseInputOnEOF(
bool b);
417 bool DeleteCategory(const
char *category_name);
419 uint32_t GetNumCategories();
436 void ResetStatistics();
450 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread);
477 %apply
int& INOUT {
int& num_errors };
478 %apply
bool& INOUT {
bool& quit_requested };
479 %apply
bool& INOUT {
bool& stopped_for_crash };
481 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread,
482 SBCommandInterpreterRunOptions &options,
483 int &num_errors,
bool &quit_requested,
484 bool &stopped_for_crash);
488 RunCommandInterpreter(
const SBCommandInterpreterRunOptions &options);
506 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.