10 #ifndef LLDB_SBDebugger_h_
11 #define LLDB_SBDebugger_h_
27 lldb::InputReaderAction,
char const *,
29 void *, lldb::InputReaderGranularity,
char const *,
32 bool IsActive()
const;
41 SBDebugger(
const lldb::DebuggerSP &debugger_sp);
47 static void Initialize();
49 static void Terminate();
57 lldb::LogOutputCallback log_callback,
62 static void MemoryPressureDetected();
68 void SetAsync(
bool b);
72 void SkipLLDBInitFiles(
bool b);
74 void SkipAppInitFiles(
bool b);
76 void SetInputFileHandle(FILE *f,
bool transfer_ownership);
78 void SetOutputFileHandle(FILE *f,
bool transfer_ownership);
80 void SetErrorFileHandle(FILE *f,
bool transfer_ownership);
82 FILE *GetInputFileHandle();
84 FILE *GetOutputFileHandle();
86 FILE *GetErrorFileHandle();
88 void SaveInputTerminalState();
90 void RestoreInputTerminalState();
94 void HandleCommand(
const char *command);
101 lldb::SBTarget CreateTarget(
const char *filename,
const char *target_triple,
102 const char *platform_name,
105 lldb::SBTarget CreateTargetWithFileAndTargetTriple(
const char *filename,
106 const char *target_triple);
109 const char *archname);
125 uint32_t GetNumTargets();
129 void SetSelectedTarget(
SBTarget &target);
141 bool SetCurrentPlatformSDKRoot(
const char *sysroot);
145 bool SetUseExternalEditor(
bool input);
147 bool GetUseExternalEditor();
149 bool SetUseColor(
bool use_color);
151 bool GetUseColor()
const;
153 static bool GetDefaultArchitecture(
char *arch_name,
size_t arch_name_len);
155 static bool SetDefaultArchitecture(
const char *arch_name);
157 lldb::ScriptLanguage GetScriptingLanguage(
const char *script_language_name);
159 static const char *GetVersionString();
161 static const char *StateAsCString(lldb::StateType state);
163 static bool StateIsRunningState(lldb::StateType state);
165 static bool StateIsStoppedState(lldb::StateType state);
167 bool EnableLog(
const char *channel,
const char **categories);
169 void SetLoggingCallback(lldb::LogOutputCallback log_callback,
void *baton);
172 void DispatchInput(
void *baton,
const void *data,
size_t data_len);
174 void DispatchInput(
const void *data,
size_t data_len);
176 void DispatchInputInterrupt();
178 void DispatchInputEndOfFile();
182 const char *GetInstanceName();
186 static lldb::SBError SetInternalVariable(
const char *var_name,
188 const char *debugger_instance_name);
191 GetInternalVariableValue(
const char *var_name,
192 const char *debugger_instance_name);
196 uint32_t GetTerminalWidth()
const;
198 void SetTerminalWidth(uint32_t term_width);
200 lldb::user_id_t GetID();
202 const char *GetPrompt()
const;
204 void SetPrompt(
const char *prompt);
206 lldb::ScriptLanguage GetScriptLanguage()
const;
208 void SetScriptLanguage(lldb::ScriptLanguage script_lang);
210 bool GetCloseInputOnEOF()
const;
212 void SetCloseInputOnEOF(
bool b);
220 bool DeleteCategory(
const char *category_name);
222 uint32_t GetNumCategories();
230 #ifndef LLDB_DISABLE_PYTHON
236 #ifndef LLDB_DISABLE_PYTHON
240 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread);
242 void RunCommandInterpreter(
bool auto_handle_events,
bool spawn_thread,
244 int &num_errors,
bool &quit_requested,
245 bool &stopped_for_crash);
247 SBError RunREPL(lldb::LanguageType language,
const char *repl_options);
257 lldb::SBTarget FindTargetWithLLDBProcess(
const lldb::ProcessSP &processSP);
259 void reset(
const lldb::DebuggerSP &debugger_sp);
261 lldb_private::Debugger *
get()
const;
263 lldb_private::Debugger &ref()
const;
265 const lldb::DebuggerSP &get_sp()
const;
267 lldb::DebuggerSP m_opaque_sp;
273 #endif // LLDB_SBDebugger_h_
class LLDB_API SBDebugger