@@ -959,13 +959,20 @@ class TaskGroupSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
959
959
public:
960
960
TaskGroupSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp)
961
961
: SyntheticChildrenFrontEnd(*valobj_sp.get()) {
962
+ bool is_64bit = false ;
963
+ if (auto target_sp = m_backend.GetTargetSP ())
964
+ is_64bit = target_sp->GetArchitecture ().GetTriple ().isArch64Bit ();
965
+
966
+ std::optional<uint32_t > concurrency_version;
962
967
if (auto process_sp = m_backend.GetProcessSP ())
963
- m_concurrency_version =
968
+ concurrency_version =
964
969
SwiftLanguageRuntime::FindConcurrencyDebugVersion (*process_sp);
970
+
971
+ m_is_supported_target = is_64bit && concurrency_version.value_or (0 ) == 1 ;
965
972
}
966
973
967
974
llvm::Expected<uint32_t > CalculateNumChildren () override {
968
- if (m_concurrency_version. value_or ( 0 ) != 1 )
975
+ if (!m_is_supported_target )
969
976
return m_backend.GetNumChildren ();
970
977
971
978
return m_task_addrs.size ();
@@ -974,7 +981,7 @@ class TaskGroupSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
974
981
bool MightHaveChildren () override { return true ; }
975
982
976
983
lldb::ValueObjectSP GetChildAtIndex (uint32_t idx) override {
977
- if (m_concurrency_version. value_or ( 0 ) != 1 )
984
+ if (!m_is_supported_target )
978
985
return m_backend.GetChildAtIndex (idx);
979
986
980
987
if (!m_task_type || idx >= m_task_addrs.size ())
@@ -996,7 +1003,7 @@ class TaskGroupSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
996
1003
}
997
1004
998
1005
size_t GetIndexOfChildWithName (ConstString name) override {
999
- if (m_concurrency_version. value_or ( 0 ) != 1 )
1006
+ if (!m_is_supported_target )
1000
1007
return m_backend.GetIndexOfChildWithName (name);
1001
1008
1002
1009
StringRef buf = name.GetStringRef ();
@@ -1007,7 +1014,7 @@ class TaskGroupSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
1007
1014
}
1008
1015
1009
1016
lldb::ChildCacheState Update () override {
1010
- if (m_concurrency_version. value_or ( 0 ) != 1 )
1017
+ if (!m_is_supported_target )
1011
1018
return ChildCacheState::eReuse;
1012
1019
1013
1020
m_task_addrs.clear ();
@@ -1121,7 +1128,7 @@ class TaskGroupSyntheticFrontEnd : public SyntheticChildrenFrontEnd {
1121
1128
};
1122
1129
1123
1130
private:
1124
- std::optional< uint32_t > m_concurrency_version ;
1131
+ bool m_is_supported_target = false ;
1125
1132
// Type for Swift.UnsafeCurrentTask.
1126
1133
CompilerType m_task_type;
1127
1134
// The TaskGroup's list of child task addresses.
0 commit comments