================
@@ -19,50 +33,64 @@ void ScriptedFrame::CheckInterpreterAndScriptObject() const
{
}
llvm::Expected<std::shared_ptr<ScriptedFrame>>
-ScriptedFrame::Create(ScriptedThread &thread,
+ScriptedFrame::Create(ThreadSP thread_sp,
+ ScriptedThreadInterfaceSP scripted_thread_interface_sp,
StructuredData::DictionarySP args_sp,
StructuredData::Generic *script_object) {
- if (!thread.IsValid())
- return llvm::createStringError("Invalid scripted thread.");
+ if (!thread_sp || !thread_sp->IsValid())
+ return llvm::createStringError("Invalid thread.");
- thread.CheckInterpreterAndScriptObject();
+ ProcessSP process_sp = thread_sp->GetProcess();
+ if (!process_sp || !process_sp->IsValid())
+ return llvm::createStringError("Invalid process.");
- auto scripted_frame_interface =
- thread.GetInterface()->CreateScriptedFrameInterface();
+ ScriptInterpreter *script_interp =
+ process_sp->GetTarget().GetDebugger().GetScriptInterpreter();
+ if (!script_interp)
+ return llvm::createStringError("No script interpreter.");
+
+ auto scripted_frame_interface =
script_interp->CreateScriptedFrameInterface();
if (!scripted_frame_interface)
- return llvm::createStringError("failed to create scripted frame
interface");
+ return llvm::createStringError("Failed to create scripted frame
interface");
----------------
JDevlieghere wrote:
?
```suggestion
return llvm::createStringError("failed to create scripted frame interface");
```
https://github.com/llvm/llvm-project/pull/161870
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits