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;
62 static const char *GetBroadcasterClass();
96 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
98 uint64_t &OUTPUT, uint64_t &OUTPUT,
101 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
102 uint64_t &progress_id,
103 uint64_t &completed, uint64_t &total,
104 bool &is_debugger_specific);
115 static void Initialize();
119 static void PrintStackTraceOnError();
121 static void PrintDiagnosticsOnError();
123 static void Terminate();
131 lldb::LogOutputCallback log_callback,
136 static
void MemoryPressureDetected();
138 explicit operator
bool() const;
140 bool IsValid() const;
159 void SetAsync(
bool b);
163 void SkipLLDBInitFiles(
bool b);
165 void SkipAppInitFiles(
bool b);
168 void SetInputFileHandle(FILE *f,
bool transfer_ownership);
170 void SetOutputFileHandle(FILE *f,
bool transfer_ownership);
172 void SetErrorFileHandle(FILE *f,
bool transfer_ownership);
176 FILE *GetInputFileHandle();
178 FILE *GetOutputFileHandle();
180 FILE *GetErrorFileHandle();
183 SBError SetInputString(
const char *data);
203 void SaveInputTerminalState();
205 void RestoreInputTerminalState();
209 void HandleCommand(
const char *command);
211 void RequestInterrupt();
212 void CancelInterruptRequest();
213 bool InterruptRequested();
219 "Use HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, "
220 "SBFile) or HandleProcessEvent(const SBProcess &, const SBEvent &, "
222 "HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, SBFile)")
238 lldb::SBTarget CreateTarget(
const char *filename,
const char *target_triple,
239 const char *platform_name,
242 lldb::SBTarget CreateTargetWithFileAndTargetTriple(
const char *filename,
243 const char *target_triple);
246 const char *archname);
264 uint32_t GetNumTargets();
268 void SetSelectedTarget(
SBTarget &target);
275 uint32_t GetNumPlatforms();
284 uint32_t GetNumAvailablePlatforms();
299 bool SetCurrentPlatformSDKRoot(
const char *sysroot);
303 bool SetUseExternalEditor(
bool input);
305 bool GetUseExternalEditor();
307 bool SetUseColor(
bool use_color);
309 bool GetUseColor()
const;
311 bool SetShowInlineDiagnostics(
bool);
313 bool SetUseSourceCache(
bool use_source_cache);
315 bool GetUseSourceCache()
const;
317 static bool GetDefaultArchitecture(
char *arch_name,
size_t arch_name_len);
319 static bool SetDefaultArchitecture(
const char *arch_name);
325 static const char *GetVersionString();
335 bool EnableLog(
const char *channel,
const char **categories);
341 "AddDestroyCallback")
342 void SetDestroyCallback(
lldb::SBDebuggerDestroyCallback destroy_callback,
349 AddDestroyCallback(
lldb::SBDebuggerDestroyCallback destroy_callback,
357 "DispatchInput(const void *, size_t)")
358 void DispatchInput(
void *baton, const
void *data,
size_t data_len);
361 void DispatchInput(
const void *data,
size_t data_len);
363 void DispatchInputInterrupt();
365 void DispatchInputEndOfFile();
371 const char *GetInstanceName();
375 static lldb::SBError SetInternalVariable(
const char *var_name,
377 const char *debugger_instance_name);
380 GetInternalVariableValue(
const char *var_name,
381 const char *debugger_instance_name);
385 uint32_t GetTerminalWidth()
const;
387 void SetTerminalWidth(uint32_t term_width);
389 uint32_t GetTerminalHeight()
const;
391 void SetTerminalHeight(uint32_t term_height);
395 const char *GetPrompt()
const;
397 void SetPrompt(
const char *prompt);
399 const char *GetReproducerPath()
const;
410 bool GetCloseInputOnEOF() const;
413 void SetCloseInputOnEOF(
bool b);
421 bool DeleteCategory(const
char *category_name);
423 uint32_t GetNumCategories();
440 void ResetStatistics();
454 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread);
481 %apply
int& INOUT {
int& num_errors };
482 %apply
bool& INOUT {
bool& quit_requested };
483 %apply
bool& INOUT {
bool& stopped_for_crash };
485 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread,
486 SBCommandInterpreterRunOptions &options,
487 int &num_errors,
bool &quit_requested,
488 bool &stopped_for_crash);
492 RunCommandInterpreter(
const SBCommandInterpreterRunOptions &options);
510 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 Progress indicator helper class.
A class to manage flag bits.
A class that represents a running process on the host machine.
ScriptLanguage
Script interpreter types.
@ eBroadcastBitProgressCategory
@ eBroadcastBitExternalProgress
@ eBroadcastBitExternalProgressCategory
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.