aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Target/RemoteAwarePlatform.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-12-02 21:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-12-02 21:02:54 +0000
commitf65dcba83ce5035ab88a85fe17628b447eb56e1b (patch)
tree35f37bb72b3cfc6060193e66c76ee7c9478969b0 /lldb/source/Target/RemoteAwarePlatform.cpp
parent846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb (diff)
Diffstat (limited to 'lldb/source/Target/RemoteAwarePlatform.cpp')
-rw-r--r--lldb/source/Target/RemoteAwarePlatform.cpp11
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) {