================ @@ -299,6 +301,35 @@ SBPlatform::SBPlatform(const char *platform_name) { m_opaque_sp = Platform::Create(platform_name); } +SBPlatform::SBPlatform(const char *platform_name, const SBDebugger &debugger, + const char *script_name, const SBStructuredData &dict) + : SBPlatform(platform_name) { + LLDB_INSTRUMENT_VA(this, platform_name, debugger, script_name, dict); + + if (!m_opaque_sp) + return; + + if (!script_name || !dict.IsValid() || !dict.m_impl_up) + return; + + StructuredData::ObjectSP obj_sp = dict.m_impl_up->GetObjectSP(); + + if (!obj_sp) + return; + + StructuredData::DictionarySP dict_sp = + std::make_shared<StructuredData::Dictionary>(obj_sp); + if (!dict_sp || dict_sp->GetType() == lldb::eStructuredDataTypeInvalid) + return; + + const ScriptedMetadata scripted_metadata(script_name, dict_sp); + + auto metadata = ---------------- bulbazord wrote:
nit: name this one `platform_metadata` since you also have a variable called `scripted_metadata` above. `scripted_metadata` and `metadata` is a bit confusing to read IMO. https://github.com/llvm/llvm-project/pull/99814 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits