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;
46 eBroadcastBitProgress = (1 << 0),
47 eBroadcastBitWarning = (1 << 1),
48 eBroadcastBitError = (1 << 2),
57 static const char *GetBroadcasterClass();
89 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
91 uint64_t &OUTPUT, uint64_t &OUTPUT,
94 static const char *GetProgressFromEvent(
const lldb::SBEvent &event,
95 uint64_t &progress_id,
96 uint64_t &completed, uint64_t &total,
97 bool &is_debugger_specific);
108 static void Initialize();
112 static void PrintStackTraceOnError();
114 static void PrintDiagnosticsOnError();
116 static void Terminate();
124 lldb::LogOutputCallback log_callback,
129 static
void MemoryPressureDetected();
131 explicit operator
bool() const;
133 bool IsValid() const;
152 void SetAsync(
bool b);
156 void SkipLLDBInitFiles(
bool b);
158 void SkipAppInitFiles(
bool b);
161 void SetInputFileHandle(FILE *f,
bool transfer_ownership);
163 void SetOutputFileHandle(FILE *f,
bool transfer_ownership);
165 void SetErrorFileHandle(FILE *f,
bool transfer_ownership);
169 FILE *GetInputFileHandle();
171 FILE *GetOutputFileHandle();
173 FILE *GetErrorFileHandle();
176 SBError SetInputString(
const char *data);
196 void SaveInputTerminalState();
198 void RestoreInputTerminalState();
202 void HandleCommand(
const char *command);
204 void RequestInterrupt();
205 void CancelInterruptRequest();
206 bool InterruptRequested();
212 "Use HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, "
213 "SBFile) or HandleProcessEvent(const SBProcess &, const SBEvent &, "
215 "HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, SBFile)")
231 lldb::SBTarget CreateTarget(
const char *filename,
const char *target_triple,
232 const char *platform_name,
235 lldb::SBTarget CreateTargetWithFileAndTargetTriple(
const char *filename,
236 const char *target_triple);
239 const char *archname);
257 uint32_t GetNumTargets();
261 void SetSelectedTarget(
SBTarget &target);
268 uint32_t GetNumPlatforms();
277 uint32_t GetNumAvailablePlatforms();
292 bool SetCurrentPlatformSDKRoot(
const char *sysroot);
296 bool SetUseExternalEditor(
bool input);
298 bool GetUseExternalEditor();
300 bool SetUseColor(
bool use_color);
302 bool GetUseColor()
const;
304 bool SetUseSourceCache(
bool use_source_cache);
306 bool GetUseSourceCache()
const;
308 static bool GetDefaultArchitecture(
char *arch_name,
size_t arch_name_len);
310 static bool SetDefaultArchitecture(
const char *arch_name);
316 static const char *GetVersionString();
326 bool EnableLog(
const char *channel,
const char **categories);
335 "DispatchInput(const void *, size_t)")
336 void DispatchInput(
void *baton, const
void *data,
size_t data_len);
339 void DispatchInput(
const void *data,
size_t data_len);
341 void DispatchInputInterrupt();
343 void DispatchInputEndOfFile();
349 const char *GetInstanceName();
353 static lldb::SBError SetInternalVariable(
const char *var_name,
355 const char *debugger_instance_name);
358 GetInternalVariableValue(
const char *var_name,
359 const char *debugger_instance_name);
363 uint32_t GetTerminalWidth()
const;
365 void SetTerminalWidth(uint32_t term_width);
369 const char *GetPrompt()
const;
371 void SetPrompt(
const char *prompt);
373 const char *GetReproducerPath()
const;
384 bool GetCloseInputOnEOF() const;
387 void SetCloseInputOnEOF(
bool b);
395 bool DeleteCategory(const
char *category_name);
397 uint32_t GetNumCategories();
423 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread);
450 %apply
int& INOUT {
int& num_errors };
451 %apply
bool& INOUT {
bool& quit_requested };
452 %apply
bool& INOUT {
bool& stopped_for_crash };
454 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread,
455 SBCommandInterpreterRunOptions &options,
456 int &num_errors,
bool &quit_requested,
457 bool &stopped_for_crash);
461 RunCommandInterpreter(
const SBCommandInterpreterRunOptions &options);
475 const SBFileSpec &trace_description_file);
479 friend class lldb_private::python::SWIGBridge;
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_DEPRECATED_FIXME(MSG, FIX)
#define LLDB_DEPRECATED(MSG)
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.
StateType
Process and Thread States.
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Debugger > DebuggerSP
void(* SBDebuggerDestroyCallback)(lldb::user_id_t debugger_id, void *baton)
void(* LogOutputCallback)(const char *, void *baton)
std::shared_ptr< lldb_private::File > FileSP
class LLDB_API SBCommandInterpreterRunResult
InputReaderGranularity
Token size/granularities for Input Readers.