Lines Matching refs:target_sp

107 SBTarget::SBTarget(const TargetSP &target_sp) : m_opaque_sp(target_sp) {
108 LLDB_RECORD_CONSTRUCTOR(SBTarget, (const lldb::TargetSP &), target_sp);
180 TargetSP target_sp(GetSP());
181 if (target_sp) {
182 process_sp = target_sp->GetProcessSP();
192 TargetSP target_sp(GetSP());
193 if (!target_sp)
197 platform.m_opaque_sp = target_sp->GetPlatform();
206 TargetSP target_sp(GetSP());
207 if (target_sp)
208 debugger.reset(target_sp->GetDebugger().shared_from_this());
216 TargetSP target_sp(GetSP());
217 if (!target_sp)
222 for (auto &Entry : target_sp->GetStatistics()) {
236 TargetSP target_sp(GetSP());
237 if (!target_sp)
239 return target_sp->SetCollectingStats(v);
245 TargetSP target_sp(GetSP());
246 if (!target_sp)
248 return target_sp->GetCollectingStats();
264 TargetSP target_sp(GetSP());
265 if (target_sp) {
268 ProcessSP process_sp(target_sp->CreateProcess(
269 target_sp->GetDebugger().GetListener(), "", &filespec));
305 TargetSP target_sp(GetSP());
306 if (target_sp) {
307 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
308 sb_error.ref() = target_sp->Install(nullptr);
328 TargetSP target_sp(GetSP());
330 if (target_sp) {
331 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
340 process_sp = target_sp->GetProcessSP();
371 Module *exe_module = target_sp->GetExecutableModulePointer();
382 error.SetError(target_sp->Launch(launch_info, nullptr));
384 sb_process.SetSP(target_sp->GetProcessSP());
399 TargetSP target_sp(GetSP());
401 if (target_sp) {
402 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
405 ProcessSP process_sp = target_sp->GetProcessSP();
422 Module *exe_module = target_sp->GetExecutableModulePointer();
427 const ArchSpec &arch_spec = target_sp->GetArchitecture();
431 error.SetError(target_sp->Launch(launch_info, nullptr));
433 sb_process.SetSP(target_sp->GetProcessSP());
447 TargetSP target_sp(GetSP());
449 if (target_sp) {
452 PlatformSP platform_sp = target_sp->GetPlatform();
466 error.SetError(AttachToProcess(attach_info, *target_sp));
468 sb_process.SetSP(target_sp->GetProcessSP());
486 TargetSP target_sp(GetSP());
488 if (target_sp) {
495 if (target_sp->GetPlatform()->GetProcessInfo(pid, instance_info))
498 error.SetError(AttachToProcess(attach_info, *target_sp));
500 sb_process.SetSP(target_sp->GetProcessSP());
518 TargetSP target_sp(GetSP());
520 if (name && target_sp) {
527 error.SetError(AttachToProcess(attach_info, *target_sp));
529 sb_process.SetSP(target_sp->GetProcessSP());
546 TargetSP target_sp(GetSP());
548 if (target_sp) {
549 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
552 target_sp->CreateProcess(listener.m_opaque_sp, plugin_name, nullptr);
554 process_sp = target_sp->CreateProcess(
555 target_sp->GetDebugger().GetListener(), plugin_name, nullptr);
574 TargetSP target_sp(GetSP());
575 if (target_sp) {
576 Module *exe_module = target_sp->GetExecutableModulePointer();
600 void SBTarget::SetSP(const lldb::TargetSP &target_sp) {
601 m_opaque_sp = target_sp;
610 TargetSP target_sp(GetSP());
611 if (target_sp) {
612 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
613 if (target_sp->ResolveLoadAddress(vm_addr, addr))
629 TargetSP target_sp(GetSP());
630 if (target_sp) {
631 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
632 if (target_sp->ResolveFileAddress(file_addr, addr))
647 TargetSP target_sp(GetSP());
648 if (target_sp) {
649 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
650 if (target_sp->ResolveLoadAddress(vm_addr, addr))
670 TargetSP target_sp(GetSP());
671 if (target_sp)
672 target_sp->GetImages().ResolveSymbolContextForAddress(addr.ref(), scope,
686 TargetSP target_sp(GetSP());
687 if (target_sp) {
688 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
690 target_sp->ReadMemory(addr.ref(), false, buf, size, sb_error.ref());
750 TargetSP target_sp(GetSP());
751 if (target_sp && line != 0) {
752 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
763 sb_bp = target_sp->CreateBreakpoint(
777 TargetSP target_sp(GetSP());
778 if (target_sp.get()) {
779 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
788 sb_bp = target_sp->CreateBreakpoint(
792 sb_bp = target_sp->CreateBreakpoint(
841 TargetSP target_sp(GetSP());
842 if (target_sp && symbol_name && symbol_name[0]) {
846 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
848 sb_bp = target_sp->CreateBreakpoint(module_list.get(), comp_unit_list.get(),
898 TargetSP target_sp(GetSP());
899 if (target_sp && num_names > 0) {
900 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
905 sb_bp = target_sp->CreateBreakpoint(
953 TargetSP target_sp(GetSP());
954 if (target_sp && symbol_name_regex && symbol_name_regex[0]) {
955 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
961 sb_bp = target_sp->CreateFuncRegexBreakpoint(
974 TargetSP target_sp(GetSP());
975 if (target_sp) {
976 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
978 sb_bp = target_sp->CreateBreakpoint(address, false, hardware);
989 TargetSP target_sp(GetSP());
994 if (target_sp) {
995 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
997 sb_bp = target_sp->CreateBreakpoint(sb_address.ref(), false, hardware);
1051 TargetSP target_sp(GetSP());
1052 if (target_sp && source_regex && source_regex[0]) {
1053 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1062 sb_bp = target_sp->CreateSourceRegexBreakpoint(
1078 TargetSP target_sp(GetSP());
1079 if (target_sp) {
1080 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1082 sb_bp = target_sp->CreateExceptionBreakpoint(language, catch_bp, throw_bp,
1100 TargetSP target_sp(GetSP());
1101 if (target_sp) {
1102 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1107 target_sp->CreateScriptedBreakpoint(class_name,
1122 TargetSP target_sp(GetSP());
1123 if (target_sp) {
1125 return target_sp->GetBreakpointList().GetSize();
1135 TargetSP target_sp(GetSP());
1136 if (target_sp) {
1138 sb_breakpoint = target_sp->GetBreakpointList().GetBreakpointAtIndex(idx);
1148 TargetSP target_sp(GetSP());
1149 if (target_sp) {
1150 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1151 result = target_sp->RemoveBreakpointByID(bp_id);
1162 TargetSP target_sp(GetSP());
1163 if (target_sp && bp_id != LLDB_INVALID_BREAK_ID) {
1164 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1165 sb_breakpoint = target_sp->GetBreakpointByID(bp_id);
1176 TargetSP target_sp(GetSP());
1177 if (target_sp) {
1178 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1180 target_sp->GetBreakpointList().FindBreakpointsByName(name);
1200 TargetSP target_sp(GetSP());
1201 if (target_sp) {
1202 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1205 target_sp->GetBreakpointNames(name_vec);
1215 TargetSP target_sp(GetSP());
1216 if (target_sp) {
1217 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1218 target_sp->DeleteBreakpointName(ConstString(name));
1225 TargetSP target_sp(GetSP());
1226 if (target_sp) {
1227 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1228 target_sp->EnableAllowedBreakpoints();
1237 TargetSP target_sp(GetSP());
1238 if (target_sp) {
1239 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1240 target_sp->DisableAllowedBreakpoints();
1249 TargetSP target_sp(GetSP());
1250 if (target_sp) {
1251 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1252 target_sp->RemoveAllowedBreakpoints();
1278 TargetSP target_sp(GetSP());
1279 if (!target_sp) {
1284 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1293 sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(),
1311 TargetSP target_sp(GetSP());
1312 if (!target_sp) {
1328 TargetSP target_sp(GetSP());
1329 if (!target_sp) {
1334 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1337 sberr.ref() = target_sp->SerializeBreakpointsToFile(dest_file.ref(),
1345 TargetSP target_sp(GetSP());
1346 if (target_sp) {
1348 return target_sp->GetWatchpointList().GetSize();
1358 TargetSP target_sp(GetSP());
1359 if (target_sp) {
1361 sb_watchpoint.SetSP(target_sp->GetWatchpointList().GetByIndex(idx));
1372 TargetSP target_sp(GetSP());
1373 if (target_sp) {
1374 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1376 target_sp->GetWatchpointList().GetListMutex(lock);
1377 result = target_sp->RemoveWatchpointByID(wp_id);
1390 TargetSP target_sp(GetSP());
1391 if (target_sp && wp_id != LLDB_INVALID_WATCH_ID) {
1392 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1394 target_sp->GetWatchpointList().GetListMutex(lock);
1395 watchpoint_sp = target_sp->GetWatchpointList().FindByID(wp_id);
1411 TargetSP target_sp(GetSP());
1412 if (target_sp && (read || write) && addr != LLDB_INVALID_ADDRESS &&
1414 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1431 target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error);
1442 TargetSP target_sp(GetSP());
1443 if (target_sp) {
1444 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1446 target_sp->GetWatchpointList().GetListMutex(lock);
1447 target_sp->EnableAllWatchpoints();
1456 TargetSP target_sp(GetSP());
1457 if (target_sp) {
1458 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1460 target_sp->GetWatchpointList().GetListMutex(lock);
1461 target_sp->DisableAllWatchpoints();
1527 TargetSP target_sp(GetSP());
1528 if (target_sp) {
1529 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1531 target_sp->GetWatchpointList().GetListMutex(lock);
1532 target_sp->RemoveAllWatchpoints();
1544 TargetSP target_sp(GetSP());
1545 if (!target_sp)
1554 target_sp->GetImageSearchPathList().Append(csFrom, csTo, true);
1573 TargetSP target_sp(GetSP());
1574 if (target_sp) {
1584 target_sp->GetPlatform().get(), triple);
1586 module_spec.GetArchitecture() = target_sp->GetArchitecture();
1591 sb_module.SetSP(target_sp->GetOrCreateModule(module_spec, true /* notify */));
1601 TargetSP target_sp(GetSP());
1602 if (target_sp)
1603 sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up,
1611 TargetSP target_sp(GetSP());
1612 if (target_sp) {
1613 target_sp->GetImages().AppendIfNeeded(module.GetSP());
1623 TargetSP target_sp(GetSP());
1624 if (target_sp) {
1626 num = target_sp->GetImages().GetSize();
1643 TargetSP target_sp(GetSP());
1644 if (target_sp && sb_file_spec.IsValid()) {
1647 sb_module.SetSP(target_sp->GetImages().FindFirstModule(module_spec));
1657 const TargetSP target_sp(GetSP());
1658 if (target_sp && sb_file_spec.IsValid())
1659 target_sp->GetImages().FindCompileUnits(*sb_file_spec, *sb_sc_list);
1666 TargetSP target_sp(GetSP());
1667 if (target_sp)
1668 return target_sp->GetArchitecture().GetByteOrder();
1675 TargetSP target_sp(GetSP());
1676 if (target_sp) {
1677 std::string triple(target_sp->GetArchitecture().GetTriple().str());
1690 TargetSP target_sp(GetSP());
1691 if (target_sp) {
1692 return target_sp->GetArchitecture().GetDataByteSize();
1700 TargetSP target_sp(GetSP());
1701 if (target_sp) {
1702 return target_sp->GetArchitecture().GetCodeByteSize();
1710 TargetSP target_sp(GetSP());
1711 if (target_sp)
1712 return target_sp->GetArchitecture().GetAddressByteSize();
1722 TargetSP target_sp(GetSP());
1723 if (target_sp) {
1725 module_sp = target_sp->GetImages().GetModuleAtIndex(idx);
1735 TargetSP target_sp(GetSP());
1736 if (target_sp)
1737 return target_sp->GetImages().Remove(module.GetSP());
1746 TargetSP target_sp(GetSP());
1747 SBBroadcaster broadcaster(target_sp.get(), false);
1761 TargetSP target_sp(GetSP());
1762 if (target_sp) {
1763 target_sp->Dump(&strm, description_level);
1779 TargetSP target_sp(GetSP());
1780 if (!target_sp)
1786 target_sp->GetImages().FindFunctions(ConstString(name), mask, symbols_ok,
1801 TargetSP target_sp(GetSP());
1802 if (target_sp) {
1806 target_sp->GetImages().FindFunctions(RegularExpression(name_ref), true,
1811 target_sp->GetImages().FindFunctions(RegularExpression(regexstr), true,
1815 target_sp->GetImages().FindFunctions(
1828 TargetSP target_sp(GetSP());
1829 if (typename_cstr && typename_cstr[0] && target_sp) {
1834 const ModuleList &module_list = target_sp->GetImages();
1847 if (auto process_sp = target_sp->GetProcessSP()) {
1858 for (auto *type_system : target_sp->GetScratchTypeSystems())
1870 TargetSP target_sp(GetSP());
1871 if (target_sp) {
1872 for (auto *type_system : target_sp->GetScratchTypeSystems())
1884 TargetSP target_sp(GetSP());
1885 if (typename_cstr && typename_cstr[0] && target_sp) {
1886 ModuleList &images = target_sp->GetImages();
1901 if (auto process_sp = target_sp->GetProcessSP()) {
1914 for (auto *type_system : target_sp->GetScratchTypeSystems())
1930 TargetSP target_sp(GetSP());
1931 if (name && target_sp) {
1933 target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches,
1936 ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
1938 exe_scope = target_sp.get();
1960 TargetSP target_sp(GetSP());
1961 if (name && target_sp) {
1968 target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches,
1972 target_sp->GetImages().FindGlobalVariables(RegularExpression(name_ref),
1977 target_sp->GetImages().FindGlobalVariables(RegularExpression(regexstr),
1982 ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
1984 exe_scope = target_sp.get();
2031 TargetSP target_sp(GetSP());
2032 if (target_sp) {
2037 target_sp->GetArchitecture().GetMaximumOpcodeByteSize() * count, 0);
2042 target_sp->ReadMemory(*addr_ptr, prefer_file_cache, data.GetBytes(),
2046 target_sp->GetArchitecture(), nullptr, flavor_string, *addr_ptr,
2075 TargetSP target_sp(GetSP());
2076 if (target_sp) {
2085 target_sp->GetArchitecture(), nullptr, flavor_string, addr, buf, size,
2122 TargetSP target_sp(GetSP());
2123 if (target_sp) {
2133 ProcessSP process_sp(target_sp->GetProcessSP());
2134 if (target_sp->SetSectionLoadAddress(section_sp, section_base_addr)) {
2139 target_sp->ModulesDidLoad(module_list);
2160 TargetSP target_sp(GetSP());
2161 if (target_sp) {
2167 ProcessSP process_sp(target_sp->GetProcessSP());
2168 if (target_sp->SetSectionUnloaded(section_sp)) {
2173 target_sp->ModulesDidUnload(module_list, false);
2196 TargetSP target_sp(GetSP());
2197 if (target_sp) {
2201 if (module_sp->SetLoadAddress(*target_sp, slide_offset, true, changed)) {
2207 target_sp->ModulesDidLoad(module_list);
2209 ProcessSP process_sp(target_sp->GetProcessSP());
2231 TargetSP target_sp(GetSP());
2232 if (target_sp) {
2239 ProcessSP process_sp(target_sp->GetProcessSP());
2246 changed |= target_sp->SetSectionUnloaded(section_sp);
2251 target_sp->ModulesDidUnload(module_list, false);
2253 ProcessSP process_sp(target_sp->GetProcessSP());
2283 TargetSP target_sp(GetSP());
2284 if (target_sp)
2285 target_sp->GetImages().FindSymbolsWithNameAndType(
2295 TargetSP target_sp(GetSP());
2296 if (!target_sp)
2301 target_sp->GetPreferDynamicValue();
2316 TargetSP target_sp(GetSP());
2318 if (target_sp) {
2323 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
2356 TargetSP target_sp(GetSP());
2357 if (target_sp) {
2359 ProcessSP process_sp(target_sp->GetProcessSP());
2363 abi_sp = ABI::FindPlugin(ProcessSP(), target_sp->GetArchitecture());
2374 TargetSP target_sp(GetSP());
2375 if (target_sp)
2384 TargetSP target_sp(GetSP());
2385 if (target_sp)