Go to the documentation of this file.
44 #include "lldb/Host/Config.h"
56 #include "llvm/ADT/STLExtras.h"
57 #include "llvm/ADT/StringRef.h"
58 #include "llvm/Support/DynamicLibrary.h"
59 #include "llvm/Support/ManagedStatic.h"
60 #include "llvm/Support/PrettyStackTrace.h"
61 #include "llvm/Support/Signals.h"
66 static llvm::sys::DynamicLibrary
LoadPlugin(
const lldb::DebuggerSP &debugger_sp,
69 llvm::sys::DynamicLibrary dynlib =
70 llvm::sys::DynamicLibrary::getPermanentLibrary(spec.
GetPath().c_str());
71 if (dynlib.isValid()) {
79 LLDBCommandPluginInit init_func =
80 (LLDBCommandPluginInit)(uintptr_t)dynlib.getAddressOfSymbol(
81 "_ZN4lldb16PluginInitializeENS_10SBDebuggerE");
83 if (init_func(debugger_sb))
86 error.SetErrorString(
"plug-in refused to load "
87 "(lldb::PluginInitialize(lldb::SBDebugger) "
90 error.SetErrorString(
"plug-in is missing the required initialization: "
91 "lldb::PluginInitialize(lldb::SBDebugger)");
95 error.SetErrorString(
"this file does not represent a loadable dylib");
97 error.SetErrorString(
"no such file");
99 return llvm::sys::DynamicLibrary();
127 : m_opaque_sp(debugger_sp) {
153 uint64_t &progress_id,
156 bool &is_debugger_specific) {
160 if (progress_data ==
nullptr)
162 progress_id = progress_data->
GetID();
175 if (!diagnostic_data)
178 auto dictionary = std::make_unique<StructuredData::Dictionary>();
179 dictionary->AddStringItem(
"message", diagnostic_data->
GetMessage());
180 dictionary->AddStringItem(
"type", diagnostic_data->
GetPrefix());
181 dictionary->AddBooleanItem(
"debugger_specific",
185 data.
m_impl_up->SetObjectSP(std::move(dictionary));
205 std::make_unique<SystemInitializerFull>(),
LoadPlugin)) {
214 llvm::EnablePrettyStackTrace();
216 llvm::sys::fs::getMainExecutable(
nullptr,
nullptr);
217 llvm::sys::PrintStackTraceOnErrorSignal(executable);
260 static std::recursive_mutex g_mutex;
261 std::lock_guard<std::recursive_mutex> guard(g_mutex);
266 if (source_init_files) {
296 const bool mandatory =
false;
303 return this->
operator bool();
305 SBDebugger::operator bool()
const {
308 return m_opaque_sp.get() !=
nullptr;
328 m_opaque_sp->GetCommandInterpreter().SkipLLDBInitFiles(b);
335 m_opaque_sp->GetCommandInterpreter().SkipAppInitFiles(b);
342 (FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
348 if (data ==
nullptr) {
353 size_t size = strlen(data);
376 error.ref().SetErrorString(
"invalid debugger");
395 SetOutputFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
402 error.ref().SetErrorString(
"invalid debugger");
406 error.ref().SetErrorString(
"invalid file");
415 SetErrorFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
427 error.ref().SetErrorString(
"invalid debugger");
431 error.ref().SetErrorString(
"invalid file");
513 return sb_interpreter;
520 TargetSP target_sp(
m_opaque_sp->GetSelectedTarget());
521 std::unique_lock<std::recursive_mutex> lock;
523 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
535 ProcessSP process_sp(process.
GetSP());
538 ListenerSP lldb_listener_sp =
m_opaque_sp->GetListener();
539 while (lldb_listener_sp->GetEventForBroadcaster(
540 process_sp.get(), event_sp, std::chrono::seconds(0))) {
568 const SBEvent &event, FILE *out,
572 FileSP outfile = std::make_shared<NativeFile>(out,
false);
573 FileSP errfile = std::make_shared<NativeFile>(err,
false);
578 const SBEvent &event, FileSP out_sp,
590 const uint32_t event_type =
event.GetType();
591 char stdio_buffer[1024];
594 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
599 while ((len = process.
GetSTDOUT(stdio_buffer,
sizeof(stdio_buffer))) > 0)
601 out_sp->Write(stdio_buffer, len);
607 while ((len = process.
GetSTDERR(stdio_buffer,
sizeof(stdio_buffer))) > 0)
609 err_sp->Write(stdio_buffer, len);
628 return sb_source_manager;
634 if (arch_name && arch_name_len) {
639 if (!triple_str.empty())
640 ::snprintf(arch_name, arch_name_len,
"%s", triple_str.c_str());
642 ::snprintf(arch_name, arch_name_len,
"%s",
647 if (arch_name && arch_name_len)
669 if (!script_language_name)
702 llvm::StringRef name,
bool value,
703 llvm::StringRef description) {
704 auto entry_up = std::make_unique<StructuredData::Dictionary>();
705 entry_up->AddBooleanItem(
"value", value);
706 entry_up->AddStringItem(
"description", description);
707 dict.
AddItem(name, std::move(entry_up));
711 auto array_up = std::make_unique<StructuredData::Array>();
712 #define LLVM_TARGET(target) \
713 array_up->AddItem(std::make_unique<StructuredData::String>(#target));
714 #include "llvm/Config/Targets.def"
715 auto entry_up = std::make_unique<StructuredData::Dictionary>();
716 entry_up->AddItem(
"value", std::move(array_up));
717 entry_up->AddStringItem(
"description",
"A list of configured LLVM targets.");
718 dict.
AddItem(
"targets", std::move(entry_up));
724 auto config_up = std::make_unique<StructuredData::Dictionary>();
727 "A boolean value that indicates if XML support is enabled in LLDB");
729 *config_up,
"curses", LLDB_ENABLE_CURSES,
730 "A boolean value that indicates if curses support is enabled in LLDB");
732 *config_up,
"editline", LLDB_ENABLE_LIBEDIT,
733 "A boolean value that indicates if editline support is enabled in LLDB");
735 *config_up,
"lzma", LLDB_ENABLE_LZMA,
736 "A boolean value that indicates if lzma support is enabled in LLDB");
738 *config_up,
"python", LLDB_ENABLE_PYTHON,
739 "A boolean value that indicates if python support is enabled in LLDB");
741 *config_up,
"lua", LLDB_ENABLE_LUA,
742 "A boolean value that indicates if lua support is enabled in LLDB");
744 "A boolean value that indicates if fbsdvmcore support is "
749 data.
m_impl_up->SetObjectSP(std::move(config_up));
770 const char *target_triple,
771 const char *platform_name,
772 bool add_dependent_modules,
775 add_dependent_modules, sb_error);
787 &platform_options, target_sp);
790 sb_target.
SetSP(target_sp);
797 "SBDebugger(%p)::CreateTarget (filename=\"%s\", triple=%s, "
798 "platform_name=%s, add_dependent_modules=%u, error=%s) => "
800 static_cast<void *
>(
m_opaque_sp.get()), filename, target_triple,
801 platform_name, add_dependent_modules, sb_error.
GetCString(),
802 static_cast<void *
>(target_sp.get()));
809 const char *target_triple) {
815 const bool add_dependent_modules =
true;
820 sb_target.
SetSP(target_sp);
825 "SBDebugger(%p)::CreateTargetWithFileAndTargetTriple "
826 "(filename=\"%s\", triple=%s) => SBTarget(%p)",
827 static_cast<void *
>(
m_opaque_sp.get()), filename, target_triple,
828 static_cast<void *
>(target_sp.get()));
834 const char *arch_cstr) {
843 if (arch_cstr ==
nullptr) {
851 PlatformSP platform_sp =
852 m_opaque_sp->GetPlatformList().GetSelectedPlatform();
860 error.SetErrorStringWithFormat(
"invalid arch_cstr: %s", arch_cstr);
863 sb_target.
SetSP(target_sp);
867 "SBDebugger(%p)::CreateTargetWithFileAndArch (filename=\"%s\", "
868 "arch=%s) => SBTarget(%p)",
870 filename ? filename :
"<unspecified>",
871 arch_cstr ? arch_cstr :
"<unspecified>",
872 static_cast<void *
>(target_sp.get()));
884 const bool add_dependent_modules =
true;
891 sb_target.
SetSP(target_sp);
895 "SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
897 static_cast<void *
>(target_sp.get()));
909 LLDB_LOGF(log,
"SBDebugger(%p)::GetDummyTarget() => SBTarget(%p)",
911 static_cast<void *
>(sb_target.
GetSP().get()));
920 TargetSP target_sp(target.
GetSP());
923 result =
m_opaque_sp->GetTargetList().DeleteTarget(target_sp);
924 target_sp->Destroy();
930 LLDB_LOGF(log,
"SBDebugger(%p)::DeleteTarget (SBTarget(%p)) => %i",
932 static_cast<void *
>(target.
m_opaque_sp.get()), result);
951 lldb::TargetSP target_sp = target.
GetSP();
973 const char *arch_name) {
980 m_opaque_sp->GetPlatformList().GetSelectedPlatform().get(), arch_name);
982 m_opaque_sp->GetTargetList().FindTargetWithExecutableAndArchitecture(
983 FileSpec(filename), arch_name ? &arch :
nullptr));
984 sb_target.
SetSP(target_sp);
994 m_opaque_sp->GetTargetList().FindTargetWithProcess(process_sp.get()));
1004 return m_opaque_sp->GetTargetList().GetNumTargets();
1018 target_sp =
m_opaque_sp->GetTargetList().GetSelectedTarget();
1019 sb_target.
SetSP(target_sp);
1025 LLDB_LOGF(log,
"SBDebugger(%p)::GetSelectedTarget () => SBTarget(%p): %s",
1027 static_cast<void *
>(target_sp.get()), sstr.
GetData());
1038 TargetSP target_sp(sb_target.
GetSP());
1040 m_opaque_sp->GetTargetList().SetSelectedTarget(target_sp);
1045 LLDB_LOGF(log,
"SBDebugger(%p)::SetSelectedTarget () => SBTarget(%p): %s",
1047 static_cast<void *
>(target_sp.get()), sstr.
GetData());
1059 sb_platform.
SetSP(debugger_sp->GetPlatformList().GetSelectedPlatform());
1061 LLDB_LOGF(log,
"SBDebugger(%p)::GetSelectedPlatform () => SBPlatform(%p): %s",
1063 static_cast<void *
>(sb_platform.
GetSP().get()),
1075 debugger_sp->GetPlatformList().SetSelectedPlatform(sb_platform.
GetSP());
1078 LLDB_LOGF(log,
"SBDebugger(%p)::SetSelectedPlatform (SBPlatform(%p) %s)",
1080 static_cast<void *
>(sb_platform.
GetSP().get()),
1123 auto platform_dict = std::make_unique<StructuredData::Dictionary>();
1124 llvm::StringRef name_str(
"name"), desc_str(
"description");
1128 platform_dict->AddStringItem(name_str, host_platform_sp->GetPluginName());
1129 platform_dict->AddStringItem(
1130 desc_str, llvm::StringRef(host_platform_sp->GetDescription()));
1131 }
else if (idx > 0) {
1132 llvm::StringRef plugin_name =
1134 if (plugin_name.empty()) {
1137 platform_dict->AddStringItem(name_str, llvm::StringRef(plugin_name));
1139 llvm::StringRef plugin_desc =
1141 platform_dict->AddStringItem(desc_str, llvm::StringRef(plugin_desc));
1191 bool spawn_thread) {
1198 m_opaque_sp->GetCommandInterpreter().RunCommandInterpreter(options);
1205 int &num_errors,
bool &quit_requested,
1206 bool &stopped_for_crash)
1210 num_errors, quit_requested, stopped_for_crash);
1241 const char *repl_options) {
1248 error.SetErrorString(
"invalid debugger");
1272 sb_debugger.
reset(debugger_sp);
1283 const char *debugger_instance_name) {
1292 debugger_sp->GetCommandInterpreter().GetExecutionContext());
1296 error.SetErrorStringWithFormat(
"invalid debugger instance name '%s'",
1297 debugger_instance_name);
1306 const char *debugger_instance_name) {
1314 debugger_sp->GetCommandInterpreter().GetExecutionContext());
1315 lldb::OptionValueSP value_sp(
1316 debugger_sp->GetPropertyValue(&exe_ctx, var_name,
false,
error));
1321 if (!value_str.empty()) {
1349 LLDB_LOGF(log,
"SBDebugger(%p)::GetPrompt () => \"%s\"",
1442 const char *name =
m_opaque_sp->GetInstanceName().AsCString();
1444 strm.
Printf(
"Debugger (instance: \"%s\", id: %" PRIu64
")", name,
id);
1462 if (platform_name_cstr && platform_name_cstr[0]) {
1464 if (PlatformSP platform_sp = platforms.
GetOrCreate(platform_name_cstr))
1481 platform.SetSDKRoot(sysroot);
1503 if (!category_name || *category_name == 0)
1506 TypeCategoryImplSP category_sp;
1509 category_sp,
false)) {
1519 TypeCategoryImplSP category_sp;
1530 if (!category_name || *category_name == 0)
1533 TypeCategoryImplSP category_sp;
1536 category_sp,
true)) {
1546 if (!category_name || *category_name == 0)
1606 if (categories ==
nullptr)
1609 while (categories[len] !=
nullptr)
1611 return llvm::makeArrayRef(categories, len);
1621 llvm::raw_string_ostream error_stream(
error);
1623 log_options, error_stream);
1633 return m_opaque_sp->SetLoggingCallback(log_callback, baton);
void SetSpawnThread(bool)
static const char * StateAsCString(lldb::StateType state)
void HandleCommand(const char *command)
#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME
lldb_private::Debugger & ref() const
static const char * GetProgressFromEvent(const lldb::SBEvent &event, uint64_t &progress_id, uint64_t &completed, uint64_t &total, bool &is_debugger_specific)
Get progress data from a SBEvent whose type is eBroadcastBitProgress.
FILE * GetOutputFileHandle()
uint32_t GetNumCategories()
SBError SetInputFile(SBFile file)
lldb_private::Event * get() const
void SetInputFileHandle(FILE *f, bool transfer_ownership)
size_t PutOutput(FILE *fh)
void DispatchInputEndOfFile()
void SourceInitFileInHomeDirectory(lldb::SBCommandReturnObject &result)
lldb_private::Stream & ref()
static uint32_t GetCount()
void RunCommandInterpreter(bool auto_handle_events, bool spawn_thread)
Run the command interpreter.
ScriptLanguage
Script interpreter types.
static lldb::StateType GetStateFromEvent(const lldb::SBEvent &event)
lldb::SBTarget GetDummyTarget()
static const char * GetBroadcasterClass()
static bool StateIsStoppedState(lldb::StateType state)
lldb_private::CommandInterpreter * get()
lldb::SBSourceManager GetSourceManager()
uint32_t GetIndexOfTarget(lldb::SBTarget target)
void SkipLLDBInitFiles(bool b)
void SkipAppInitFiles(bool skip_app_init_files)
lldb::SBError SetCurrentPlatform(const char *platform_name)
bool GetUseExternalEditor()
bool IsDebuggerSpecific() const
const char * GetCString() const
uint32_t GetTerminalWidth() const
FILE * GetErrorFileHandle()
void(* LogOutputCallback)(const char *, void *baton)
static bool GetCategory(ConstString category, lldb::TypeCategoryImplSP &entry, bool allow_create=true)
static lldb::SBDebugger Create()
SBError SetOutputFile(SBFile file)
void SetSpawnThread(bool spawn_thread)
class LLDB_API SBTypeSynthetic
#define LLDB_LOGF(log,...)
lldb::SBTarget GetSelectedTarget()
lldb::SBListener GetListener()
class LLDB_API SBTypeSummary
const char * StateAsCString(lldb::StateType state)
Converts a StateType to a C string.
LanguageType
Programming language type.
const char * GetVersion()
Retrieves a string representing the complete LLDB version, which includes the lldb version number,...
const char * GetInstanceName()
bool StateIsRunningState(lldb::StateType state)
Check if a state represents a state where the process or thread is running.
static void MemoryPressureDetected()
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
static lldb::ScriptLanguage ToScriptLanguage(llvm::StringRef s, lldb::ScriptLanguage fail_value, bool *success_ptr)
static lldb::DebuggerSP CreateInstance(lldb::LogOutputCallback log_callback=nullptr, void *baton=nullptr)
size_t SplitIntoLines(const std::string &lines)
SBError SetErrorFile(SBFile file)
bool DeleteTarget(lldb::SBTarget &target)
bool Exists(const FileSpec &file_spec) const
Returns whether the given file exists.
uint32_t GetNumAvailablePlatforms()
Get the number of available platforms.
#define LLDB_INSTRUMENT()
SBTypeFilter GetFilterForType(SBTypeNameSpecifier)
static const DiagnosticEventData * GetEventDataFromEvent(const Event *event_ptr)
void ReportEventState(const lldb::SBEvent &event, FILE *out) const
void reset(lldb::ListenerSP listener_sp)
llvm::Triple & GetTriple()
Architecture triple accessor.
static void PrintStackTraceOnError()
void SetAutoHandleEvents(bool)
size_t GetSTDOUT(char *dst, size_t dst_len) const
class LLDB_API SBStringList
bool GetDescription(lldb::SBStream &description)
lldb::ReturnStatus HandleCommand(const char *command_line, lldb::SBCommandReturnObject &result, bool add_to_history=false)
static bool Delete(ConstString category)
void SetPrompt(const char *prompt)
llvm::StringRef GetString() const
CommandInterpreterRunResult RunCommandInterpreter(CommandInterpreterRunOptions &options)
StructuredDataImplUP m_impl_up
SBTypeCategory CreateCategory(const char *category_name)
SBTypeCategory GetDefaultCategory()
static const char * GetVersionString()
lldb::SBTarget CreateTargetWithFileAndTargetTriple(const char *filename, const char *target_triple)
void SetSelectedTarget(SBTarget &target)
void SetErrorFileHandle(FILE *f, bool transfer_ownership)
bool SetUseColor(bool use_color)
llvm::StringRef GetPrefix() const
void SetScriptLanguage(lldb::ScriptLanguage script_lang)
SBTypeCategory GetCategory(const char *category_name)
static llvm::raw_ostream & error(Stream &strm)
static ConstString GetStaticBroadcasterClass()
static lldb::ScriptedSyntheticChildrenSP GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp)
lldb::SBStructuredData GetAvailablePlatformInfoAtIndex(uint32_t idx)
Get the name and description of one of the available platforms.
bool StateIsStoppedState(lldb::StateType state, bool must_exist)
Check if a state represents a state where the process or thread is stopped.
static void AddLLVMTargets(StructuredData::Dictionary &dict)
lldb_private::CommandInterpreterRunOptions & ref() const
static lldb::SBError InitializeWithErrorHandling()
bool GetCloseInputOnEOF() const
static lldb::SBError SetInternalVariable(const char *var_name, const char *value, const char *debugger_instance_name)
FILE * GetInputFileHandle()
void SetSelectedPlatform(lldb::SBPlatform &platform)
size_t PutError(FILE *fh)
size_t GetSTDERR(char *dst, size_t dst_len) const
lldb::LanguageType GetREPLLanguage() const
std::shared_ptr< Object > ObjectSP
uint32_t GetNumPlatforms()
Get the number of currently active platforms.
SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier)
static const ProgressEventData * GetEventDataFromEvent(const Event *event_ptr)
const char * GetReproducerPath() const
lldb::ScriptLanguage GetScriptLanguage() const
void SetErrorString(const char *err_str)
const char * GetPrompt() const
void SetTerminalWidth(uint32_t term_width)
void RestoreInputTerminalState()
static bool StateIsRunningState(lldb::StateType state)
static void AddBoolConfigEntry(StructuredData::Dictionary &dict, llvm::StringRef name, bool value, llvm::StringRef description)
SBError RunREPL(lldb::LanguageType language, const char *repl_options)
static size_t RemoveOrphanSharedModules(bool mandatory)
void PushInputReader(lldb::SBInputReader &reader)
lldb::SBTarget FindTargetWithLLDBProcess(const lldb::ProcessSP &processSP)
bool EnableLog(const char *channel, const char **categories)
SBTypeSummary GetSummaryForType(SBTypeNameSpecifier)
string(SUBSTRING ${p} 10 -1 pStripped) if($
bool GetUseSourceCache() const
void reset(const lldb::DebuggerSP &debugger_sp)
lldb::SBPlatform GetPlatformAtIndex(uint32_t idx)
Get one of the currently active platforms.
bool IsValid() const
Tests if this ArchSpec is valid.
bool IsDebuggerSpecific() const
void SetError(uint32_t err, lldb::ErrorType type)
bool IsResult(lldb::CommandInterpreterResult result)
void SaveInputTerminalState()
SBTypeFormat GetFormatForType(SBTypeNameSpecifier)
static void Destroy(lldb::SBDebugger &debugger)
lldb::SBDebugger & operator=(const lldb::SBDebugger &rhs)
void AddItem(llvm::StringRef key, ObjectSP value_sp)
lldb::SBTarget GetTargetAtIndex(uint32_t idx)
void SourceInitFileInGlobalDirectory(lldb::SBCommandReturnObject &result)
static llvm::sys::DynamicLibrary LoadPlugin(const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Status &error)
static bool GetDefaultArchitecture(char *arch_name, size_t arch_name_len)
#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP
lldb::SBTarget FindTargetWithProcessID(pid_t pid)
static lldb::TypeSummaryImplSP GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp)
static lldb::DebuggerSP FindDebuggerWithInstanceName(ConstString instance_name)
SBTypeCategory GetCategoryAtIndex(uint32_t)
void SetCloseInputOnEOF(bool b)
static llvm::ArrayRef< const char * > GetCategoryArray(const char **categories)
lldb::SBCommandInterpreter GetCommandInterpreter()
static ArchSpec GetDefaultArchitecture()
const char * GetArchitectureName() const
Returns a static string representing the current architecture.
@ eLanguageTypeUnknown
Unknown or invalid language value.
static lldb::TypeFilterImplSP GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp)
void HandleProcessEvent(const lldb::SBProcess &process, const lldb::SBEvent &event, FILE *out, FILE *err)
lldb::SBPlatform GetSelectedPlatform()
lldb::ProcessSP GetSP() const
class LLDB_API SBTypeCategory
lldb::SBTarget CreateTarget(const char *filename, const char *target_triple, const char *platform_name, bool add_dependent_modules, lldb::SBError &error)
SBError SetInputString(const char *data)
lldb::TargetSP m_opaque_sp
lldb::SBTarget FindTargetWithFileAndArch(const char *filename, const char *arch)
static llvm::StringRef GetPlatformPluginDescriptionAtIndex(uint32_t idx)
static bool SetDefaultArchitecture(const char *arch_name)
uint32_t GetNumErrors() const
void SetErrorString(llvm::StringRef err_str)
Set the current error string to err_str.
static lldb::DebuggerSP FindDebuggerWithID(lldb::user_id_t id)
class LLDB_API SBTypeFormat
lldb::SBBroadcaster GetBroadcaster()
uint64_t GetCompleted() const
bool SetCurrentPlatformSDKRoot(const char *sysroot)
static lldb::SBStructuredData GetDiagnosticFromEvent(const lldb::SBEvent &event)
const std::string & GetMessage() const
static llvm::ManagedStatic< SystemLifetimeManager > g_debugger_lifetime
const char * GetCString() const
Get the string value as a C string.
@ eCommandInterpreterResultInferiorCrash
Stopped because the corresponding option was set and the inferior crashed.
SBStructuredData GetScriptInterpreterInfo(ScriptLanguage)
virtual StructuredData::DictionarySP GetInterpreterInfo()
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
lldb::ScriptLanguage GetScriptingLanguage(const char *script_language_name)
static FileSystem & Instance()
void SetSP(const lldb::TargetSP &target_sp)
void SetREPLLanguage(lldb::LanguageType repl_lang)
lldb_private::Status & ref()
A class that represents a running process on the host machine.
class LLDB_API SBCommandInterpreterRunResult
void SetOutputFileHandle(FILE *f, bool transfer_ownership)
void SkipLLDBInitFiles(bool skip_lldbinit_files)
bool SetUseExternalEditor(bool input)
static lldb::TypeCategoryImplSP GetCategoryAtIndex(size_t)
void DispatchInput(void *baton, const void *data, size_t data_len)
void reset(lldb_private::CommandInterpreter *)
lldb::TargetSP GetSP() const
#define LLDB_INSTRUMENT_VA(...)
@ eBroadcastBitStateChanged
virtual FILE * GetStream()
Get the underlying libc stream for this file, or NULL.
class LLDB_API SBTypeFilter
uint64_t GetTotal() const
InputReaderGranularity
Token size/granularities for Input Readers.
StateType
Process and Thread States.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
void SetAutoHandleEvents(bool auto_handle_events)
const lldb::DebuggerSP & get_sp() const
lldb::DebuggerSP m_opaque_sp
const std::string & GetMessage() const
static void SetDefaultArchitecture(const ArchSpec &arch)
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
static lldb::SBStringList GetInternalVariableValue(const char *var_name, const char *debugger_instance_name)
static SBDebugger FindDebuggerWithID(int id)
void SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton)
static llvm::StringRef GetPlatformPluginNameAtIndex(uint32_t idx)
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
lldb_private::Debugger * get() const
void DispatchInputInterrupt()
SBTypeFormat GetFormatForType(SBTypeNameSpecifier)
lldb::SBTarget CreateTargetWithFileAndArch(const char *filename, const char *archname)
bool DeleteCategory(const char *category_name)
static void Destroy(lldb::DebuggerSP &debugger_sp)
lldb::SBTarget GetTarget() const
bool SetUseSourceCache(bool use_source_cache)
lldb::TypeNameSpecifierImplSP GetSP()
static SBStructuredData GetBuildConfiguration()
void SkipAppInitFiles(bool b)
@ eCommandInterpreterResultQuitRequested
Stopped because quit was requested.