Lines Matching defs:target_sp
103 SBTarget::SBTarget(const TargetSP &target_sp) : m_opaque_sp(target_sp) {
104 LLDB_INSTRUMENT_VA(this, target_sp);
168 TargetSP target_sp(GetSP());
169 if (target_sp) {
170 process_sp = target_sp->GetProcessSP();
180 TargetSP target_sp(GetSP());
181 if (!target_sp)
185 platform.m_opaque_sp = target_sp->GetPlatform();
194 TargetSP target_sp(GetSP());
195 if (target_sp)
196 debugger.reset(target_sp->GetDebugger().shared_from_this());
210 TargetSP target_sp(GetSP());
211 if (!target_sp)
215 target_sp->GetDebugger(), target_sp.get(),
225 TargetSP target_sp(GetSP());
226 if (!target_sp)
234 TargetSP target_sp(GetSP());
235 if (!target_sp)
251 TargetSP target_sp(GetSP());
252 if (target_sp) {
255 ProcessSP process_sp(target_sp->CreateProcess(
256 target_sp->GetDebugger().GetListener(), "", &filespec, false));
274 TargetSP target_sp = GetSP();
275 if (!target_sp)
280 if (Module *exe_module = target_sp->GetExecutableModulePointer())
298 TargetSP target_sp(GetSP());
299 if (target_sp) {
300 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
301 sb_error.ref() = target_sp->Install(nullptr);
318 TargetSP target_sp(GetSP());
320 if (target_sp) {
321 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
330 process_sp = target_sp->GetProcessSP();
361 Module *exe_module = target_sp->GetExecutableModulePointer();
367 auto default_launch_info = target_sp->GetProcessLaunchInfo();
374 auto default_launch_info = target_sp->GetProcessLaunchInfo();
381 error.SetError(target_sp->Launch(launch_info, nullptr));
383 sb_process.SetSP(target_sp->GetProcessSP());
395 TargetSP target_sp(GetSP());
397 if (target_sp) {
398 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
401 ProcessSP process_sp = target_sp->GetProcessSP();
418 Module *exe_module = target_sp->GetExecutableModulePointer();
423 const ArchSpec &arch_spec = target_sp->GetArchitecture();
427 error.SetError(target_sp->Launch(launch_info, nullptr));
429 sb_process.SetSP(target_sp->GetProcessSP());
441 TargetSP target_sp(GetSP());
443 if (target_sp) {
447 PlatformSP platform_sp = target_sp->GetPlatform();
461 error.SetError(AttachToProcess(attach_info, *target_sp));
463 sb_process.SetSP(target_sp->GetProcessSP());
479 TargetSP target_sp(GetSP());
481 if (target_sp) {
488 if (target_sp->GetPlatform()->GetProcessInfo(pid, instance_info))
491 error.SetError(AttachToProcess(attach_info, *target_sp));
493 sb_process.SetSP(target_sp->GetProcessSP());
509 TargetSP target_sp(GetSP());
511 if (name && target_sp) {
518 error.SetError(AttachToProcess(attach_info, *target_sp));
520 sb_process.SetSP(target_sp->GetProcessSP());
534 TargetSP target_sp(GetSP());
536 if (target_sp) {
537 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
540 target_sp->CreateProcess(listener.m_opaque_sp, plugin_name, nullptr,
543 process_sp = target_sp->CreateProcess(
544 target_sp->GetDebugger().GetListener(), plugin_name, nullptr, true);
563 TargetSP target_sp(GetSP());
564 if (target_sp) {
565 Module *exe_module = target_sp->GetExecutableModulePointer();
587 void SBTarget::SetSP(const lldb::TargetSP &target_sp) {
588 m_opaque_sp = target_sp;
596 TargetSP target_sp(GetSP());
597 if (target_sp) {
598 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
599 if (target_sp->ResolveLoadAddress(vm_addr, addr))
614 TargetSP target_sp(GetSP());
615 if (target_sp) {
616 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
617 if (target_sp->ResolveFileAddress(file_addr, addr))
631 TargetSP target_sp(GetSP());
632 if (target_sp) {
633 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
634 if (target_sp->ResolveLoadAddress(vm_addr, addr))
652 TargetSP target_sp(GetSP());
653 if (target_sp)
654 target_sp->GetImages().ResolveSymbolContextForAddress(addr.ref(), scope,
666 TargetSP target_sp(GetSP());
667 if (target_sp) {
668 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
670 target_sp->ReadMemory(addr.ref(), buf, size, sb_error.ref(), true);
719 TargetSP target_sp(GetSP());
720 if (target_sp && line != 0) {
721 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
732 sb_bp = target_sp->CreateBreakpoint(
748 TargetSP target_sp(GetSP());
749 if (target_sp && line != 0) {
750 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
760 sb_bp = target_sp->CreateBreakpoint(
774 TargetSP target_sp(GetSP());
775 if (target_sp.get()) {
776 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
785 sb_bp = target_sp->CreateBreakpoint(
789 sb_bp = target_sp->CreateBreakpoint(
829 TargetSP target_sp(GetSP());
830 if (target_sp && symbol_name && symbol_name[0]) {
834 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
836 sb_bp = target_sp->CreateBreakpoint(module_list.get(), comp_unit_list.get(),
875 TargetSP target_sp(GetSP());
876 if (target_sp && num_names > 0) {
877 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
882 sb_bp = target_sp->CreateBreakpoint(
920 TargetSP target_sp(GetSP());
921 if (target_sp && symbol_name_regex && symbol_name_regex[0]) {
922 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
928 sb_bp = target_sp->CreateFuncRegexBreakpoint(
940 TargetSP target_sp(GetSP());
941 if (target_sp) {
942 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
944 sb_bp = target_sp->CreateBreakpoint(address, false, hardware);
954 TargetSP target_sp(GetSP());
959 if (target_sp) {
960 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
962 sb_bp = target_sp->CreateBreakpoint(sb_address.ref(), false, hardware);
1006 TargetSP target_sp(GetSP());
1007 if (target_sp && source_regex && source_regex[0]) {
1008 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1017 sb_bp = target_sp->CreateSourceRegexBreakpoint(
1031 TargetSP target_sp(GetSP());
1032 if (target_sp) {
1033 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1035 sb_bp = target_sp->CreateExceptionBreakpoint(language, catch_bp, throw_bp,
1050 TargetSP target_sp(GetSP());
1051 if (target_sp) {
1052 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1057 target_sp->CreateScriptedBreakpoint(class_name,
1072 TargetSP target_sp(GetSP());
1073 if (target_sp) {
1075 return target_sp->GetBreakpointList().GetSize();
1084 TargetSP target_sp(GetSP());
1085 if (target_sp) {
1087 sb_breakpoint = target_sp->GetBreakpointList().GetBreakpointAtIndex(idx);
1096 TargetSP target_sp(GetSP());
1097 if (target_sp) {
1098 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1099 result = target_sp->RemoveBreakpointByID(bp_id);
1109 TargetSP target_sp(GetSP());
1110 if (target_sp && bp_id != LLDB_INVALID_BREAK_ID) {
1111 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1112 sb_breakpoint = target_sp->GetBreakpointByID(bp_id);
1122 TargetSP target_sp(GetSP());
1123 if (target_sp) {
1124 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1126 target_sp->GetBreakpointList().FindBreakpointsByName(name);
1144 TargetSP target_sp(GetSP());
1145 if (target_sp) {
1146 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1149 target_sp->GetBreakpointNames(name_vec);
1158 TargetSP target_sp(GetSP());
1159 if (target_sp) {
1160 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1161 target_sp->DeleteBreakpointName(ConstString(name));
1168 TargetSP target_sp(GetSP());
1169 if (target_sp) {
1170 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1171 target_sp->EnableAllowedBreakpoints();
1180 TargetSP target_sp(GetSP());
1181 if (target_sp) {
1182 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1183 target_sp->DisableAllowedBreakpoints();
1192 TargetSP target_sp(GetSP());
1193 if (target_sp) {
1194 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1195 target_sp->RemoveAllowedBreakpoints();
1215 TargetSP target_sp(GetSP());
1216 if (!target_sp) {
1221 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1230 sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(),
1247 TargetSP target_sp(GetSP());
1248 if (!target_sp) {
1262 TargetSP target_sp(GetSP());
1263 if (!target_sp) {
1268 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1271 sberr.ref() = target_sp->SerializeBreakpointsToFile(dest_file.ref(),
1279 TargetSP target_sp(GetSP());
1280 if (target_sp) {
1282 return target_sp->GetWatchpointList().GetSize();
1291 TargetSP target_sp(GetSP());
1292 if (target_sp) {
1294 sb_watchpoint.SetSP(target_sp->GetWatchpointList().GetByIndex(idx));
1303 TargetSP target_sp(GetSP());
1304 if (target_sp) {
1305 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1307 target_sp->GetWatchpointList().GetListMutex(lock);
1308 result = target_sp->RemoveWatchpointByID(wp_id);
1319 TargetSP target_sp(GetSP());
1320 if (target_sp && wp_id != LLDB_INVALID_WATCH_ID) {
1321 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1323 target_sp->GetWatchpointList().GetListMutex(lock);
1324 watchpoint_sp = target_sp->GetWatchpointList().FindByID(wp_id);
1350 TargetSP target_sp(GetSP());
1363 if (target_sp && addr != LLDB_INVALID_ADDRESS && size > 0) {
1364 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1370 target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error);
1381 TargetSP target_sp(GetSP());
1382 if (target_sp) {
1383 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1385 target_sp->GetWatchpointList().GetListMutex(lock);
1386 target_sp->EnableAllWatchpoints();
1395 TargetSP target_sp(GetSP());
1396 if (target_sp) {
1397 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1399 target_sp->GetWatchpointList().GetListMutex(lock);
1400 target_sp->DisableAllWatchpoints();
1461 TargetSP target_sp(GetSP());
1462 if (target_sp) {
1463 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
1465 target_sp->GetWatchpointList().GetListMutex(lock);
1466 target_sp->RemoveAllWatchpoints();
1476 TargetSP target_sp(GetSP());
1477 if (!target_sp)
1486 target_sp->GetImageSearchPathList().Append(srFrom, srTo, true);
1500 TargetSP target_sp(GetSP());
1501 if (!target_sp)
1513 Platform::GetAugmentedArchSpec(target_sp->GetPlatform().get(), triple);
1515 module_spec.GetArchitecture() = target_sp->GetArchitecture();
1529 TargetSP target_sp(GetSP());
1530 if (target_sp) {
1531 sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up,
1540 sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up,
1548 if (sb_module.IsValid() && !target_sp->GetArchitecture().IsValid() &&
1550 target_sp->SetArchitecture(sb_module.GetSP()->GetArchitecture());
1557 TargetSP target_sp(GetSP());
1558 if (target_sp) {
1559 target_sp->GetImages().AppendIfNeeded(module.GetSP());
1569 TargetSP target_sp(GetSP());
1570 if (target_sp) {
1572 num = target_sp->GetImages().GetSize();
1588 TargetSP target_sp(GetSP());
1589 if (target_sp && sb_file_spec.IsValid()) {
1592 sb_module.SetSP(target_sp->GetImages().FindFirstModule(module_spec));
1601 const TargetSP target_sp(GetSP());
1602 if (target_sp && sb_file_spec.IsValid())
1603 target_sp->GetImages().FindCompileUnits(*sb_file_spec, *sb_sc_list);
1610 TargetSP target_sp(GetSP());
1611 if (target_sp)
1612 return target_sp->GetArchitecture().GetByteOrder();
1619 TargetSP target_sp(GetSP());
1620 if (!target_sp)
1623 std::string triple(target_sp->GetArchitecture().GetTriple().str());
1634 TargetSP target_sp(GetSP());
1635 if (!target_sp)
1638 std::string abi_name(target_sp->GetABIName().str());
1646 TargetSP target_sp(GetSP());
1647 if (!target_sp)
1650 return ConstString(target_sp->GetLabel().data()).AsCString();
1656 TargetSP target_sp(GetSP());
1657 if (!target_sp)
1660 return Status(target_sp->SetLabel(label));
1666 TargetSP target_sp(GetSP());
1667 if (target_sp) {
1668 return target_sp->GetArchitecture().GetDataByteSize();
1676 TargetSP target_sp(GetSP());
1677 if (target_sp) {
1678 return target_sp->GetArchitecture().GetCodeByteSize();
1686 TargetSP target_sp(GetSP());
1687 if(target_sp){
1688 return target_sp->GetMaximumNumberOfChildrenToDisplay();
1696 TargetSP target_sp(GetSP());
1697 if (target_sp)
1698 return target_sp->GetArchitecture().GetAddressByteSize();
1707 TargetSP target_sp(GetSP());
1708 if (target_sp) {
1710 module_sp = target_sp->GetImages().GetModuleAtIndex(idx);
1720 TargetSP target_sp(GetSP());
1721 if (target_sp)
1722 return target_sp->GetImages().Remove(module.GetSP());
1729 TargetSP target_sp(GetSP());
1730 SBBroadcaster broadcaster(target_sp.get(), false);
1741 TargetSP target_sp(GetSP());
1742 if (target_sp) {
1743 target_sp->Dump(&strm, description_level);
1758 TargetSP target_sp(GetSP());
1759 if (!target_sp)
1767 target_sp->GetImages().FindFunctions(ConstString(name), mask,
1780 TargetSP target_sp(GetSP());
1781 if (target_sp) {
1789 target_sp->GetImages().FindFunctions(RegularExpression(name_ref),
1793 target_sp->GetImages().FindFunctions(
1799 target_sp->GetImages().FindFunctions(RegularExpression(regexstr),
1803 target_sp->GetImages().FindFunctions(ConstString(name),
1816 TargetSP target_sp(GetSP());
1817 if (typename_cstr && typename_cstr[0] && target_sp) {
1822 target_sp->GetImages().FindTypes(/*search_first=*/nullptr, query, results);
1827 if (auto process_sp = target_sp->GetProcessSP()) {
1838 for (auto type_system_sp : target_sp->GetScratchTypeSystems())
1849 TargetSP target_sp(GetSP());
1850 if (target_sp) {
1851 for (auto type_system_sp : target_sp->GetScratchTypeSystems())
1862 TargetSP target_sp(GetSP());
1863 if (typename_cstr && typename_cstr[0] && target_sp) {
1864 ModuleList &images = target_sp->GetImages();
1873 if (auto process_sp = target_sp->GetProcessSP()) {
1886 for (auto type_system_sp : target_sp->GetScratchTypeSystems())
1901 TargetSP target_sp(GetSP());
1902 if (name && target_sp) {
1904 target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches,
1907 ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
1909 exe_scope = target_sp.get();
1929 TargetSP target_sp(GetSP());
1930 if (name && target_sp) {
1937 target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches,
1941 target_sp->GetImages().FindGlobalVariables(RegularExpression(name_ref),
1945 target_sp->GetImages().FindGlobalVariables(
1951 target_sp->GetImages().FindGlobalVariables(RegularExpression(regexstr),
1956 ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
1958 exe_scope = target_sp.get();
2001 TargetSP target_sp(GetSP());
2002 if (target_sp) {
2007 target_sp->GetArchitecture().GetMaximumOpcodeByteSize() * count, 0);
2012 target_sp->ReadMemory(*addr_ptr, data.GetBytes(), data.GetByteSize(),
2016 target_sp->GetArchitecture(), nullptr, flavor_string, *addr_ptr,
2031 TargetSP target_sp(GetSP());
2032 if (target_sp) {
2041 target_sp->GetArchitecture(), nullptr, flavor_string, *target_sp,
2064 TargetSP target_sp(GetSP());
2065 if (target_sp) {
2074 target_sp->GetArchitecture(), nullptr, flavor_string, addr, buf, size,
2105 TargetSP target_sp(GetSP());
2106 if (target_sp) {
2116 ProcessSP process_sp(target_sp->GetProcessSP());
2117 if (target_sp->SetSectionLoadAddress(section_sp, section_base_addr)) {
2122 target_sp->ModulesDidLoad(module_list);
2142 TargetSP target_sp(GetSP());
2143 if (target_sp) {
2149 ProcessSP process_sp(target_sp->GetProcessSP());
2150 if (target_sp->SetSectionUnloaded(section_sp)) {
2155 target_sp->ModulesDidUnload(module_list, false);
2189 TargetSP target_sp(GetSP());
2190 if (target_sp) {
2194 if (module_sp->SetLoadAddress(*target_sp, slide_offset, true, changed)) {
2200 target_sp->ModulesDidLoad(module_list);
2202 ProcessSP process_sp(target_sp->GetProcessSP());
2223 TargetSP target_sp(GetSP());
2224 if (target_sp) {
2231 ProcessSP process_sp(target_sp->GetProcessSP());
2238 changed |= target_sp->SetSectionUnloaded(section_sp);
2243 target_sp->ModulesDidUnload(module_list, false);
2245 ProcessSP process_sp(target_sp->GetProcessSP());
2274 TargetSP target_sp(GetSP());
2275 if (target_sp)
2276 target_sp->GetImages().FindSymbolsWithNameAndType(
2285 TargetSP target_sp(GetSP());
2286 if (!target_sp)
2291 target_sp->GetPreferDynamicValue();
2304 TargetSP target_sp(GetSP());
2306 if (target_sp) {
2311 std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
2347 TargetSP target_sp(GetSP());
2348 if (target_sp) {
2350 ProcessSP process_sp(target_sp->GetProcessSP());
2354 abi_sp = ABI::FindPlugin(ProcessSP(), target_sp->GetArchitecture());
2364 TargetSP target_sp(GetSP());
2365 if (!target_sp)
2372 return module_sp->IsLoadedInTarget(target_sp.get());
2379 TargetSP target_sp(GetSP());
2380 if (target_sp)
2388 TargetSP target_sp(GetSP());
2389 if (target_sp)
2395 TargetSP target_sp(GetSP());
2397 if (target_sp) {
2398 return SBEnvironment(target_sp->GetEnvironment());
2406 TargetSP target_sp(GetSP());
2408 if (target_sp)
2409 return SBTrace(target_sp->GetTrace());
2416 TargetSP target_sp(GetSP());
2419 if (target_sp) {
2420 if (llvm::Expected<lldb::TraceSP> trace_sp = target_sp->CreateTrace()) {