65#include "llvm/ADT/STLExtras.h"
66#include "llvm/ADT/StringRef.h"
67#include "llvm/ADT/iterator.h"
68#include "llvm/Config/llvm-config.h"
69#include "llvm/Support/DynamicLibrary.h"
70#include "llvm/Support/FileSystem.h"
71#include "llvm/Support/Process.h"
72#include "llvm/Support/ThreadPool.h"
73#include "llvm/Support/Threading.h"
74#include "llvm/Support/raw_ostream.h"
86#include <system_error>
106#pragma mark Static Functions
118 "Never show disassembly when displaying a stop context.",
123 "Show disassembly when there is no debug information.",
128 "Show disassembly when there is no source information, or the source "
130 "is missing when displaying a stop context.",
135 "Always show disassembly when displaying a stop context.",
143 "Disable scripting languages.",
148 "Select python as the default scripting language.",
153 "Select the lldb default as the default scripting language.",
159 "Use no verbosity when running dwim-print."},
161 "Use partial verbosity when running dwim-print - display a message when "
162 "`expression` evaluation is used."},
164 "Use full verbosity when running dwim-print."},
171 "Highlight the stop column with ANSI terminal codes when color/ANSI "
172 "mode is enabled; otherwise, fall back to using a text-only caret (^) "
173 "as if \"caret-only\" mode was selected.",
178 "Highlight the stop column with ANSI terminal codes when running LLDB "
179 "with color/ANSI enabled.",
184 "Highlight the stop column with a caret character (^) underneath the "
185 "stop column. This method introduces a new line in source listings "
186 "that display thread stop locations.",
191 "Do not highlight the stop column.",
195#define LLDB_PROPERTIES_debugger
196#include "CoreProperties.inc"
199#define LLDB_PROPERTIES_debugger
200#include "CorePropertiesEnum.inc"
207 llvm::StringRef property_path,
208 llvm::StringRef value) {
209 bool is_load_script =
210 (property_path ==
"target.load-script-from-symbol-file");
212 bool invalidate_data_vis = (property_path ==
"escape-non-printables");
213 invalidate_data_vis |=
214 (property_path ==
"target.max-zero-padding-in-float-format");
215 if (invalidate_data_vis) {
221 if (is_load_script && exe_ctx && exe_ctx->
GetTargetSP()) {
223 load_script_old_value =
224 target_sp->TargetProperties::GetLoadScriptFromSymbolFile();
227 if (
error.Success()) {
229 if (property_path == g_debugger_properties[ePropertyPrompt].name) {
230 llvm::StringRef new_prompt =
GetPrompt();
236 auto bytes = std::make_unique<EventDataBytes>(new_prompt);
237 auto prompt_change_event_sp = std::make_shared<Event>(
240 }
else if (property_path == g_debugger_properties[ePropertyUseColor].name) {
244 }
else if (property_path ==
245 g_debugger_properties[ePropertyPromptAnsiPrefix].name ||
247 g_debugger_properties[ePropertyPromptAnsiSuffix].name) {
251 }
else if (property_path ==
252 g_debugger_properties[ePropertyShowStatusline].name) {
262 }
else if (property_path ==
263 g_debugger_properties[ePropertyStatuslineFormat].name ||
265 g_debugger_properties[ePropertySeparator].name) {
268 }
else if (property_path ==
269 g_debugger_properties[ePropertyUseSourceCache].name) {
275 }
else if (is_load_script && target_sp &&
277 if (target_sp->TargetProperties::GetLoadScriptFromSymbolFile() ==
279 std::list<Status> errors;
281 if (!target_sp->LoadScriptingResources(errors, feedback_stream)) {
283 for (
auto &
error : errors)
284 s->Printf(
"%s\n",
error.AsCString());
286 s->PutCString(feedback_stream.
GetString());
295 constexpr uint32_t idx = ePropertyAutoConfirm;
297 idx, g_debugger_properties[idx].default_uint_value != 0);
301 constexpr uint32_t idx = ePropertyDisassemblyFormat;
306 constexpr uint32_t idx = ePropertyFrameFormat;
311 constexpr uint32_t idx = ePropertyFrameFormatUnique;
316 constexpr uint32_t idx = ePropertyStopDisassemblyMaxSize;
318 idx, g_debugger_properties[idx].default_uint_value);
322 constexpr uint32_t idx = ePropertyNotiftVoid;
324 idx, g_debugger_properties[idx].default_uint_value != 0);
328 constexpr uint32_t idx = ePropertyPrompt;
330 idx, g_debugger_properties[idx].default_cstr_value);
334 const uint32_t idx = ePropertyPromptAnsiPrefix;
336 idx, g_debugger_properties[idx].default_cstr_value);
340 const uint32_t idx = ePropertyPromptAnsiSuffix;
342 idx, g_debugger_properties[idx].default_cstr_value);
346 constexpr uint32_t idx = ePropertyPrompt;
348 llvm::StringRef new_prompt =
GetPrompt();
357 constexpr uint32_t idx = ePropertyThreadFormat;
362 constexpr uint32_t idx = ePropertyThreadStopFormat;
367 const uint32_t idx = ePropertyScriptLanguage;
370 g_debugger_properties[idx].default_uint_value));
374 const uint32_t idx = ePropertyScriptLanguage;
379 const uint32_t idx = ePropertyREPLLanguage;
384 const uint32_t idx = ePropertyREPLLanguage;
389 const uint32_t idx = ePropertyTerminalWidth;
391 idx, g_debugger_properties[idx].default_uint_value);
395 const uint32_t idx = ePropertyTerminalWidth;
399 handler_sp->TerminalSizeChanged();
411 const uint32_t idx = ePropertyTerminalHeight;
413 idx, g_debugger_properties[idx].default_uint_value);
417 const uint32_t idx = ePropertyTerminalHeight;
421 handler_sp->TerminalSizeChanged();
433 const uint32_t idx = ePropertyUseExternalEditor;
435 idx, g_debugger_properties[idx].default_uint_value != 0);
439 const uint32_t idx = ePropertyUseExternalEditor;
444 const uint32_t idx = ePropertyExternalEditor;
446 idx, g_debugger_properties[idx].default_cstr_value);
450 const uint32_t idx = ePropertyExternalEditor;
455 const uint32_t idx = ePropertyUseColor;
457 idx, g_debugger_properties[idx].default_uint_value != 0);
461 const uint32_t idx = ePropertyUseColor;
470 const uint32_t idx = ePropertyShowProgress;
472 idx, g_debugger_properties[idx].default_uint_value != 0);
476 const uint32_t idx = ePropertyShowProgress;
481 const uint32_t idx = ePropertyShowProgressAnsiPrefix;
483 idx, g_debugger_properties[idx].default_cstr_value);
487 const uint32_t idx = ePropertyShowProgressAnsiSuffix;
489 idx, g_debugger_properties[idx].default_cstr_value);
493 const uint32_t idx = ePropertyShowStatusline;
495 idx, g_debugger_properties[idx].default_uint_value != 0);
499 constexpr uint32_t idx = ePropertyStatuslineFormat;
504 constexpr uint32_t idx = ePropertyStatuslineFormat;
511 constexpr uint32_t idx = ePropertySeparator;
513 idx, g_debugger_properties[idx].default_cstr_value);
517 const uint32_t idx = ePropertyShowDisabledAnsiPrefix;
519 idx, g_debugger_properties[idx].default_cstr_value);
523 const uint32_t idx = ePropertyShowDisabledAnsiSuffix;
525 idx, g_debugger_properties[idx].default_cstr_value);
529 constexpr uint32_t idx = ePropertySeparator;
536 const uint32_t idx = ePropertyShowAutosuggestion;
538 idx, g_debugger_properties[idx].default_uint_value != 0);
542 const uint32_t idx = ePropertyShowAutosuggestionAnsiPrefix;
544 idx, g_debugger_properties[idx].default_cstr_value);
548 const uint32_t idx = ePropertyShowAutosuggestionAnsiSuffix;
550 idx, g_debugger_properties[idx].default_cstr_value);
554 const uint32_t idx = ePropertyShowRegexMatchAnsiPrefix;
556 idx, g_debugger_properties[idx].default_cstr_value);
560 const uint32_t idx = ePropertyShowRegexMatchAnsiSuffix;
562 idx, g_debugger_properties[idx].default_cstr_value);
566 const uint32_t idx = ePropertyShowDontUsePoHint;
568 idx, g_debugger_properties[idx].default_uint_value != 0);
572 const uint32_t idx = ePropertyUseSourceCache;
574 idx, g_debugger_properties[idx].default_uint_value != 0);
578 const uint32_t idx = ePropertyUseSourceCache;
586 const uint32_t idx = ePropertyHighlightSource;
588 idx, g_debugger_properties[idx].default_uint_value != 0);
592 const uint32_t idx = ePropertyStopShowColumn;
595 g_debugger_properties[idx].default_uint_value));
599 const uint32_t idx = ePropertyStopShowColumnAnsiPrefix;
601 idx, g_debugger_properties[idx].default_cstr_value);
605 const uint32_t idx = ePropertyStopShowColumnAnsiSuffix;
607 idx, g_debugger_properties[idx].default_cstr_value);
611 const uint32_t idx = ePropertyStopShowLineMarkerAnsiPrefix;
613 idx, g_debugger_properties[idx].default_cstr_value);
617 const uint32_t idx = ePropertyStopShowLineMarkerAnsiSuffix;
619 idx, g_debugger_properties[idx].default_cstr_value);
624 before ? ePropertyStopLineCountBefore : ePropertyStopLineCountAfter;
626 idx, g_debugger_properties[idx].default_uint_value);
630 const uint32_t idx = ePropertyStopDisassemblyDisplay;
633 g_debugger_properties[idx].default_uint_value));
637 const uint32_t idx = ePropertyStopDisassemblyCount;
639 idx, g_debugger_properties[idx].default_uint_value);
643 const uint32_t idx = ePropertyAutoOneLineSummaries;
645 idx, g_debugger_properties[idx].default_uint_value != 0);
649 const uint32_t idx = ePropertyEscapeNonPrintables;
651 idx, g_debugger_properties[idx].default_uint_value != 0);
655 const uint32_t idx = ePropertyAutoIndent;
657 idx, g_debugger_properties[idx].default_uint_value != 0);
661 const uint32_t idx = ePropertyAutoIndent;
666 const uint32_t idx = ePropertyPrintDecls;
668 idx, g_debugger_properties[idx].default_uint_value != 0);
672 const uint32_t idx = ePropertyPrintDecls;
677 const uint32_t idx = ePropertyTabSize;
679 idx, g_debugger_properties[idx].default_uint_value);
683 const uint32_t idx = ePropertyTabSize;
688 const uint32_t idx = ePropertyDWIMPrintVerbosity;
691 g_debugger_properties[idx].default_uint_value != 0));
695 const uint32_t idx = ePropertyShowInlineDiagnostics;
697 idx, g_debugger_properties[idx].default_uint_value);
701 const uint32_t idx = ePropertyShowInlineDiagnostics;
716 "Debugger::Initialize called more than once!");
719 g_thread_pool =
new llvm::DefaultThreadPool(llvm::optimal_concurrency());
725 "Debugger::Terminate called without a matching Debugger::Initialize!");
730 debugger->HandleDestroyCallback();
755 llvm::sys::DynamicLibrary dynlib =
757 if (dynlib.isValid()) {
772 llvm::StringRef path) {
775 static constexpr llvm::StringLiteral g_dylibext(
".dylib");
776 static constexpr llvm::StringLiteral g_solibext(
".so");
783 namespace fs = llvm::sys::fs;
788 if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
789 ft == fs::file_type::type_unknown) {
799 debugger->
LoadPlugin(plugin_file_spec, plugin_load_error);
802 }
else if (ft == fs::file_type::directory_file ||
803 ft == fs::file_type::symlink_file ||
804 ft == fs::file_type::type_unknown) {
816 const bool find_directories =
true;
817 const bool find_files =
true;
818 const bool find_other =
true;
820 if (
FileSpec dir_spec = HostInfo::GetSystemPluginDir()) {
822 dir_spec.GetPath(dir_path,
sizeof(dir_path))) {
824 find_files, find_other,
829 if (
FileSpec dir_spec = HostInfo::GetUserPluginDir()) {
831 dir_spec.GetPath(dir_path,
sizeof(dir_path))) {
833 find_files, find_other,
849 helper.SetDebugger(debugger_sp.get());
855 debugger_sp->InstanceInitialize();
889 debugger_sp->HandleDestroyCallback();
896 (*debugger_sp->GetAsyncOutputStream())
899 (*debugger_sp->GetAsyncErrorStream()) << result.
GetErrorString() <<
'\n';
902 debugger_sp->Clear();
908 if ((*pos).get() == debugger_sp.get()) {
926 if (llvm::StringRef(debugger_sp->GetInstanceName()) == instance_name)
938 target_sp = (*pos)->GetTargetList().FindTargetWithProcessID(pid);
952 target_sp = (*pos)->GetTargetList().FindTargetWithProcess(process);
961 static constexpr llvm::StringLiteral class_name(
"lldb.debugger");
990 "target",
"Settings specify to debugging targets.",
true,
993 "platform",
"Platform settings.",
true,
996 "symbols",
"Symbol lookup and cache settings.",
true,
1004 "Settings specify to the debugger's command interpreter.",
true,
1009 std::make_shared<CallbackLogHandler>(log_callback, baton);
1013 assert(default_platform_sp);
1020 arch = HostInfo::GetArchitecture();
1021 assert(arch.
IsValid() &&
"No valid default or host archspec");
1022 const bool is_dummy_target =
true;
1024 new Target(*
this, arch, default_platform_sp, is_dummy_target));
1030 ePropertyTerminalWidth);
1035 ePropertyTerminalHeight);
1039 const char *term = getenv(
"TERM");
1040 auto disable_color = [&]() {
1045 if (term && !strcmp(term,
"dumb"))
1053 [
this](
const FileSpec &dir) -> llvm::Error {
1055 llvm::StringRef log_path = entry.first();
1056 llvm::StringRef file_name = llvm::sys::path::filename(log_path);
1058 std::error_code ec =
1059 llvm::sys::fs::copy_file(log_path, destination.
GetPath());
1061 return llvm::errorCodeToError(ec);
1063 return llvm::Error::success();
1067#if defined(_WIN32) && defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
1070 llvm::sys::Process::UseANSIEscapeCodes(
true);
1099 if (
ProcessSP process_sp = target_sp->GetProcessSP())
1100 process_sp->Finalize(
false );
1101 target_sp->Destroy();
1126static inline int OpenPipe(
int fds[2], std::size_t size) {
1128 return _pipe(fds, size, O_BINARY);
1138 int fds[2] = {-1, -1};
1140 if (data ==
nullptr) {
1145 size_t size = strlen(data);
1153 "can't create pipe file descriptors for LLDB commands");
1157 int r = write(fds[
WRITE], data, size);
1161 llvm::sys::Process::SafelyCloseFileDescriptor(fds[
WRITE]);
1165 FILE *commands_file = fdopen(fds[
READ],
"rb");
1166 if (commands_file ==
nullptr) {
1168 "fdopen(%i, \"rb\") failed (errno = %i) "
1169 "when trying to open LLDB commands pipe",
1171 llvm::sys::Process::SafelyCloseFileDescriptor(fds[
READ]);
1180 assert(file_sp && file_sp->IsValid());
1188 assert(file_sp && file_sp->IsValid());
1194 assert(file_sp && file_sp->IsValid());
1220 std::optional<ExecutionContextRef> exe_ctx_ref) {
1230 bool adopt_selected =
true;
1246 reader_sp->Interrupt();
1253 reader_sp->GotEOF();
1275 std::lock_guard<std::recursive_mutex> guard(
1281 if (top_reader_sp && top_reader_sp->GetIsDone())
1298 while (top_reader_sp) {
1299 top_reader_sp->Run();
1302 if (top_reader_sp.get() == reader_sp.get()) {
1311 if (top_reader_sp && top_reader_sp->GetIsDone()) {
1314 if (top_reader_sp.get() == reader_sp.get())
1338 locked_stream.
Write(s, len);
1359 bool cancel_top_handler) {
1374 if (!in || !in->IsValid()) {
1376 in = top_reader_sp->GetInputFileSP();
1384 if (!out || !out->GetUnlockedFile().IsValid()) {
1386 out = top_reader_sp->GetOutputStreamFileSP();
1395 if (!err || !err->GetUnlockedFile().IsValid()) {
1397 err = top_reader_sp->GetErrorStreamFileSP();
1408 bool cancel_top_handler) {
1418 if (reader_sp == top_reader_sp)
1423 reader_sp->Activate();
1427 if (top_reader_sp) {
1428 top_reader_sp->Deactivate();
1429 if (cancel_top_handler)
1430 top_reader_sp->Cancel();
1447 if (pop_reader_sp != reader_sp)
1450 reader_sp->Deactivate();
1451 reader_sp->Cancel();
1456 reader_sp->Activate();
1465 reader_sp->Refresh();
1469 return std::make_unique<StreamAsynchronousIO>(*
this,
1474 return std::make_unique<StreamAsynchronousIO>(*
this,
1502 std::string function_name,
const llvm::formatv_object_base &payload)
1507 desc << payload <<
"\n";
1521 if (debugger_sp->InterruptRequested())
1522 result.push_back(debugger_sp);
1541 if (index < g_debugger_list_ptr->size())
1555 if ((*pos)->GetID() ==
id) {
1571 if (format ==
nullptr) {
1575 format = &format_entry;
1577 if (format ==
nullptr) {
1579 format = &format_entry;
1582 bool function_changed =
false;
1583 bool initial_function =
false;
1589 function_changed =
true;
1593 function_changed =
true;
1603 initial_function =
true;
1606 function_changed, initial_function);
1610 llvm::StringRef backtrace,
1611 llvm::StringRef prompt) {
1623 std::make_shared<CallbackLogHandler>(log_callback, baton);
1646 if (it->token == token) {
1655 std::string title, std::string details,
1656 uint64_t completed, uint64_t total,
1657 bool is_debugger_specific,
1658 uint32_t progress_broadcast_bit) {
1664 progress_broadcast_bit,
1666 completed, total, is_debugger_specific)));
1671 std::string details, uint64_t completed,
1673 std::optional<lldb::user_id_t> debugger_id,
1674 uint32_t progress_broadcast_bit) {
1682 std::move(details), completed, total,
1684 progress_broadcast_bit);
1695 progress_broadcast_bit);
1700 std::string message,
1701 bool debugger_specific) {
1702 uint32_t event_type = 0;
1705 assert(
false &&
"eSeverityInfo should not be broadcast");
1724 EventSP event_sp = std::make_shared<Event>(
1731 std::optional<lldb::user_id_t> debugger_id,
1732 std::once_flag *once) {
1733 auto ReportDiagnosticLambda = [&]() {
1766 std::call_once(*once, ReportDiagnosticLambda);
1768 ReportDiagnosticLambda();
1772 std::optional<lldb::user_id_t> debugger_id,
1773 std::once_flag *once) {
1778 std::optional<lldb::user_id_t> debugger_id,
1779 std::once_flag *once) {
1784 std::optional<lldb::user_id_t> debugger_id,
1785 std::once_flag *once) {
1793 EventSP event_sp = std::make_shared<Event>(
1796 debugger_sp->GetBroadcaster().BroadcastEvent(event_sp);
1801static std::shared_ptr<LogHandler>
1803 size_t buffer_size) {
1804 switch (log_handler_kind) {
1806 return std::make_shared<StreamLogHandler>(fd, should_close, buffer_size);
1808 return std::make_shared<RotatingLogHandler>(buffer_size);
1810 return std::make_shared<SystemLogHandler>();
1818 llvm::ArrayRef<const char *> categories,
1819 llvm::StringRef log_file, uint32_t log_options,
1821 llvm::raw_ostream &error_stream) {
1823 std::shared_ptr<LogHandler> log_handler_sp;
1829 }
else if (log_file.empty()) {
1832 false, buffer_size);
1836 log_handler_sp = pos->second.lock();
1837 if (!log_handler_sp) {
1845 FileSpec(log_file), flags, lldb::eFilePermissionsFileDefault,
false);
1847 error_stream <<
"Unable to open log file '" << log_file
1848 <<
"': " << llvm::toString(file.takeError()) <<
"\n";
1858 assert(log_handler_sp);
1860 if (log_options == 0)
1869 std::optional<lldb::ScriptLanguage> language) {
1892 using namespace lldb;
1893 const uint32_t event_type =
1910 if (event_type & eBreakpointEventTypeLocationsAdded) {
1911 uint32_t num_new_locations =
1914 if (num_new_locations > 0) {
1918 output_up->Printf(
"%d location%s added to breakpoint %d\n",
1919 num_new_locations, num_new_locations == 1 ?
"" :
"s",
1920 breakpoint->GetID());
1938 bool flush_stderr) {
1939 const auto &flush = [&](
Stream &stream,
1944 while ((len = (process.*get)(buffer,
sizeof(buffer),
error)) > 0)
1945 stream.
Write(buffer, len);
1958 const uint32_t event_type = event_sp->GetType();
1969 bool pop_process_io_handler =
false;
1972 bool state_is_stopped =
false;
1973 const bool got_state_changed =
1977 const bool got_structured_data =
1980 if (got_state_changed) {
1987 if (got_state_changed && !state_is_stopped) {
1992 pop_process_io_handler);
1997 got_stderr || got_state_changed);
2000 if (got_structured_data) {
2004 auto structured_data_sp =
2008 plugin_sp->GetDescription(structured_data_sp, content_stream);
2009 if (
error.Success()) {
2010 if (!content_stream.
GetString().empty()) {
2013 content_stream.
Flush();
2016 output_stream_up->PutCString(content_stream.
GetString());
2019 error_stream_up->Format(
"Failed to print structured "
2020 "data with plugin {0}: {1}",
2021 plugin_sp->GetPluginName(),
error);
2027 if (got_state_changed && state_is_stopped) {
2030 pop_process_io_handler);
2033 output_stream_up->Flush();
2034 error_stream_up->Flush();
2036 if (pop_process_io_handler)
2037 process_sp->PopProcessIOHandler();
2045 const uint32_t event_type = event_sp->GetType();
2046 const bool stop_format =
true;
2075 File &file = stream_sp->GetUnlockedFile();
2098 broadcaster_class_process,
2109 process_event_spec);
2112 listener_sp->StartListeningForEvents(
2118 listener_sp->StartListeningForEvents(
2139 if (listener_sp->GetEvent(event_sp, std::nullopt)) {
2140 std::optional<ExecutionContextRef> exe_ctx_ref = std::nullopt;
2142 Broadcaster *broadcaster = event_sp->GetBroadcaster();
2144 uint32_t event_type = event_sp->GetType();
2146 if (broadcaster_class == broadcaster_class_process) {
2151 }
else if (broadcaster_class == broadcaster_class_target) {
2156 }
else if (broadcaster_class == broadcaster_class_thread) {
2165 }
else if (event_type &
2167 const char *data =
static_cast<const char *
>(
2169 if (data && data[0]) {
2171 error_up->PutCString(data);
2175 eBroadcastBitAsynchronousOutputData) {
2176 const char *data =
static_cast<const char *
>(
2178 if (data && data[0]) {
2180 output_up->PutCString(data);
2217 ConstString full_name(
"lldb.debugger.event-handler");
2222 llvm::StringRef thread_name =
2223 full_name.
GetLength() < llvm::get_max_thread_name_length()
2225 :
"dbg.evt-handler";
2228 llvm::Expected<HostThread> event_handler_thread =
2233 if (event_handler_thread) {
2237 "failed to launch host thread: {0}");
2246 listener_sp->GetEvent(event_sp, std::nullopt);
2271 ProgressReport progress_report{data->GetID(), data->GetCompleted(),
2272 data->GetTotal(), data->GetMessage()};
2279 return report.id == progress_report.
id;
2282 const bool complete = data->GetCompleted() == data->GetTotal();
2286 *it = progress_report;
2293std::optional<Debugger::ProgressReport>
2297 return std::nullopt;
2324 if (io_handler_thread) {
2328 "failed to launch host thread: {0}");
2356 if (!prefer_dummy) {
2374 language = *single_lang;
2375 }
else if (repl_languages.
Empty()) {
2377 "LLDB isn't configured with REPL support for any languages.");
2381 "Multiple possible REPL languages. Please specify a language.");
2397 "couldn't find a REPL for %s",
2402 repl_sp->SetCompilerOptions(repl_options);
2410 "Debugger::GetThreadPool called before Debugger::Initialize");
static llvm::raw_ostream & error(Stream &strm)
static bool RequiresFollowChildWorkaround(const Process &process)
static std::recursive_mutex * g_debugger_list_mutex_ptr
static llvm::DefaultThreadPool * g_thread_pool
static constexpr OptionEnumValueElement g_show_disassembly_enum_values[]
static lldb::user_id_t g_unique_id
static constexpr OptionEnumValueElement g_language_enumerators[]
static void PrivateReportDiagnostic(Debugger &debugger, Severity severity, std::string message, bool debugger_specific)
static constexpr OptionEnumValueElement g_dwim_print_verbosities[]
static constexpr OptionEnumValueElement s_stop_show_column_values[]
static void PrivateReportProgress(Debugger &debugger, uint64_t progress_id, std::string title, std::string details, uint64_t completed, uint64_t total, bool is_debugger_specific, uint32_t progress_broadcast_bit)
static Debugger::DebuggerList * g_debugger_list_ptr
static int OpenPipe(int fds[2], std::size_t size)
static size_t g_debugger_event_thread_stack_bytes
static FileSystem::EnumerateDirectoryResult LoadPluginCallback(void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
static std::shared_ptr< LogHandler > CreateLogHandler(LogHandlerKind log_handler_kind, int fd, bool should_close, size_t buffer_size)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_LOG_OPTION_APPEND
#define LLDB_LOG_ERROR(log, error,...)
#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP
#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME
A section + offset based address class.
An architecture specification class.
bool IsValid() const
Tests if this ArchSpec is valid.
static lldb::BreakpointEventType GetBreakpointEventTypeFromEvent(const lldb::EventSP &event_sp)
static lldb::BreakpointSP GetBreakpointFromEvent(const lldb::EventSP &event_sp)
static const BreakpointEventData * GetEventDataFromEvent(const Event *event_sp)
static size_t GetNumBreakpointLocationsFromEvent(const lldb::EventSP &event_sp)
An event broadcasting class.
bool EventTypeHasListeners(uint32_t event_type)
virtual llvm::StringRef GetBroadcasterClass() const
This needs to be filled in if you are going to register the broadcaster with the broadcaster manager ...
void BroadcastEvent(lldb::EventSP &event_sp)
Broadcast an event which has no associated data.
void UpdatePrompt(llvm::StringRef prompt)
@ eBroadcastBitAsynchronousOutputData
@ eBroadcastBitQuitCommandReceived
@ eBroadcastBitAsynchronousErrorData
@ eBroadcastBitResetPrompt
void UpdateUseColor(bool use_color)
bool WasInterrupted() const
bool SaveTranscript(CommandReturnObject &result, std::optional< std::string > output_file=std::nullopt)
Save the current debugger session transcript to a file on disk.
bool GetSaveSessionOnQuit() const
std::string GetErrorString(bool with_diagnostics=true) const
Return the errors as a string.
llvm::StringRef GetOutputString() const
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
size_t GetLength() const
Get the length in bytes of string value.
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
static void ForceUpdate()
std::string m_function_name
const std::chrono::time_point< std::chrono::system_clock > m_interrupt_time
const uint64_t m_thread_id
InterruptionReport(std::string function_name, std::string description)
std::string m_description
A class to manage flag bits.
static void AssertCallback(llvm::StringRef message, llvm::StringRef backtrace, llvm::StringRef prompt)
@ eBroadcastBitEventThreadIsListening
llvm::StringRef GetAutosuggestionAnsiPrefix() const
bool SetUseExternalEditor(bool use_external_editor_p)
PlatformList m_platform_list
HostThread m_event_handler_thread
static lldb::TargetSP FindTargetWithProcessID(lldb::pid_t pid)
FormatEntity::Entry GetDisassemblyFormat() const
uint64_t GetDisassemblyLineCount() const
lldb::TargetSP GetSelectedTarget()
llvm::StringRef GetDisabledAnsiSuffix() const
uint64_t GetTerminalHeight() const
lldb::LockableStreamFileSP m_output_stream_sp
bool SetExternalEditor(llvm::StringRef editor)
void RequestInterrupt()
Interruption in LLDB:
void ReportInterruption(const InterruptionReport &report)
ExecutionContext GetSelectedExecutionContext()
Get the execution context representing the selected entities in the selected target.
const std::string m_instance_name
lldb::ThreadSP HandleThreadEvent(const lldb::EventSP &event_sp)
void HandleProgressEvent(const lldb::EventSP &event_sp)
SourceManager & GetSourceManager()
bool SetShowProgress(bool show_progress)
bool StartEventHandlerThread()
Manually start the global event handler thread.
bool SetUseSourceCache(bool use_source_cache)
void StopEventHandlerThread()
Manually stop the debugger's default event handler.
static void ReportInfo(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report info events.
void SetAsyncExecution(bool async)
HostThread SetIOHandlerThread(HostThread &new_thread)
void CancelForwardEvents(const lldb::ListenerSP &listener_sp)
bool GetPrintDecls() const
lldb::FileSP GetInputFileSP()
void StopIOHandlerThread()
bool GetHighlightSource() const
llvm::StringMap< std::weak_ptr< LogHandler > > m_stream_handlers
CommandInterpreter & GetCommandInterpreter()
FormatEntity::Entry GetStatuslineFormat() const
void SaveInputTerminalState()
LoadedPluginsList m_loaded_plugins
bool GetShowInlineDiagnostics() const
void InstanceInitialize()
bool SetTabSize(uint64_t tab_size)
void HandleDiagnosticEvent(const lldb::EventSP &event_sp)
bool StartIOHandlerThread()
static lldb::DebuggerSP GetDebuggerAtIndex(size_t index)
llvm::StringRef GetAutosuggestionAnsiSuffix() const
lldb::ListenerSP m_listener_sp
void PushIOHandler(const lldb::IOHandlerSP &reader_sp, bool cancel_top_handler=true)
std::mutex m_destroy_callback_mutex
lldb::callback_token_t AddDestroyCallback(lldb_private::DebuggerDestroyCallback destroy_callback, void *baton)
Add a callback for when the debugger is destroyed.
lldb::thread_result_t IOHandlerThread()
FormatEntity::Entry GetFrameFormatUnique() const
std::optional< ProgressReport > GetCurrentProgressReport() const
static lldb::TargetSP FindTargetWithProcess(Process *process)
llvm::StringRef GetDisabledAnsiPrefix() const
bool GetUseExternalEditor() const
TerminalState m_terminal_state
lldb::StreamUP GetAsyncErrorStream()
bool InterruptRequested()
bool GetEscapeNonPrintables() const
lldb::TargetSP m_dummy_target_sp
llvm::SmallVector< DestroyCallbackInfo, 2 > m_destroy_callbacks
std::unique_ptr< CommandInterpreter > m_command_interpreter_up
static void ReportWarning(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report warning events.
static bool FormatDisassemblerAddress(const FormatEntity::Entry *format, const SymbolContext *sc, const SymbolContext *prev_sc, const ExecutionContext *exe_ctx, const Address *addr, Stream &s)
static void SettingsInitialize()
LockableStreamFile::Mutex m_output_mutex
static llvm::ThreadPoolInterface & GetThreadPool()
Shared thread pool. Use only with ThreadPoolTaskGroup.
llvm::StringRef GetShowProgressAnsiSuffix() const
bool IsTopIOHandler(const lldb::IOHandlerSP &reader_sp)
bool HasIOHandlerThread() const
void DispatchInputEndOfFile()
llvm::SmallVector< ProgressReport, 4 > m_progress_reports
Bookkeeping for command line progress events.
bool IsIOHandlerThreadCurrentThread() const
void DispatchClientTelemetry(const lldb_private::StructuredDataImpl &entry)
std::mutex m_progress_reports_mutex
lldb::ProcessSP HandleProcessEvent(const lldb::EventSP &event_sp)
lldb::ListenerSP m_forward_listener_sp
std::array< lldb::ScriptInterpreterSP, lldb::eScriptLanguageUnknown > m_script_interpreters
std::shared_ptr< CallbackLogHandler > m_callback_handler_sp
void SetDestroyCallback(lldb_private::DebuggerDestroyCallback destroy_callback, void *baton)
DEPRECATED: We used to only support one Destroy callback.
lldb::FileSP GetOutputFileSP()
Broadcaster m_broadcaster
Public Debugger event broadcaster.
void DispatchInputInterrupt()
static void Initialize(LoadPluginCallbackType load_plugin_callback)
static lldb::DebuggerSP FindDebuggerWithInstanceName(llvm::StringRef instance_name)
uint64_t GetTerminalWidth() const
std::mutex m_interrupt_mutex
std::recursive_mutex m_io_handler_synchronous_mutex
bool RemoveIOHandler(const lldb::IOHandlerSP &reader_sp)
Remove the given IO handler if it's currently active.
Diagnostics::CallbackID m_diagnostics_callback_id
bool GetAutoOneLineSummaries() const
const char * GetIOHandlerCommandPrefix()
std::optional< Statusline > m_statusline
lldb::BroadcasterManagerSP m_broadcaster_manager_sp
Status RunREPL(lldb::LanguageType language, const char *repl_options)
bool PopIOHandler(const lldb::IOHandlerSP &reader_sp)
bool RemoveDestroyCallback(lldb::callback_token_t token)
Remove the specified callback. Return true if successful.
static LoadPluginCallbackType g_load_plugin_callback
bool GetShowStatusline() const
std::recursive_mutex m_script_interpreter_mutex
void RunIOHandlerAsync(const lldb::IOHandlerSP &reader_sp, bool cancel_top_handler=true)
Run the given IO handler and return immediately.
void SetInputFile(lldb::FileSP file)
lldb::LockableStreamFileSP GetOutputStreamSP()
Except for Debugger and IOHandler, GetOutputStreamSP and GetErrorStreamSP should not be used directly...
void SetPrompt(llvm::StringRef p)
llvm::StringRef GetSeparator() const
bool StatuslineSupported()
bool EnableLog(llvm::StringRef channel, llvm::ArrayRef< const char * > categories, llvm::StringRef log_file, uint32_t log_options, size_t buffer_size, LogHandlerKind log_handler_kind, llvm::raw_ostream &error_stream)
uint64_t GetStopDisassemblyMaxSize() const
bool SetTerminalHeight(uint64_t term_height)
Broadcaster m_sync_broadcaster
Private debugger synchronization.
void RestoreInputTerminalState()
bool GetUseSourceCache() const
HostThread m_io_handler_thread
llvm::StringRef GetRegexMatchAnsiSuffix() const
static llvm::StringRef GetStaticBroadcasterClass()
lldb::FileSP m_input_file_sp
bool SetREPLLanguage(lldb::LanguageType repl_lang)
bool GetAutoIndent() const
llvm::StringRef GetStopShowColumnAnsiSuffix() const
Status SetPropertyValue(const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value) override
llvm::StringRef GetPromptAnsiSuffix() const
FormatEntity::Entry GetThreadStopFormat() const
void SetErrorFile(lldb::FileSP file)
bool GetAutoConfirm() const
lldb::ScriptLanguage GetScriptLanguage() const
lldb::callback_token_t m_destroy_callback_next_token
std::unique_ptr< SourceManager > m_source_manager_up
static lldb::DebuggerSP CreateInstance(lldb::LogOutputCallback log_callback=nullptr, void *baton=nullptr)
lldb::StopShowColumn GetStopShowColumn() const
static void ReportSymbolChange(const ModuleSpec &module_spec)
static void ReportError(std::string message, std::optional< lldb::user_id_t > debugger_id=std::nullopt, std::once_flag *once=nullptr)
Report error events.
bool SetPrintDecls(bool b)
bool SetScriptLanguage(lldb::ScriptLanguage script_lang)
lldb::LockableStreamFileSP m_error_stream_sp
bool SetShowInlineDiagnostics(bool)
bool LoadPlugin(const FileSpec &spec, Status &error)
void SetOutputFile(lldb::FileSP file)
uint64_t GetStopSourceLineCount(bool before) const
bool SetStatuslineFormat(const FormatEntity::Entry &format)
void EnableForwardEvents(const lldb::ListenerSP &listener_sp)
static lldb::DebuggerSP FindDebuggerWithID(lldb::user_id_t id)
void HandleBreakpointEvent(const lldb::EventSP &event_sp)
void JoinIOHandlerThread()
bool CheckTopIOHandlerTypes(IOHandler::Type top_type, IOHandler::Type second_top_type)
Target & GetDummyTarget()
lldb::ListenerSP GetListener()
static void Destroy(lldb::DebuggerSP &debugger_sp)
SourceManager::SourceFileCache m_source_file_cache
ExecutionContextRef GetSelectedExecutionContextRef()
Similar to GetSelectedExecutionContext but returns a ExecutionContextRef, and will hold the dummy tar...
llvm::StringRef GetPromptAnsiPrefix() const
lldb::StreamUP GetAsyncOutputStream()
void RedrawStatusline(std::optional< ExecutionContextRef > exe_ctx_ref)
Redraw the statusline if enabled.
void RunIOHandlerSync(const lldb::IOHandlerSP &reader_sp)
Run the given IO handler and block until it's complete.
Broadcaster & GetBroadcaster()
Get the public broadcaster for this debugger.
llvm::StringRef GetStopShowLineMarkerAnsiPrefix() const
bool GetShowDontUsePoHint() const
uint64_t GetTabSize() const
bool GetShowProgress() const
llvm::StringRef GetRegexMatchAnsiPrefix() const
void HandleDestroyCallback()
std::mutex m_output_flush_mutex
llvm::StringRef GetStopShowLineMarkerAnsiSuffix() const
bool SetSeparator(llvm::StringRef s)
bool SetUseColor(bool use_color)
std::mutex m_statusline_mutex
Mutex protecting the m_statusline member.
const char * GetIOHandlerHelpPrologue()
Status SetInputString(const char *data)
bool GetUseAutosuggestion() const
Target & GetSelectedOrDummyTarget(bool prefer_dummy=false)
IOHandlerStack m_io_handler_stack
llvm::once_flag m_clear_once
static void SettingsTerminate()
static void ReportProgress(uint64_t progress_id, std::string title, std::string details, uint64_t completed, uint64_t total, std::optional< lldb::user_id_t > debugger_id, uint32_t progress_category_bit=lldb::eBroadcastBitProgress)
Report progress events.
lldb::LanguageType GetREPLLanguage() const
ScriptInterpreter * GetScriptInterpreter(bool can_create=true, std::optional< lldb::ScriptLanguage > language={})
void SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton)
bool SetTerminalWidth(uint64_t term_width)
Debugger(lldb::LogOutputCallback m_log_callback, void *baton)
llvm::StringRef GetExternalEditor() const
static size_t GetNumDebuggers()
FormatEntity::Entry GetThreadFormat() const
uint32_t m_interrupt_requested
Tracks interrupt requests.
lldb::DWIMPrintVerbosity GetDWIMPrintVerbosity() const
lldb::thread_result_t DefaultEventHandler()
void PrintAsync(const char *s, size_t len, bool is_stdout)
lldb::LockableStreamFileSP GetErrorStreamSP()
bool IsForwardingEvents()
llvm::StringRef GetPrompt() const
bool GetNotifyVoid() const
llvm::StringRef GetShowProgressAnsiPrefix() const
void AdoptTopIOHandlerFilesIfInvalid(lldb::FileSP &in, lldb::LockableStreamFileSP &out, lldb::LockableStreamFileSP &err)
FormatEntity::Entry GetFrameFormat() const
lldb::StopDisassemblyType GetStopDisassemblyDisplay() const
llvm::StringRef GetTopIOHandlerControlSequence(char ch)
void FlushProcessOutput(Process &process, bool flush_stdout, bool flush_stderr)
Force flushing the process's pending stdout and stderr to the debugger's asynchronous stdout and stde...
void CancelInterruptRequest()
Decrement the "interrupt requested" counter.
static void ReportDiagnosticImpl(lldb::Severity severity, std::string message, std::optional< lldb::user_id_t > debugger_id, std::once_flag *once)
std::vector< lldb::DebuggerSP > DebuggerList
bool SetAutoIndent(bool b)
friend class CommandInterpreter
llvm::StringRef GetStopShowColumnAnsiPrefix() const
static DebuggerList DebuggersRequestingInterruption()
void Dump(Stream *s) const override
static const DiagnosticEventData * GetEventDataFromEvent(const Event *event_ptr)
CallbackID AddCallback(Callback callback)
void Report(llvm::StringRef message)
void RemoveCallback(CallbackID id)
static Diagnostics & Instance()
static const void * GetBytesFromEvent(const Event *event_ptr)
static lldb::ProcessSP GetProcessFromEvent(const Event *event_ptr)
static lldb::StructuredDataPluginSP GetPluginFromEvent(const Event *event_ptr)
static StructuredData::ObjectSP GetObjectFromEvent(const Event *event_ptr)
Execution context objects refer to objects in the execution of the program that is being debugged.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
const lldb::TargetSP & GetTargetSP() const
Get accessor to get the target shared pointer.
bool HasTargetScope() const
Returns true the ExecutionContext object contains a valid target.
Target & GetTargetRef() const
Returns a reference to the target object.
FileSpec CopyByAppendingPathComponent(llvm::StringRef component) const
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
llvm::StringRef GetFileNameExtension() const
Extract the extension of the file.
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
void EnumerateDirectory(llvm::Twine path, bool find_directories, bool find_files, bool find_other, EnumerateDirectoryCallbackType callback, void *callback_baton)
@ eEnumerateDirectoryResultEnter
Recurse into the current entry if it is a directory or symlink, or next if not.
@ eEnumerateDirectoryResultNext
Enumerate next entry in the current directory.
@ eEnumerateDirectoryResultQuit
Stop directory enumerations at any level.
int Open(const char *path, int flags, int mode=0600)
Wraps open in a platform-independent way.
static FileSystem & Instance()
An abstract base class for files.
bool GetIsRealTerminal()
Return true if this file from a real terminal.
static int kInvalidDescriptor
virtual int GetDescriptor() const
Get underlying OS file descriptor for this file, or kInvalidDescriptor.
bool GetIsTerminalWithColors()
Return true if this file is a terminal which supports colors.
Status Close() override
Flush any buffers and release any resources owned by the file.
bool GetIsInteractive()
Return true if this file is interactive.
const Mangled & GetMangled() const
static void SystemLog(lldb::Severity severity, llvm::StringRef message)
Emit the given message to the operating system log.
static lldb::thread_t GetCurrentThread()
Get the thread token (the one returned by ThreadCreate when the thread was created) for the calling t...
static llvm::StringRef GetSettingName()
static LanguageSet GetLanguagesSupportingREPLs()
static const char * GetNameForLanguageType(lldb::LanguageType language)
static LanguageProperties & GetGlobalLanguageProperties()
static lldb::ListenerSP MakeListener(const char *name)
static bool EnableLogChannel(const std::shared_ptr< LogHandler > &log_handler_sp, uint32_t log_options, llvm::StringRef channel, llvm::ArrayRef< const char * > categories, llvm::raw_ostream &error_stream)
static ModuleListProperties & GetGlobalModuleListProperties()
void SetMinimumValue(uint64_t v)
static lldb::ScriptInterpreterSP GetScriptInterpreterForLanguage(lldb::ScriptLanguage script_lang, Debugger &debugger)
static void DebuggerInitialize(Debugger &debugger)
FollowForkMode GetFollowForkMode() const
static lldb::ProcessSP GetProcessFromEvent(const Event *event_ptr)
static lldb::StateType GetStateFromEvent(const Event *event_ptr)
A plug-in interface definition class for debugging a process.
@ eBroadcastBitStructuredData
@ eBroadcastBitStateChanged
static bool HandleProcessStateChangedEvent(const lldb::EventSP &event_sp, Stream *stream, SelectMostRelevant select_most_relevant, bool &pop_process_io_handler)
Centralize the code that handles and prints descriptions for process state changes.
static llvm::StringRef GetStaticBroadcasterClass()
virtual size_t GetSTDERR(char *buf, size_t buf_size, Status &error)
Get any available STDERR.
virtual size_t GetSTDOUT(char *buf, size_t buf_size, Status &error)
Get any available STDOUT.
static const ProgressEventData * GetEventDataFromEvent(const Event *event_ptr)
lldb::OptionValuePropertiesSP m_collection_sp
virtual Status SetPropertyValue(const ExecutionContext *exe_ctx, VarSetOperationType op, llvm::StringRef property_path, llvm::StringRef value)
T GetPropertyAtIndexAs(uint32_t idx, T default_value, const ExecutionContext *exe_ctx=nullptr) const
bool SetPropertyAtIndex(uint32_t idx, T t, const ExecutionContext *exe_ctx=nullptr) const
lldb::OptionValuePropertiesSP GetValueProperties() const
static lldb::REPLSP Create(Status &Status, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options)
Get a REPL with an existing target (or, failing that, a debugger to use), and (optional) extra argume...
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
bool Success() const
Test for success condition.
void Flush() override
Flush the stream.
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Write(const void *src, size_t src_len)
Output character bytes to the stream.
virtual void Flush()=0
Flush the stream.
Defines a symbol context baton that can be handed other debug core functions.
Function * function
The Function for a given query.
Symbol * symbol
The Symbol for a given query.
bool Compare(ConstString name, lldb::SymbolType type) const
ConstString GetName() const
lldb::SymbolType GetType() const
@ eBroadcastBitBreakpointChanged
Debugger & GetDebugger() const
static void SettingsTerminate()
static llvm::StringRef GetStaticBroadcasterClass()
static TargetProperties & GetGlobalProperties()
static ArchSpec GetDefaultArchitecture()
static void SettingsInitialize()
static llvm::Expected< HostThread > LaunchThread(llvm::StringRef name, std::function< lldb::thread_result_t()> thread_function, size_t min_stack_byte_size=0)
static lldb::ThreadSP GetThreadFromEvent(const Event *event_ptr)
static llvm::StringRef GetStaticBroadcasterClass()
@ eBroadcastBitThreadSelected
@ eBroadcastBitStackChanged
virtual void DispatchClientTelemetry(const lldb_private::StructuredDataImpl &entry, Debugger *debugger)
static TelemetryManager * GetInstance()
@ SelectMostRelevantFrame
#define LLDB_INVALID_HOST_THREAD
std::string FormatAnsiTerminalCodes(llvm::StringRef format, bool do_color=true)
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
@ eLoadScriptFromSymFileTrue
@ eLoadScriptFromSymFileFalse
@ eLoadScriptFromSymFileWarn
const char * GetVersion()
Retrieves a string representing the complete LLDB version, which includes the lldb version number,...
void(* DebuggerDestroyCallback)(lldb::user_id_t debugger_id, void *baton)
bool StateIsStoppedState(lldb::StateType state, bool must_exist)
Check if a state represents a state where the process or thread is stopped.
llvm::sys::DynamicLibrary(* LoadPluginCallbackType)(const lldb::DebuggerSP &debugger_sp, const FileSpec &spec, Status &error)
VarSetOperationType
Settable state variable types.
ScriptLanguage
Script interpreter types.
Severity
Used for expressing severity in logs and diagnostics.
@ eBroadcastBitExternalProgress
std::shared_ptr< lldb_private::IOHandler > IOHandlerSP
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::Platform > PlatformSP
DWIMPrintVerbosity
Enum to control the verbosity level of dwim-print execution.
@ eDWIMPrintVerbosityFull
Always print a message indicating how dwim-print is evaluating its expression.
@ eDWIMPrintVerbosityNone
Run dwim-print with no verbosity.
@ eDWIMPrintVerbosityExpression
Print a message when dwim-print uses expression evaluation.
StateType
Process and Thread States.
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::StructuredDataPlugin > StructuredDataPluginSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Debugger > DebuggerSP
StopDisassemblyType
Used to determine when to show disassembly.
@ eStopDisassemblyTypeNever
@ eStopDisassemblyTypeNoSource
@ eStopDisassemblyTypeAlways
@ eStopDisassemblyTypeNoDebugInfo
@ eStopShowColumnAnsiOrCaret
std::shared_ptr< lldb_private::Event > EventSP
std::shared_ptr< lldb_private::Listener > ListenerSP
std::shared_ptr< lldb_private::LockableStreamFile > LockableStreamFileSP
void(* LogOutputCallback)(const char *, void *baton)
std::shared_ptr< lldb_private::Target > TargetSP
std::unique_ptr< lldb_private::Stream > StreamUP
std::shared_ptr< lldb_private::File > FileSP
std::shared_ptr< lldb_private::REPL > REPLSP
lldb_private::DebuggerDestroyCallback callback
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
std::optional< lldb::LanguageType > GetSingularLanguage()
If the set contains a single language only, return it.
UserID(lldb::user_id_t uid=LLDB_INVALID_UID)
Construct with optional user ID.
lldb::user_id_t GetID() const
Get accessor for the user ID.
Helper RAII class for collecting telemetry.