68#include "llvm/Support/PrettyStackTrace.h"
69#include "llvm/Support/Regex.h"
74#define DEFAULT_DISASM_BYTE_SIZE 32
77 std::lock_guard<std::recursive_mutex> guard(target.
GetAPIMutex());
81 const auto state = process_sp->GetState();
87 return Status(
"process is connected and already has a listener, pass "
92 return target.
Attach(attach_info,
nullptr);
154 return this->
operator bool();
156SBTarget::operator bool()
const {
159 return m_opaque_sp.get() !=
nullptr && m_opaque_sp->IsValid();
166 ProcessSP process_sp;
167 TargetSP target_sp(
GetSP());
169 process_sp = target_sp->GetProcessSP();
170 sb_process.
SetSP(process_sp);
179 TargetSP target_sp(
GetSP());
193 TargetSP target_sp(
GetSP());
195 debugger.
reset(target_sp->GetDebugger().shared_from_this());
203 TargetSP target_sp(
GetSP());
206 std::string json_str =
207 llvm::formatv(
"{0:2}",
209 target_sp.get())).str();
217 TargetSP target_sp(
GetSP());
226 TargetSP target_sp(
GetSP());
243 TargetSP target_sp(
GetSP());
247 ProcessSP process_sp(target_sp->CreateProcess(
248 target_sp->GetDebugger().GetListener(),
"", &filespec,
false));
250 error.SetError(process_sp->LoadCore());
252 sb_process.
SetSP(process_sp);
254 error.SetErrorString(
"Failed to create the process");
257 error.SetErrorString(
"SBTarget is invalid");
263 const char *working_directory) {
266 TargetSP target_sp =
GetSP();
272 if (
Module *exe_module = target_sp->GetExecutableModulePointer())
279 if (working_directory)
290 TargetSP target_sp(
GetSP());
292 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
293 sb_error.
ref() = target_sp->Install(
nullptr);
299 char const **envp,
const char *stdin_path,
300 const char *stdout_path,
const char *stderr_path,
301 const char *working_directory,
305 stderr_path, working_directory, launch_flags,
306 stop_at_entry,
error);
309 ProcessSP process_sp;
310 TargetSP target_sp(
GetSP());
313 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
316 launch_flags |= eLaunchFlagStopAtEntry;
318 if (getenv(
"LLDB_LAUNCH_FLAG_DISABLE_ASLR"))
319 launch_flags |= eLaunchFlagDisableASLR;
322 process_sp = target_sp->GetProcessSP();
324 state = process_sp->GetState();
328 error.SetErrorString(
"process attach is in progress");
330 error.SetErrorString(
"a process is already being debugged");
340 error.SetErrorString(
"process is connected and already has a listener, "
341 "pass empty listener");
346 if (getenv(
"LLDB_LAUNCH_FLAG_DISABLE_STDIO"))
347 launch_flags |= eLaunchFlagDisableSTDIO;
351 FileSpec(working_directory), launch_flags);
353 Module *exe_module = target_sp->GetExecutableModulePointer();
359 auto default_launch_info = target_sp->GetProcessLaunchInfo();
361 default_launch_info.GetArguments());
366 auto default_launch_info = target_sp->GetProcessLaunchInfo();
367 launch_info.
GetEnvironment() = default_launch_info.GetEnvironment();
373 error.SetError(target_sp->Launch(launch_info,
nullptr));
375 sb_process.
SetSP(target_sp->GetProcessSP());
377 error.SetErrorString(
"SBTarget is invalid");
387 TargetSP target_sp(
GetSP());
390 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
393 ProcessSP process_sp = target_sp->GetProcessSP();
395 state = process_sp->GetState();
399 error.SetErrorString(
"process attach is in progress");
401 error.SetErrorString(
"a process is already being debugged");
410 Module *exe_module = target_sp->GetExecutableModulePointer();
415 const ArchSpec &arch_spec = target_sp->GetArchitecture();
419 error.SetError(target_sp->Launch(launch_info,
nullptr));
420 sb_launch_info.
set_ref(launch_info);
421 sb_process.
SetSP(target_sp->GetProcessSP());
423 error.SetErrorString(
"SBTarget is invalid");
433 TargetSP target_sp(
GetSP());
439 PlatformSP platform_sp = target_sp->GetPlatform();
441 if (platform_sp && platform_sp->IsConnected()) {
444 if (platform_sp->GetProcessInfo(attach_pid, instance_info)) {
447 error.ref().SetErrorStringWithFormat(
448 "no process found with process ID %" PRIu64, attach_pid);
455 sb_process.
SetSP(target_sp->GetProcessSP());
457 error.SetErrorString(
"SBTarget is invalid");
471 TargetSP target_sp(
GetSP());
480 if (target_sp->GetPlatform()->GetProcessInfo(pid, instance_info))
485 sb_process.
SetSP(target_sp->GetProcessSP());
487 error.SetErrorString(
"SBTarget is invalid");
501 TargetSP target_sp(
GetSP());
503 if (name && target_sp) {
512 sb_process.
SetSP(target_sp->GetProcessSP());
514 error.SetErrorString(
"SBTarget is invalid");
520 const char *plugin_name,
525 ProcessSP process_sp;
526 TargetSP target_sp(
GetSP());
529 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
532 target_sp->CreateProcess(listener.
m_opaque_sp, plugin_name,
nullptr,
535 process_sp = target_sp->CreateProcess(
536 target_sp->GetDebugger().GetListener(), plugin_name,
nullptr,
true);
539 sb_process.
SetSP(process_sp);
540 error.SetError(process_sp->ConnectRemote(url));
542 error.SetErrorString(
"unable to create lldb_private::Process");
545 error.SetErrorString(
"SBTarget is invalid");
555 TargetSP target_sp(
GetSP());
557 Module *exe_module = target_sp->GetExecutableModulePointer();
562 return exe_file_spec;
588 TargetSP target_sp(
GetSP());
590 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
591 if (target_sp->ResolveLoadAddress(vm_addr, addr))
606 TargetSP target_sp(
GetSP());
608 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
609 if (target_sp->ResolveFileAddress(file_addr, addr))
623 TargetSP target_sp(
GetSP());
625 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
626 if (target_sp->ResolveLoadAddress(vm_addr, addr))
642 SymbolContextItem scope =
static_cast<SymbolContextItem
>(resolve_scope);
644 TargetSP target_sp(
GetSP());
646 target_sp->GetImages().ResolveSymbolContextForAddress(addr.
ref(), scope,
657 size_t bytes_read = 0;
658 TargetSP target_sp(
GetSP());
660 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
662 target_sp->ReadMemory(addr.
ref(), buf, size, sb_error.
ref(),
true);
711 TargetSP target_sp(
GetSP());
712 if (target_sp && line != 0) {
713 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
717 const bool internal =
false;
718 const bool hardware =
false;
721 if (sb_module_list.
GetSize() > 0) {
722 module_list = sb_module_list.
get();
724 sb_bp = target_sp->CreateBreakpoint(
725 module_list, *sb_file_spec, line, column, offset, check_inlines,
726 skip_prologue, internal, hardware, move_to_nearest_code);
735 bool move_to_nearest_code) {
737 move_to_nearest_code);
740 TargetSP target_sp(
GetSP());
741 if (target_sp && line != 0) {
742 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
746 const bool internal =
false;
747 const bool hardware =
false;
749 if (sb_module_list.
GetSize() > 0) {
750 module_list = sb_module_list.
get();
752 sb_bp = target_sp->CreateBreakpoint(
753 module_list, *sb_file_spec, line, column, offset, check_inlines,
754 skip_prologue, internal, hardware,
762 const char *module_name) {
766 TargetSP target_sp(
GetSP());
767 if (target_sp.get()) {
768 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
770 const bool internal =
false;
771 const bool hardware =
false;
774 if (module_name && module_name[0]) {
777 sb_bp = target_sp->CreateBreakpoint(
778 &module_spec_list,
nullptr, symbol_name, eFunctionNameTypeAuto,
781 sb_bp = target_sp->CreateBreakpoint(
782 nullptr,
nullptr, symbol_name, eFunctionNameTypeAuto,
796 lldb::FunctionNameType name_type_mask = eFunctionNameTypeAuto;
803 const char *symbol_name,
uint32_t name_type_mask,
814 const char *symbol_name,
uint32_t name_type_mask,
818 module_list, comp_unit_list);
821 TargetSP target_sp(
GetSP());
822 if (target_sp && symbol_name && symbol_name[0]) {
823 const bool internal =
false;
824 const bool hardware =
false;
826 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
827 FunctionNameType mask =
static_cast<FunctionNameType
>(name_type_mask);
828 sb_bp = target_sp->CreateBreakpoint(module_list.
get(), comp_unit_list.
get(),
829 symbol_name, mask, symbol_language, 0,
830 skip_prologue, internal, hardware);
852 symbol_language, module_list, comp_unit_list);
864 symbol_language, offset, module_list, comp_unit_list);
867 TargetSP target_sp(
GetSP());
868 if (target_sp && num_names > 0) {
869 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
870 const bool internal =
false;
871 const bool hardware =
false;
872 FunctionNameType mask =
static_cast<FunctionNameType
>(name_type_mask);
874 sb_bp = target_sp->CreateBreakpoint(
875 module_list.
get(), comp_unit_list.
get(), symbol_names, num_names, mask,
876 symbol_language, offset, skip_prologue, internal, hardware);
883 const char *module_name) {
888 if (module_name && module_name[0]) {
892 module_spec_list, comp_unit_list);
902 module_list, comp_unit_list);
906 const char *symbol_name_regex,
LanguageType symbol_language,
912 TargetSP target_sp(
GetSP());
913 if (target_sp && symbol_name_regex && symbol_name_regex[0]) {
914 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
916 const bool internal =
false;
917 const bool hardware =
false;
920 sb_bp = target_sp->CreateFuncRegexBreakpoint(
921 module_list.
get(), comp_unit_list.
get(), std::move(regexp),
922 symbol_language, skip_prologue, internal, hardware);
932 TargetSP target_sp(
GetSP());
934 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
935 const bool hardware =
false;
936 sb_bp = target_sp->CreateBreakpoint(address,
false, hardware);
946 TargetSP target_sp(
GetSP());
952 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
953 const bool hardware =
false;
954 sb_bp = target_sp->CreateBreakpoint(sb_address.
ref(),
false, hardware);
963 const char *module_name) {
968 if (module_name && module_name[0]) {
974 source_file_list.
Append(source_file);
998 TargetSP target_sp(
GetSP());
999 if (target_sp && source_regex && source_regex[0]) {
1000 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1001 const bool hardware =
false;
1004 std::unordered_set<std::string> func_names_set;
1005 for (
size_t i = 0; i < func_names.
GetSize(); i++) {
1009 sb_bp = target_sp->CreateSourceRegexBreakpoint(
1010 module_list.
get(), source_file_list.
get(), func_names_set,
1011 std::move(regexp),
false, hardware, move_to_nearest_code);
1019 bool catch_bp,
bool throw_bp) {
1023 TargetSP target_sp(
GetSP());
1025 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1026 const bool hardware =
false;
1027 sb_bp = target_sp->CreateExceptionBreakpoint(language, catch_bp, throw_bp,
1037 bool request_hardware) {
1042 TargetSP target_sp(
GetSP());
1044 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1049 target_sp->CreateScriptedBreakpoint(class_name,
1064 TargetSP target_sp(
GetSP());
1067 return target_sp->GetBreakpointList().GetSize();
1076 TargetSP target_sp(
GetSP());
1079 sb_breakpoint = target_sp->GetBreakpointList().GetBreakpointAtIndex(idx);
1081 return sb_breakpoint;
1087 bool result =
false;
1088 TargetSP target_sp(
GetSP());
1090 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1091 result = target_sp->RemoveBreakpointByID(bp_id);
1101 TargetSP target_sp(
GetSP());
1103 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1104 sb_breakpoint = target_sp->GetBreakpointByID(bp_id);
1107 return sb_breakpoint;
1114 TargetSP target_sp(
GetSP());
1116 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1117 llvm::Expected<std::vector<BreakpointSP>> expected_vector =
1118 target_sp->GetBreakpointList().FindBreakpointsByName(name);
1119 if (!expected_vector) {
1120 LLDB_LOG(
GetLog(LLDBLog::Breakpoints),
"invalid breakpoint name: {}",
1121 llvm::toString(expected_vector.takeError()));
1124 for (BreakpointSP bkpt_sp : *expected_vector) {
1136 TargetSP target_sp(
GetSP());
1138 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1140 std::vector<std::string> name_vec;
1141 target_sp->GetBreakpointNames(name_vec);
1142 for (
auto name : name_vec)
1150 TargetSP target_sp(
GetSP());
1152 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1153 target_sp->DeleteBreakpointName(
ConstString(name));
1160 TargetSP target_sp(
GetSP());
1162 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1163 target_sp->EnableAllowedBreakpoints();
1172 TargetSP target_sp(
GetSP());
1174 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1175 target_sp->DisableAllowedBreakpoints();
1184 TargetSP target_sp(
GetSP());
1186 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1187 target_sp->RemoveAllowedBreakpoints();
1207 TargetSP target_sp(
GetSP());
1210 "BreakpointCreateFromFile called with invalid target.");
1213 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1217 std::vector<std::string> name_vector;
1218 size_t num_names = matching_names.
GetSize();
1219 for (
size_t i = 0; i < num_names; i++)
1222 sberr.
ref() = target_sp->CreateBreakpointsFromFile(source_file.
ref(),
1223 name_vector, bp_ids);
1227 size_t num_bkpts = bp_ids.
GetSize();
1228 for (
size_t i = 0; i < num_bkpts; i++) {
1239 TargetSP target_sp(
GetSP());
1241 sberr.
SetErrorString(
"BreakpointWriteToFile called with invalid target.");
1254 TargetSP target_sp(
GetSP());
1256 sberr.
SetErrorString(
"BreakpointWriteToFile called with invalid target.");
1260 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1263 sberr.
ref() = target_sp->SerializeBreakpointsToFile(dest_file.
ref(),
1264 bp_id_list, append);
1271 TargetSP target_sp(
GetSP());
1274 return target_sp->GetWatchpointList().GetSize();
1283 TargetSP target_sp(
GetSP());
1286 sb_watchpoint.
SetSP(target_sp->GetWatchpointList().GetByIndex(idx));
1288 return sb_watchpoint;
1294 bool result =
false;
1295 TargetSP target_sp(
GetSP());
1297 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1298 std::unique_lock<std::recursive_mutex> lock;
1299 target_sp->GetWatchpointList().GetListMutex(lock);
1300 result = target_sp->RemoveWatchpointByID(wp_id);
1310 lldb::WatchpointSP watchpoint_sp;
1311 TargetSP target_sp(
GetSP());
1313 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1314 std::unique_lock<std::recursive_mutex> lock;
1315 target_sp->GetWatchpointList().GetListMutex(lock);
1316 watchpoint_sp = target_sp->GetWatchpointList().FindByID(wp_id);
1317 sb_watchpoint.
SetSP(watchpoint_sp);
1320 return sb_watchpoint;
1324 bool read,
bool write,
1329 lldb::WatchpointSP watchpoint_sp;
1330 TargetSP target_sp(
GetSP());
1333 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1339 if (watch_type == 0) {
1340 error.SetErrorString(
1341 "Can't create a watchpoint that is neither read nor write.");
1342 return sb_watchpoint;
1350 target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error);
1351 error.SetError(cw_error);
1352 sb_watchpoint.
SetSP(watchpoint_sp);
1355 return sb_watchpoint;
1361 TargetSP target_sp(
GetSP());
1363 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1364 std::unique_lock<std::recursive_mutex> lock;
1365 target_sp->GetWatchpointList().GetListMutex(lock);
1366 target_sp->EnableAllWatchpoints();
1375 TargetSP target_sp(
GetSP());
1377 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1378 std::unique_lock<std::recursive_mutex> lock;
1379 target_sp->GetWatchpointList().GetListMutex(lock);
1380 target_sp->DisableAllWatchpoints();
1391 lldb::ValueObjectSP new_value_sp;
1400 sb_value.
SetSP(new_value_sp);
1409 lldb::ValueObjectSP new_value_sp;
1411 DataExtractorSP extractor(*data);
1418 sb_value.
SetSP(new_value_sp);
1427 lldb::ValueObjectSP new_value_sp;
1428 if (
IsValid() && name && *name && expr && *expr) {
1434 sb_value.
SetSP(new_value_sp);
1441 TargetSP target_sp(
GetSP());
1443 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1444 std::unique_lock<std::recursive_mutex> lock;
1445 target_sp->GetWatchpointList().GetListMutex(lock);
1446 target_sp->RemoveAllWatchpoints();
1456 TargetSP target_sp(
GetSP());
1458 return error.SetErrorString(
"invalid target");
1460 llvm::StringRef srFrom = from, srTo = to;
1462 return error.SetErrorString(
"<from> path can't be empty");
1464 return error.SetErrorString(
"<to> path can't be empty");
1466 target_sp->GetImageSearchPathList().Append(srFrom, srTo,
true);
1470 const char *uuid_cstr) {
1473 return AddModule(path, triple, uuid_cstr,
nullptr);
1477 const char *uuid_cstr,
const char *symfile) {
1481 TargetSP target_sp(
GetSP());
1492 target_sp->GetPlatform().get(), triple);
1499 sb_module.
SetSP(target_sp->GetOrCreateModule(module_spec,
true ));
1508 TargetSP target_sp(
GetSP());
1518 TargetSP target_sp(
GetSP());
1520 target_sp->GetImages().AppendIfNeeded(module.
GetSP());
1530 TargetSP target_sp(
GetSP());
1533 num = target_sp->GetImages().GetSize();
1549 TargetSP target_sp(
GetSP());
1550 if (target_sp && sb_file_spec.
IsValid()) {
1553 sb_module.
SetSP(target_sp->GetImages().FindFirstModule(module_spec));
1562 const TargetSP target_sp(
GetSP());
1563 if (target_sp && sb_file_spec.
IsValid())
1564 target_sp->GetImages().FindCompileUnits(*sb_file_spec, *sb_sc_list);
1571 TargetSP target_sp(
GetSP());
1573 return target_sp->GetArchitecture().GetByteOrder();
1580 TargetSP target_sp(
GetSP());
1584 std::string triple(target_sp->GetArchitecture().GetTriple().str());
1595 TargetSP target_sp(
GetSP());
1599 std::string abi_name(target_sp->GetABIName().str());
1607 TargetSP target_sp(
GetSP());
1609 return target_sp->GetArchitecture().GetDataByteSize();
1617 TargetSP target_sp(
GetSP());
1619 return target_sp->GetArchitecture().GetCodeByteSize();
1627 TargetSP target_sp(
GetSP());
1629 return target_sp->GetMaximumNumberOfChildrenToDisplay();
1637 TargetSP target_sp(
GetSP());
1639 return target_sp->GetArchitecture().GetAddressByteSize();
1640 return sizeof(
void *);
1648 TargetSP target_sp(
GetSP());
1651 module_sp = target_sp->GetImages().GetModuleAtIndex(idx);
1652 sb_module.
SetSP(module_sp);
1661 TargetSP target_sp(
GetSP());
1663 return target_sp->GetImages().Remove(module.
GetSP());
1670 TargetSP target_sp(
GetSP());
1682 TargetSP target_sp(
GetSP());
1684 target_sp->Dump(&strm, description_level);
1696 if (!name || !name[0])
1699 TargetSP target_sp(
GetSP());
1707 FunctionNameType mask =
static_cast<FunctionNameType
>(name_type_mask);
1708 target_sp->GetImages().FindFunctions(
ConstString(name), mask,
1709 function_options, *sb_sc_list);
1719 if (name && name[0]) {
1720 llvm::StringRef name_ref(name);
1721 TargetSP target_sp(
GetSP());
1727 std::string regexstr;
1728 switch (matchtype) {
1731 function_options, *sb_sc_list);
1734 regexstr = llvm::Regex::escape(name) +
".*";
1736 function_options, *sb_sc_list);
1739 target_sp->GetImages().FindFunctions(
ConstString(name),
1740 eFunctionNameTypeAny,
1741 function_options, *sb_sc_list);
1752 TargetSP target_sp(
GetSP());
1753 if (typename_cstr && typename_cstr[0] && target_sp) {
1756 const bool exact_match =
false;
1758 const ModuleList &module_list = target_sp->GetImages();
1759 size_t count = module_list.
GetSize();
1760 for (
size_t idx = 0; idx < count; idx++) {
1764 module_sp->FindFirstType(sc, const_typename, exact_match));
1771 if (
auto process_sp = target_sp->GetProcessSP()) {
1772 for (
auto *runtime : process_sp->GetLanguageRuntimes()) {
1773 if (
auto vendor = runtime->GetDeclVendor()) {
1774 auto types = vendor->FindTypes(const_typename, 1);
1776 return SBType(types.front());
1782 for (
auto type_system_sp : target_sp->GetScratchTypeSystems())
1783 if (
auto type = type_system_sp->GetBuiltinTypeByName(const_typename))
1793 TargetSP target_sp(
GetSP());
1795 for (
auto type_system_sp : target_sp->GetScratchTypeSystems())
1796 if (
auto compiler_type = type_system_sp->GetBasicTypeFromAST(type))
1797 return SBType(compiler_type);
1806 TargetSP target_sp(
GetSP());
1807 if (typename_cstr && typename_cstr[0] && target_sp) {
1810 bool exact_match =
false;
1812 llvm::DenseSet<SymbolFile *> searched_symbol_files;
1814 searched_symbol_files, type_list);
1816 for (
size_t idx = 0; idx < type_list.
GetSize(); idx++) {
1823 if (
auto process_sp = target_sp->GetProcessSP()) {
1824 for (
auto *runtime : process_sp->GetLanguageRuntimes()) {
1825 if (
auto *vendor = runtime->GetDeclVendor()) {
1827 vendor->FindTypes(const_typename,
UINT32_MAX);
1828 for (
auto type : types)
1834 if (sb_type_list.
GetSize() == 0) {
1836 for (
auto type_system_sp : target_sp->GetScratchTypeSystems())
1837 if (
auto compiler_type =
1838 type_system_sp->GetBuiltinTypeByName(const_typename))
1842 return sb_type_list;
1851 TargetSP target_sp(
GetSP());
1852 if (name && target_sp) {
1854 target_sp->GetImages().FindGlobalVariables(
ConstString(name), max_matches,
1856 if (!variable_list.
Empty()) {
1858 if (exe_scope ==
nullptr)
1859 exe_scope = target_sp.get();
1860 for (
const VariableSP &var_sp : variable_list) {
1861 lldb::ValueObjectSP valobj_sp(
1869 return sb_value_list;
1879 TargetSP target_sp(
GetSP());
1880 if (name && target_sp) {
1881 llvm::StringRef name_ref(name);
1884 std::string regexstr;
1885 switch (matchtype) {
1887 target_sp->GetImages().FindGlobalVariables(
ConstString(name), max_matches,
1892 max_matches, variable_list);
1895 regexstr = llvm::Regex::escape(name) +
".*";
1897 max_matches, variable_list);
1900 if (!variable_list.
Empty()) {
1902 if (exe_scope ==
nullptr)
1903 exe_scope = target_sp.get();
1904 for (
const VariableSP &var_sp : variable_list) {
1905 lldb::ValueObjectSP valobj_sp(
1913 return sb_value_list;
1929 return source_manager;
1941 const char *flavor_string) {
1946 TargetSP target_sp(
GetSP());
1952 target_sp->GetArchitecture().GetMaximumOpcodeByteSize() * count, 0);
1953 bool force_live_memory =
true;
1956 const size_t bytes_read =
1957 target_sp->ReadMemory(*addr_ptr, data.GetBytes(), data.
GetByteSize(),
1958 error, force_live_memory, &load_addr);
1961 target_sp->GetArchitecture(),
nullptr, flavor_string, *addr_ptr,
1962 data.GetBytes(), bytes_read, count, data_from_file));
1966 return sb_instructions;
1979 const char *flavor_string,
const void *buf,
1985 TargetSP target_sp(
GetSP());
1989 if (base_addr.
get())
1990 addr = *base_addr.
get();
1992 const bool data_from_file =
true;
1995 target_sp->GetArchitecture(),
nullptr, flavor_string, addr, buf, size,
1999 return sb_instructions;
2013 const char *flavor_string,
const void *buf,
2026 TargetSP target_sp(
GetSP());
2029 sb_error.SetErrorStringWithFormat(
"invalid section");
2031 SectionSP section_sp(section.
GetSP());
2033 if (section_sp->IsThreadSpecific()) {
2035 "thread specific sections are not yet supported");
2037 ProcessSP process_sp(target_sp->GetProcessSP());
2038 if (target_sp->SetSectionLoadAddress(section_sp, section_base_addr)) {
2039 ModuleSP module_sp(section_sp->GetModule());
2042 module_list.
Append(module_sp);
2043 target_sp->ModulesDidLoad(module_list);
2047 process_sp->Flush();
2063 TargetSP target_sp(
GetSP());
2066 sb_error.SetErrorStringWithFormat(
"invalid section");
2068 SectionSP section_sp(section.
GetSP());
2070 ProcessSP process_sp(target_sp->GetProcessSP());
2071 if (target_sp->SetSectionUnloaded(section_sp)) {
2072 ModuleSP module_sp(section_sp->GetModule());
2075 module_list.
Append(module_sp);
2076 target_sp->ModulesDidUnload(module_list,
false);
2080 process_sp->Flush();
2083 sb_error.SetErrorStringWithFormat(
"invalid section");
2087 sb_error.SetErrorStringWithFormat(
"invalid target");
2093 int64_t slide_offset) {
2096 if (slide_offset < 0) {
2098 sb_error.SetErrorStringWithFormat(
"slide must be positive");
2106 uint64_t slide_offset) {
2110 TargetSP target_sp(
GetSP());
2112 ModuleSP module_sp(module.
GetSP());
2114 bool changed =
false;
2115 if (module_sp->SetLoadAddress(*target_sp, slide_offset,
true, changed)) {
2120 module_list.
Append(module_sp);
2121 target_sp->ModulesDidLoad(module_list);
2123 ProcessSP process_sp(target_sp->GetProcessSP());
2125 process_sp->Flush();
2129 sb_error.SetErrorStringWithFormat(
"invalid module");
2133 sb_error.SetErrorStringWithFormat(
"invalid target");
2144 TargetSP target_sp(
GetSP());
2146 ModuleSP module_sp(module.
GetSP());
2148 ObjectFile *objfile = module_sp->GetObjectFile();
2152 ProcessSP process_sp(target_sp->GetProcessSP());
2154 bool changed =
false;
2155 const size_t num_sections = section_list->
GetSize();
2156 for (
size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
2159 changed |= target_sp->SetSectionUnloaded(section_sp);
2163 module_list.
Append(module_sp);
2164 target_sp->ModulesDidUnload(module_list,
false);
2166 ProcessSP process_sp(target_sp->GetProcessSP());
2168 process_sp->Flush();
2171 module_sp->GetFileSpec().GetPath(path,
sizeof(path));
2172 sb_error.SetErrorStringWithFormat(
"no sections in object file '%s'",
2176 module_sp->GetFileSpec().GetPath(path,
sizeof(path));
2177 sb_error.SetErrorStringWithFormat(
"no object file for module '%s'",
2181 sb_error.SetErrorStringWithFormat(
"invalid module");
2184 sb_error.SetErrorStringWithFormat(
"invalid target");
2194 if (name && name[0]) {
2195 TargetSP target_sp(
GetSP());
2197 target_sp->GetImages().FindSymbolsWithNameAndType(
2206 TargetSP target_sp(
GetSP());
2212 target_sp->GetPreferDynamicValue();
2222 Log *expr_log =
GetLog(LLDBLog::Expressions);
2224 ValueObjectSP expr_value_sp;
2225 TargetSP target_sp(
GetSP());
2228 if (expr ==
nullptr || expr[0] ==
'\0') {
2232 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
2247 error.SetErrorString(
"can't evaluate expressions when the "
2248 "process is running.");
2259 "** [SBTarget::EvaluateExpression] Expression result is "
2260 "%s, summary %s **",
2268 TargetSP target_sp(
GetSP());
2271 ProcessSP process_sp(target_sp->GetProcessSP());
2273 abi_sp = process_sp->GetABI();
2277 return abi_sp->GetRedZoneSize();
2285 TargetSP target_sp(
GetSP());
2289 ModuleSP module_sp(module.
GetSP());
2293 return module_sp->IsLoadedInTarget(target_sp.get());
2300 TargetSP target_sp(
GetSP());
2309 TargetSP target_sp(
GetSP());
2316 TargetSP target_sp(
GetSP());
2327 TargetSP target_sp(
GetSP());
2330 return SBTrace(target_sp->GetTrace());
2337 TargetSP target_sp(
GetSP());
2341 if (llvm::Expected<lldb::TraceSP> trace_sp = target_sp->CreateTrace()) {
2344 error.SetErrorString(llvm::toString(trace_sp.takeError()).c_str());
2347 error.SetErrorString(
"missing target");
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_INSTRUMENT()
#define LLDB_INSTRUMENT_VA(...)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
#define LLDB_LOGF(log,...)
static Status AttachToProcess(ProcessAttachInfo &attach_info, Target &target)
lldb_private::Address * get()
addr_t GetLoadAddress(const lldb::SBTarget &target) const
lldb_private::Address & ref()
lldb_private::ProcessAttachInfo & ref()
void CopyToBreakpointIDList(lldb_private::BreakpointIDList &bp_id_list)
void AppendByID(lldb::break_id_t id)
void reset(const lldb::DebuggerSP &debugger_sp)
void SetErrorString(const char *err_str)
lldb_private::Status & ref()
lldb_private::Event * get() const
void SetFetchDynamicValue(lldb::DynamicValueType dynamic=lldb::eDynamicCanRunTarget)
lldb_private::EvaluateExpressionOptions & ref() const
void SetUnwindOnError(bool unwind=true)
lldb::DynamicValueType GetFetchDynamicValue() const
const lldb_private::FileSpecList * get() const
void Append(const SBFileSpec &sb_file)
void SetFileSpec(const lldb_private::FileSpec &fspec)
const lldb_private::FileSpec & ref() const
void SetDisassembler(const lldb::DisassemblerSP &opaque_sp)
void SetWorkingDirectory(const char *working_dir)
void SetExecutableFile(SBFileSpec exe_file, bool add_as_first_arg)
Set the executable file that will be used to launch the process and optionally set it as the first ar...
void set_ref(const lldb_private::ProcessLaunchInfo &info)
void SetEnvironmentEntries(const char **envp, bool append)
Update this object with the given environment variables.
const lldb_private::ProcessLaunchInfo & ref() const
void SetArguments(const char **argv, bool append)
lldb::ListenerSP m_opaque_sp
std::unique_ptr< lldb_private::ModuleSpec > m_opaque_up
void SetSP(const ModuleSP &module_sp)
void SetSP(const lldb::ProcessSP &process_sp)
lldb::SectionSP GetSP() const
lldb_private::Stream & ref()
void AppendString(const char *str)
const char * GetStringAtIndex(size_t idx)
StructuredDataImplUP m_impl_up
lldb_private::SymbolContext & ref()
SBSourceManager GetSourceManager()
bool AddModule(lldb::SBModule &module)
bool DisableAllBreakpoints()
uint32_t GetNumWatchpoints() const
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
lldb::SBError ClearSectionLoadAddress(lldb::SBSection section)
Clear the base load address for a module section.
bool DeleteWatchpoint(lldb::watch_id_t watch_id)
lldb::ByteOrder GetByteOrder()
uint32_t GetNumBreakpoints() const
lldb::SBInstructionList GetInstructionsWithFlavor(lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size)
void SetCollectingStats(bool v)
Sets whether we should collect statistics on lldb or not.
bool BreakpointDelete(break_id_t break_id)
void SetSP(const lldb::TargetSP &target_sp)
bool IsLoaded(const lldb::SBModule &module) const
static lldb::SBModule GetModuleAtIndexFromEvent(const uint32_t idx, const lldb::SBEvent &event)
bool GetCollectingStats()
Returns whether statistics collection are enabled.
lldb::SBBreakpoint BreakpointCreateByAddress(addr_t address)
lldb::SBValue CreateValueFromExpression(const char *name, const char *expr)
lldb::SBSymbolContextList FindGlobalFunctions(const char *name, uint32_t max_matches, MatchType matchtype)
Find global functions by their name with pattern matching.
lldb::SBBreakpoint BreakpointCreateByRegex(const char *symbol_name_regex, const char *module_name=nullptr)
lldb::SBTrace GetTrace()
Get a SBTrace object the can manage the processor trace information of this target.
const lldb::SBTarget & operator=(const lldb::SBTarget &rhs)
static bool EventIsTargetEvent(const lldb::SBEvent &event)
lldb::SBAddress ResolvePastLoadAddress(uint32_t stop_id, lldb::addr_t vm_addr)
Resolve a current load address into a section offset address using the process stop ID to identify a ...
bool DisableAllWatchpoints()
lldb::addr_t GetStackRedZoneSize()
lldb::SBBreakpoint GetBreakpointAtIndex(uint32_t idx) const
SBError Install()
Install any binaries that need to be installed.
lldb::SBSymbolContextList FindCompileUnits(const lldb::SBFileSpec &sb_file_spec)
Find compile units related to *this target and passed source file.
lldb::SBAddress ResolveLoadAddress(lldb::addr_t vm_addr)
Resolve a current load address into a section offset address.
lldb::SBStructuredData GetStatistics()
Returns a dump of the collected statistics.
lldb::SBModule GetModuleAtIndex(uint32_t idx)
lldb::SBValueList FindGlobalVariables(const char *name, uint32_t max_matches)
Find global and static variables by name.
lldb::SBType GetBasicType(lldb::BasicType type)
lldb::SBFileSpec GetExecutable()
const char * GetABIName()
lldb::SBError SetSectionLoadAddress(lldb::SBSection section, lldb::addr_t section_base_addr)
Set the base load address for a module section.
lldb::SBProcess ConnectRemote(SBListener &listener, const char *url, const char *plugin_name, SBError &error)
Connect to a remote debug server with url.
friend class SBBreakpoint
lldb::SBBreakpoint BreakpointCreateByName(const char *symbol_name, const char *module_name=nullptr)
void DeleteBreakpointName(const char *name)
SBProcess Attach(SBAttachInfo &attach_info, SBError &error)
bool EnableAllWatchpoints()
lldb::SBBreakpoint BreakpointCreateBySBAddress(SBAddress &address)
LLDB_DEPRECATED("Use SetModuleLoadAddress(lldb::SBModule, uint64_t)", "SetModuleLoadAddress(lldb::SBModule, uint64_t)") lldb lldb::SBError SetModuleLoadAddress(lldb::SBModule module, uint64_t sections_offset)
Slide all file addresses for all module sections so that module appears to loaded at these slide addr...
lldb::SBProcess GetProcess()
SBSymbolContext ResolveSymbolContextForAddress(const SBAddress &addr, uint32_t resolve_scope)
lldb::SBProcess AttachToProcessWithID(SBListener &listener, lldb::pid_t pid, lldb::SBError &error)
Attach to process with pid.
lldb::SBPlatform GetPlatform()
Return the platform object associated with the target.
lldb::SBBreakpoint BreakpointCreateByLocation(const char *file, uint32_t line)
lldb::SBBreakpoint BreakpointCreateForException(lldb::LanguageType language, bool catch_bp, bool throw_bp)
uint32_t GetNumModules() const
lldb::TargetSP GetSP() const
uint32_t GetDataByteSize()
Architecture data byte width accessor.
uint32_t GetMaximumNumberOfChildrenToDisplay() const
Gets the target.max-children-count value It should be used to limit the number of children of large d...
bool DeleteAllWatchpoints()
lldb::SBInstructionList GetInstructions(lldb::SBAddress base_addr, const void *buf, size_t size)
lldb::SBProcess Launch(SBListener &listener, char const **argv, char const **envp, const char *stdin_path, const char *stdout_path, const char *stderr_path, const char *working_directory, uint32_t launch_flags, bool stop_at_entry, lldb::SBError &error)
Launch a new process.
bool RemoveModule(lldb::SBModule module)
lldb::SBWatchpoint WatchAddress(lldb::addr_t addr, size_t size, bool read, bool write, SBError &error)
lldb::SBSymbolContextList FindFunctions(const char *name, uint32_t name_type_mask=lldb::eFunctionNameTypeAny)
Find functions by name.
lldb::SBValue FindFirstGlobalVariable(const char *name)
Find the first global (or static) variable by name.
lldb::SBValue EvaluateExpression(const char *expr)
lldb::SBBreakpoint BreakpointCreateFromScript(const char *class_name, SBStructuredData &extra_args, const SBFileSpecList &module_list, const SBFileSpecList &file_list, bool request_hardware=false)
Create a breakpoint using a scripted resolver.
static const char * GetBroadcasterClassName()
SBEnvironment GetEnvironment()
Return the environment variables that would be used to launch a new process.
lldb::SBTypeList FindTypes(const char *type)
lldb::SBValue CreateValueFromAddress(const char *name, lldb::SBAddress addr, lldb::SBType type)
static lldb::SBTarget GetTargetFromEvent(const lldb::SBEvent &event)
lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file, SBBreakpointList &new_bps)
Read breakpoints from source_file and return the newly created breakpoints in bkpt_list.
uint32_t GetAddressByteSize()
bool operator==(const lldb::SBTarget &rhs) const
bool operator!=(const lldb::SBTarget &rhs) const
lldb::TargetSP m_opaque_sp
lldb::SBWatchpoint GetWatchpointAtIndex(uint32_t idx) const
lldb::SBLaunchInfo GetLaunchInfo() const
lldb::SBSymbolContextList FindSymbols(const char *name, lldb::SymbolType type=eSymbolTypeAny)
void AppendImageSearchPath(const char *from, const char *to, lldb::SBError &error)
lldb::SBTrace CreateTrace(SBError &error)
Create a Trace object for the current target using the using the default supported tracing technology...
lldb::SBBreakpoint BreakpointCreateBySourceRegex(const char *source_regex, const SBFileSpec &source_file, const char *module_name=nullptr)
bool DeleteAllBreakpoints()
lldb::SBValue CreateValueFromData(const char *name, lldb::SBData data, lldb::SBType type)
lldb::SBBroadcaster GetBroadcaster() const
bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list)
size_t ReadMemory(const SBAddress addr, void *buf, size_t size, lldb::SBError &error)
Read target memory.
lldb::SBBreakpoint BreakpointCreateByNames(const char *symbol_name[], uint32_t num_names, uint32_t name_type_mask, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
SBProcess LaunchSimple(const char **argv, const char **envp, const char *working_directory)
Launch a new process with sensible defaults.
lldb::SBModule FindModule(const lldb::SBFileSpec &file_spec)
lldb::SBBreakpoint FindBreakpointByID(break_id_t break_id)
lldb::SBInstructionList ReadInstructions(lldb::SBAddress base_addr, uint32_t count)
void GetBreakpointNames(SBStringList &names)
lldb::SBDebugger GetDebugger() const
lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file)
Write breakpoints to dest_file.
lldb::SBWatchpoint FindWatchpointByID(lldb::watch_id_t watch_id)
lldb::SBAddress ResolveFileAddress(lldb::addr_t file_addr)
Resolve a current file address into a section offset address.
void SetLaunchInfo(const lldb::SBLaunchInfo &launch_info)
lldb::SBError ClearModuleLoadAddress(lldb::SBModule module)
Clear the section base load addresses for all sections in a module.
lldb::SBType FindFirstType(const char *type)
uint32_t GetCodeByteSize()
Architecture code byte width accessor.
lldb::SBProcess AttachToProcessWithName(SBListener &listener, const char *name, bool wait_for, lldb::SBError &error)
Attach to process with name.
SBProcess LoadCore(const char *core_file)
static uint32_t GetNumModulesFromEvent(const lldb::SBEvent &event)
bool EnableAllBreakpoints()
void Append(lldb::SBType type)
void Append(const lldb::SBValue &val_obj)
lldb::SBValue GetValueAtIndex(uint32_t idx) const
void SetSP(const lldb::ValueObjectSP &sp)
const char * GetSummary()
void SetSP(const lldb::WatchpointSP &sp)
static lldb::ABISP FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch)
A section + offset based address class.
void SetRawAddress(lldb::addr_t addr)
An architecture specification class.
bool IsValid() const
Tests if this ArchSpec is valid.
void AppendArguments(const Args &rhs)
const BreakpointID & GetBreakpointIDAtIndex(size_t index) const
lldb::break_id_t GetBreakpointID() const
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
const char * GetCString() const
Get the string value as a C string.
A subclass of DataBuffer that stores a data buffer on the heap.
lldb::offset_t GetByteSize() const override
static void SetCollectingStats(bool enable)
static bool GetCollectingStats()
static llvm::json::Value ReportStatistics(Debugger &debugger, Target *target)
Get metrics associated with one or all targets in a debugger in JSON format.
static lldb::DisassemblerSP DisassembleBytes(const ArchSpec &arch, const char *plugin_name, const char *flavor, const Address &start, const void *bytes, size_t length, uint32_t max_num_instructions, bool data_from_file)
Execution context objects refer to objects in the execution of the program that is being debugged.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
StackFrame * GetFramePtr() const
Returns a pointer to the frame object.
Target * GetTargetPtr() const
Returns a pointer to the target object.
Process * GetProcessPtr() const
Returns a pointer to the process object.
void Append(const FileSpec &file)
Append a FileSpec object to the list.
void SetFile(llvm::StringRef path, Style style)
Change the file specified with a new path.
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
static FileSystem & Instance()
A collection class for Module objects.
void FindTypes(Module *search_first, ConstString name, bool name_is_fully_qualified, size_t max_matches, llvm::DenseSet< SymbolFile * > &searched_symbol_files, TypeList &types) const
Find types by name.
void Append(const lldb::ModuleSP &module_sp, bool notify=true)
Append a module to the module list.
lldb::ModuleSP GetModuleAtIndex(size_t idx) const
Get the module shared pointer for the module at index idx.
size_t GetSize() const
Gets the size of the module list.
ArchSpec & GetArchitecture()
FileSpec & GetSymbolFileSpec()
A class that describes an executable image and its associated object and symbol files.
const FileSpec & GetPlatformFileSpec() const
Get accessor for the module platform file specification.
const FileSpec & GetFileSpec() const
Get const accessor for the module file specification.
A plug-in interface definition class for object file parsers.
virtual SectionList * GetSectionList(bool update_module_section_list=true)
Gets the section list for the currently selected architecture (and object for archives).
void SetWaitForLaunch(bool b)
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
bool ProcessIDIsValid() const
lldb::pid_t GetProcessID() const
void SetProcessID(lldb::pid_t pid)
FileSpec & GetExecutableFile()
void SetListener(const lldb::ListenerSP &listener_sp)
lldb::ListenerSP GetListener() const
bool UserIDIsValid() const
Environment & GetEnvironment()
bool IsScriptedProcess() const
void SetUserID(uint32_t uid)
ArchSpec & GetArchitecture()
uint32_t GetEffectiveUserID() const
bool TryLock(ProcessRunLock *lock)
A plug-in interface definition class for debugging a process.
ProcessRunLock & GetRunLock()
lldb::SectionSP GetSectionAtIndex(size_t idx) const
This base class provides an interface to stack frames.
A stream class that can stream formatted output to a file.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
std::shared_ptr< Object > ObjectSP
static ObjectSP ParseJSON(llvm::StringRef json_text)
Defines a symbol context baton that can be handed other debug core functions.
static ModuleList GetModuleListFromEvent(const Event *event_ptr)
static const TargetEventData * GetEventDataFromEvent(const Event *event_ptr)
static lldb::TargetSP GetTargetFromEvent(const Event *event_ptr)
static ConstString & GetStaticBroadcasterClass()
const lldb::ProcessSP & GetProcessSP() const
std::recursive_mutex & GetAPIMutex()
Status Attach(ProcessAttachInfo &attach_info, Stream *stream)
lldb::ExpressionResults EvaluateExpression(llvm::StringRef expression, ExecutionContextScope *exe_scope, lldb::ValueObjectSP &result_valobj_sp, const EvaluateExpressionOptions &options=EvaluateExpressionOptions(), std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
lldb::TypeSP GetTypeAtIndex(uint32_t idx)
bool SetFromStringRef(llvm::StringRef str)
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS)
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, const lldb::VariableSP &var_sp)
static lldb::ValueObjectSP CreateValueObjectFromExpression(llvm::StringRef name, llvm::StringRef expression, const ExecutionContext &exe_ctx)
static lldb::ValueObjectSP CreateValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
static lldb::ValueObjectSP CreateValueObjectFromAddress(llvm::StringRef name, uint64_t address, const ExecutionContext &exe_ctx, CompilerType type)
#define LLDB_WATCH_TYPE_WRITE
#define LLDB_INVALID_BREAK_ID
#define LLDB_INVALID_WATCH_ID
#define LLDB_WATCH_TYPE_READ
#define LLDB_INVALID_ADDRESS
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.
MatchType
String matching algorithm used by SBTarget.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
StateType
Process and Thread States.
@ eStateConnected
Process is connected to remote debug services, but not launched or attached to anything yet.
@ eStateAttaching
Process is currently trying to attach.
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
ByteOrder
Byte ordering definitions.
Options used by Module::FindFunctions.
bool include_inlines
Include inlined functions.
bool include_symbols
Include the symbol table.