Lines Matching +defs:error +defs:target

75 static void DumpTargetInfo(uint32_t target_idx, Target *target,
78 const ArchSpec &target_arch = target->GetArchitecture();
80 Module *exe_module = target->GetExecutableModulePointer();
90 const std::string &label = target->GetLabel();
104 PlatformSP platform_sp(target->GetPlatform());
109 ProcessSP process_sp(target->GetProcessSP());
171 Status error;
176 return error;
185 error);
186 if (error.Success())
189 error.SetErrorStringWithFormat("unrecognized short option '%c'",
193 return error;
216 interpreter, "target create",
217 "Create a target using the argument as the main executable.",
221 "Fullpath to a core file to use for this target."),
223 "Optional name for this target.", nullptr),
282 LLDB_SCOPED_TIMERF("(lldb) target create '%s'", file_path);
290 Status error(debugger.GetTargetList().CreateTarget(
296 result.AppendError(error.AsCString());
313 // Only get the platform after we create the target because we might
383 result.AppendError("no platform found for target");
420 error = process_sp->LoadCore();
422 if (error.Fail()) {
423 result.AppendError(error.AsCString("unknown core file format"));
468 interpreter, "target list",
493 interpreter, "target select",
494 "Select a target as the current target by target index.", nullptr) {
517 "index %u is out of range, valid target indexes are 0 - %u\n",
549 "'target select' takes a single argument: a target index\n");
559 : CommandObjectParsed(interpreter, "target delete",
560 "Delete one or more targets by target index.",
567 "deleting the target. "
569 "loaded by the target as well "
572 "cause them to be reparsed again the next time the target is run",
605 result.AppendErrorWithFormat("invalid target index '%s'\n",
617 result.AppendErrorWithFormat("target index %u is out of range, valid "
618 "target indexes are 0 - %u\n",
622 "target index %u is out of range, the only valid index is 0\n",
630 result.AppendErrorWithFormat("no target is currently selected\n");
664 interpreter, "target show-launch-environment",
666 "taking info account 3 settings: target.env-vars, "
667 "target.inherit-env and target.unset-env-vars.",
674 Target *target = m_exe_ctx.GetTargetPtr();
675 Environment env = target->GetEnvironment();
702 : CommandObjectParsed(interpreter, "target variable",
703 "Read global variables for the current target, "
787 if (llvm::Error error = valobj_sp->Dump(s, options))
788 s << "error: " << toString(std::move(error));
794 Target *target = static_cast<Target *>(baton);
795 if (target)
796 target->GetImages().FindGlobalVariables(ConstString(name), UINT32_MAX,
833 Target *target = m_exe_ctx.GetTargetPtr();
848 "error: invalid regular expression: '%s'\n", arg.c_str());
852 target->GetImages().FindGlobalVariables(regex, UINT32_MAX,
856 Status error(Variable::GetValuesForVariableExpressionPath(
858 GetVariableCallback, target, variable_list, valobj_list));
923 result.AppendError("'target variable' takes one or more global "
935 target->GetImages().FindFirstModule(module_spec));
947 // Didn't find matching shlib/module in target...
949 "target doesn't contain the specified shared library: %s\n",
957 target->GetImages().FindCompileUnits(
998 : CommandObjectParsed(interpreter, "target modules search-paths add",
1000 "the current target.",
1030 Target *target = &GetSelectedTarget();
1043 "target modules search path adding ImageSearchPath "
1048 target->GetImageSearchPathList().Append(
1067 : CommandObjectParsed(interpreter, "target modules search-paths clear",
1069 "pairs from the current target.",
1070 "target modules search-paths clear",
1077 Target *target = &GetSelectedTarget();
1079 target->GetImageSearchPathList().Clear(notify);
1089 : CommandObjectParsed(interpreter, "target modules search-paths insert",
1091 "into the current target at the specified index.",
1136 Target *target = m_exe_ctx.GetTargetPtr();
1137 const PathMappingList &list = target->GetImageSearchPathList();
1151 Target *target = &GetSelectedTarget();
1174 target->GetImageSearchPathList().Insert(from, to, insert_idx,
1196 : CommandObjectParsed(interpreter, "target modules search-paths list",
1198 "pairs in the current target.",
1199 "target modules search-paths list",
1206 Target *target = &GetSelectedTarget();
1208 target->GetImageSearchPathList().Dump(&result.GetOutputStream());
1219 interpreter, "target modules search-paths query",
1229 Target *target = &GetSelectedTarget();
1237 if (target->GetImageSearchPathList().RemapPath(orig, transformed))
1444 llvm::StringRef error;
1445 if (dict->GetValueForKeyAsString("error", error))
1446 strm << "E " << error;
1479 llvm::StringRef error;
1480 if (dict->GetValueForKeyAsString("error", error))
1481 strm << "E " << error;
1525 Target *target = interpreter.GetExecutionContext().GetTargetPtr();
1526 if (target && !target->GetSectionLoadList().IsEmpty()) {
1527 if (!target->GetSectionLoadList().ResolveLoadAddress(addr, so_addr))
1668 static size_t LookupTypeInModule(Target *target,
1700 type_sp->GetDescription(&strm, eDescriptionLevelFull, true, target);
1710 target);
1721 static size_t LookupTypeHere(Target *target, CommandInterpreter &interpreter,
1744 type_sp->GetDescription(&strm, eDescriptionLevelFull, true, target);
1754 target);
1791 static size_t FindModulesByName(Target *target, const char *module_name,
1816 if (target) {
1817 target->GetImages().FindModules(module_spec, module_list);
1820 // Not found in our module list for our target, check the main shared
1823 module_spec.GetArchitecture() = target->GetArchitecture();
1893 interpreter, "target modules dump objfile",
1894 "Dump the object file headers from one or more target modules.",
1901 Target *target = &GetSelectedTarget();
1903 uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
1911 target->GetImages());
1913 result.AppendError("the target has no associated executable images");
1923 FindModulesByName(target, arg_cstr, module_list, true);
1950 interpreter, "target modules dump symtab",
1951 "Dump the symbol table from one or more target modules.", nullptr,
1966 Status error;
1978 eSortOrderNone, error);
1984 return error;
2002 Target *target = &GetSelectedTarget();
2008 uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
2014 const ModuleList &module_list = target->GetImages();
2036 result.AppendError("the target has no associated executable images");
2047 FindModulesByName(target, arg_cstr, module_list, true);
2091 interpreter, "target modules dump sections",
2092 "Dump the sections from one or more target modules.",
2093 //"target modules dump sections [<file1> ...]")
2100 Target *target = &GetSelectedTarget();
2103 uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
2109 const size_t num_modules = target->GetImages().GetSize();
2111 result.AppendError("the target has no associated executable images");
2126 target->GetImages().GetModulePointerAtIndex(image_idx));
2136 FindModulesByName(target, arg_cstr, module_list, true);
2174 interpreter, "target modules dump pcm-info",
2232 interpreter, "target modules dump ast",
2234 //"target modules dump ast [<file1> ...]")
2241 Target *target = &GetSelectedTarget();
2243 const ModuleList &module_list = target->GetImages();
2246 result.AppendError("the target has no associated executable images");
2268 FindModulesByName(target, arg.c_str(), module_list, true);
2303 interpreter, "target modules dump symfile",
2304 "Dump the debug symbol file for one or more target modules.",
2305 //"target modules dump symfile [<file1> ...]")
2312 Target *target = &GetSelectedTarget();
2315 uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
2321 const ModuleList &target_modules = target->GetImages();
2325 result.AppendError("the target has no associated executable images");
2347 FindModulesByName(target, arg_cstr, module_list, true);
2385 interpreter, "target modules dump line-table",
2395 Target *target = m_exe_ctx.GetTargetPtr();
2398 uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
2413 const ModuleList &target_modules = target->GetImages();
2486 interpreter, "target modules dump separate-debug-info",
2487 "List the separate debug info symbol files for one or more target "
2503 Status error;
2518 return error;
2536 Target &target = GetSelectedTarget();
2539 uint32_t addr_byte_size = target.GetArchitecture().GetAddressByteSize();
2546 const ModuleList &target_modules = target.GetImages();
2550 result.AppendError("the target has no associated executable images");
2574 FindModulesByName(&target, arg_cstr, module_list, true);
2655 // Dump multi-word command for target modules
2662 interpreter, "target modules dump",
2663 "Commands for dumping information about one or more target "
2665 "target modules dump "
2703 : CommandObjectParsed(interpreter, "target modules add",
2704 "Add a new module to the current target's modules.",
2705 "target modules add [<module>]",
2729 Target *target = &GetSelectedTarget();
2742 Status error;
2743 if (PluginManager::DownloadObjectAndSymbolFile(module_spec, error)) {
2745 target->GetOrCreateModule(module_spec, true /* notify */));
2779 result.SetError(error);
2802 module_spec.GetArchitecture() = target->GetArchitecture();
2803 Status error;
2804 ModuleSP module_sp(target->GetOrCreateModule(
2805 module_spec, true /* notify */, &error));
2807 const char *error_cstr = error.AsCString();
2834 ProcessSP process = target->GetProcessSP();
2846 interpreter, "target modules load",
2847 "Set the load addresses for one or more sections in a target "
2849 "target modules load [--file <module> --uuid <uuid>] <sect-name> "
2879 Target *target = &GetSelectedTarget();
2891 ModuleList &module_list = target->GetImages();
2906 target, arg_cstr, module_list, use_global_module_list);
2929 target->GetImages().FindModules(module_spec, matching_modules);
2946 module->SetLoadAddress(*target, slide, slide_is_offset,
2978 if (target->GetSectionLoadList()
3010 target->ModulesDidLoad(matching_modules);
3016 ProcessSP process = target->CalculateProcess();
3027 objfile->GetLoadableData(*target));
3032 Status error = process->WriteObjectFile(std::move(loadables));
3033 if (error.Fail()) {
3034 result.AppendError(error.AsCString());
3041 addr_t file_entry_addr = file_entry.GetLoadAddress(target);
3123 Status error;
3130 execution_context, option_arg, LLDB_INVALID_ADDRESS, &error);
3136 return error;
3158 interpreter, "target modules list",
3169 Target *target = GetDebugger().GetSelectedTarget().get();
3175 if (target == nullptr && !use_global_module_list) {
3176 result.AppendError("invalid target, create a debug target using the "
3177 "'target create' command");
3180 if (target) {
3182 target->GetArchitecture().GetAddressByteSize();
3190 if (target) {
3192 if (module_address.SetLoadAddress(m_options.m_module_addr, target)) {
3195 PrintModule(target, module_sp.get(), 0, strm);
3209 "Can only look up modules by address with a valid target.");
3230 module_list_ptr = &target->GetImages();
3236 target, arg.c_str(), module_list, use_global_module_list);
3270 PrintModule(target, module, indent, strm);
3279 result.AppendError("the target has no matching modules");
3285 "the target has no associated executable images");
3292 void PrintModule(Target *target, Module *module, int indent, Stream &strm) {
3341 target ? (target->GetArchitecture().GetAddressByteSize() * 2)
3348 if (target && !target->GetSectionLoadList().IsEmpty()) {
3349 lldb::addr_t load_addr = base_addr.GetLoadAddress(target);
3351 base_addr.Dump(&strm, target,
3370 base_addr.Dump(&strm, target, Address::DumpStyleFileAddress);
3469 Status error;
3478 LLDB_INVALID_ADDRESS, &error);
3480 error.SetErrorStringWithFormat("invalid address string '%s'",
3494 return error;
3517 interpreter, "target modules show-unwind",
3528 Target *target = m_exe_ctx.GetTargetPtr();
3559 target->GetImages().FindFunctions(function_name, eFunctionNameTypeAuto,
3561 } else if (m_options.m_type == eLookupTypeAddress && target) {
3563 if (target->GetSectionLoadList().ResolveLoadAddress(m_options.m_addr,
3599 addr_t start_addr = range.GetBaseAddress().GetLoadAddress(target);
3615 target->GetUserSpecifiedTrapHandlerNames(args);
3624 PlatformSP platform_sp(target->GetPlatform());
3640 func_unwinders_sp->GetUnwindPlanAtNonCallSite(*target, *thread);
3647 func_unwinders_sp->GetUnwindPlanAtCallSite(*target, *thread);
3654 func_unwinders_sp->GetUnwindPlanFastUnwind(*target, *thread);
3664 func_unwinders_sp->GetAssemblyUnwindPlan(*target, *thread);
3674 func_unwinders_sp->GetObjectFileUnwindPlan(*target);
3683 func_unwinders_sp->GetObjectFileAugmentedUnwindPlan(*target, *thread);
3692 func_unwinders_sp->GetEHFrameUnwindPlan(*target);
3701 func_unwinders_sp->GetEHFrameAugmentedUnwindPlan(*target, *thread);
3710 func_unwinders_sp->GetDebugFrameUnwindPlan(*target)) {
3718 func_unwinders_sp->GetDebugFrameAugmentedUnwindPlan(*target,
3727 func_unwinders_sp->GetArmUnwindUnwindPlan(*target);
3744 func_unwinders_sp->GetCompactUnwindUnwindPlan(*target);
3811 Status error;
3819 LLDB_INVALID_ADDRESS, &error);
3824 error.SetErrorStringWithFormat("invalid offset string '%s'",
3844 error.SetErrorStringWithFormat("invalid line number string '%s'",
3847 error.SetErrorString("zero is an invalid line number");
3885 return error;
3932 : CommandObjectParsed(interpreter, "target modules lookup",
4073 Target *target = &GetSelectedTarget();
4077 uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
4099 const ModuleList &target_modules = target->GetImages();
4102 result.AppendError("the target has no associated executable images");
4122 FindModulesByName(target, arg_cstr, module_list, false);
4157 interpreter, "target modules search-paths",
4158 "Commands for managing module search paths for a target.",
4159 "target modules search-paths <subcommand> [<subcommand-options>]") {
4189 : CommandObjectMultiword(interpreter, "target modules",
4191 "more target modules.",
4192 "target modules <sub-command> ...") {
4226 interpreter, "target symbols add",
4227 "Add a debug symbol file to one of the target's current modules by "
4230 "target symbols add <cmd-options> [<symfile>]",
4263 bool AddModuleSymbols(Target *target, ModuleSpec &module_spec, bool &flush,
4281 // in the current target. Let's find possible matches.
4288 // Now extract the module spec that matches the target architecture
4291 target_arch_module_spec.GetArchitecture() = target->GetArchitecture();
4295 // It has a UUID, look for this UUID in the target modules
4298 target->GetImages().FindModules(symfile_uuid_module_spec,
4305 // value that we can match up to an image in our target.
4312 // It has a UUID. Look for this UUID in the target modules.
4316 target->GetImages().FindModules(symfile_uuid_module_spec,
4327 target->GetImages().FindModules(module_spec, matching_modules);
4342 target->GetImages().FindModules(module_spec, matching_modules);
4357 // the existing target module the symfile path to use for when it
4376 target->SymbolsDidLoad(module_list);
4380 Status error;
4382 module_sp->LoadScriptingResourceInTarget(target, error,
4384 if (error.Fail() && error.AsCString())
4386 "unable to load scripting data for module %s - error "
4391 error.AsCString());
4421 Status error;
4422 if (PluginManager::DownloadObjectAndSymbolFile(module_spec, error)) {
4427 result.SetError(error);
4457 Target *target = m_exe_ctx.GetTargetPtr();
4458 ModuleSP module_sp(target->GetImages().FindFirstModule(module_spec));
4465 module_spec.GetArchitecture() = target->GetArchitecture();
4577 Target *target = m_exe_ctx.GetTargetPtr();
4613 PlatformSP platform_sp(target->GetPlatform());
4627 ->ResolveSymbolFile(*target, module_spec, symfile_spec)
4636 if (!AddModuleSymbols(target, module_spec, flush, result))
4679 interpreter, "target symbols",
4681 "target symbols <sub-command> ...") {
4716 Status error;
4728 error.SetErrorStringWithFormat("invalid end line number: \"%s\"",
4741 error.SetErrorStringWithFormat(
4747 error.SetErrorStringWithFormat("invalid start line number: \"%s\"",
4776 error.SetErrorStringWithFormat("invalid thread id string '%s'",
4793 error.SetErrorStringWithFormat("invalid thread index string '%s'",
4806 return error;
4854 : CommandObjectParsed(interpreter, "target stop-hook add",
4855 "Add a hook to be executed when the target stops."
4860 "target stop-hook add"),
4880 def __init__(self, target, extra_args, internal_dict):
4882 target: The target that the stop hook is being added to.
4935 error_sp->Printf("error: stop hook #%" PRIu64
4940 Target *target = GetDebugger().GetSelectedTarget().get();
4941 if (target) {
4942 target->UndoCreateStopHook(m_stop_hook_sp->GetID());
4965 Target &target = GetSelectedOrDummyTarget();
4967 target.CreateStopHook(m_python_class_options.GetName().empty() ?
5048 Status error = hook_ptr->SetScriptCallback(
5051 if (error.Success())
5057 error.AsCString());
5058 target.UndoCreateStopHook(new_hook_sp->GetID());
5084 : CommandObjectParsed(interpreter, "target stop-hook delete",
5086 "target stop-hook delete [<idx>]") {
5102 Target &target = GetSelectedOrDummyTarget();
5110 target.RemoveAllStopHooks();
5120 if (!target.RemoveStopHookByID(user_id)) {
5156 Target &target = GetSelectedOrDummyTarget();
5162 target.SetAllStopHooksActiveState(m_enable);
5171 success = target.SetStopHookActiveStateByID(user_id, m_enable);
5193 : CommandObjectParsed(interpreter, "target stop-hook list",
5194 "List all stop-hooks.", "target stop-hook list") {}
5200 Target &target = GetSelectedOrDummyTarget();
5202 size_t num_hooks = target.GetNumStopHooks();
5207 Target::StopHookSP this_hook = target.GetStopHookAtIndex(i);
5226 interpreter, "target stop-hook",
5227 "Commands for operating on debugger target stop-hooks.",
5228 "target stop-hook <subcommand> [<subcommand-options>]") {
5236 interpreter, false, "target stop-hook disable [<id>]",
5237 "Disable a stop-hook.", "target stop-hook disable")));
5240 interpreter, true, "target stop-hook enable [<id>]",
5241 "Enable a stop-hook.", "target stop-hook enable")));
5256 interpreter, "target dump typesystem",
5257 "Dump the state of the target's internal type system. Intended to "
5281 interpreter, "target dump section-load-list",
5282 "Dump the state of the target's internal section load list. "
5290 Target &target = GetSelectedTarget();
5291 target.GetSectionLoadList().Dump(result.GetOutputStream(), &target);
5298 /// Multi-word command for 'target dump'.
5304 interpreter, "target dump",
5305 "Commands for dumping information about the target.",
5306 "target dump [typesystem|section-load-list]") {
5324 : CommandObjectMultiword(interpreter, "target",
5326 "target <subcommand> [<subcommand-options>]") {