mib updated this revision to Diff 380560.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112045/new/
https://reviews.llvm.org/D112045
Files:
lldb/source/API/SBLaunchInfo.cpp
Index: lldb/source/API/SBLaunchInfo.cpp
===================================================================
--- lldb/source/API/SBLaunchInfo.cpp
+++ lldb/source/API/SBLaunchInfo.cpp
@@ -387,9 +387,14 @@
if (error.Fail())
return;
- StructuredData::DictionarySP dict_sp;
- llvm::json::OStream s(stream.ref().AsRawOstream());
- dict_sp->Serialize(s);
+ StructuredData::ObjectSP obj_sp =
+ StructuredData::ParseJSON(std::string(stream.GetData()));
+ if (!obj_sp)
+ return;
+
+ StructuredData::DictionarySP dict_sp(obj_sp->GetAsDictionary());
+ if (!dict_sp)
+ return;
m_opaque_sp->SetScriptedProcessDictionarySP(dict_sp);
}
Index: lldb/source/API/SBLaunchInfo.cpp
===================================================================
--- lldb/source/API/SBLaunchInfo.cpp
+++ lldb/source/API/SBLaunchInfo.cpp
@@ -387,9 +387,14 @@
if (error.Fail())
return;
- StructuredData::DictionarySP dict_sp;
- llvm::json::OStream s(stream.ref().AsRawOstream());
- dict_sp->Serialize(s);
+ StructuredData::ObjectSP obj_sp =
+ StructuredData::ParseJSON(std::string(stream.GetData()));
+ if (!obj_sp)
+ return;
+
+ StructuredData::DictionarySP dict_sp(obj_sp->GetAsDictionary());
+ if (!dict_sp)
+ return;
m_opaque_sp->SetScriptedProcessDictionarySP(dict_sp);
}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits