diff options
Diffstat (limited to 'lldb/source/Target/RemoteAwarePlatform.cpp')
| -rw-r--r-- | lldb/source/Target/RemoteAwarePlatform.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lldb/source/Target/RemoteAwarePlatform.cpp b/lldb/source/Target/RemoteAwarePlatform.cpp index eb39fc6db304..b92d4d5fcaa7 100644 --- a/lldb/source/Target/RemoteAwarePlatform.cpp +++ b/lldb/source/Target/RemoteAwarePlatform.cpp @@ -131,9 +131,9 @@ Status RemoteAwarePlatform::ResolveExecutable( // architectures that we should be using (in the correct order) and see // if we can find a match that way StreamString arch_names; - for (uint32_t idx = 0; GetSupportedArchitectureAtIndex( - idx, resolved_module_spec.GetArchitecture()); - ++idx) { + llvm::ListSeparator LS; + for (const ArchSpec &arch : GetSupportedArchitectures()) { + resolved_module_spec.GetArchitecture() = arch; error = ModuleList::GetSharedModule(resolved_module_spec, exe_module_sp, module_search_paths_ptr, nullptr, nullptr); // Did we find an executable using one of the @@ -144,10 +144,7 @@ Status RemoteAwarePlatform::ResolveExecutable( error.SetErrorToGenericError(); } - if (idx > 0) - arch_names.PutCString(", "); - arch_names.PutCString( - resolved_module_spec.GetArchitecture().GetArchitectureName()); + arch_names << LS << arch.GetArchitectureName(); } if (error.Fail() || !exe_module_sp) { |
