================ @@ -0,0 +1,52 @@ +//===-- ScriptedFrameProvider.h --------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_INTERPRETER_SCRIPTEDFRAMEPROVIDER_H +#define LLDB_INTERPRETER_SCRIPTEDFRAMEPROVIDER_H + +#include "lldb/Utility/ScriptedMetadata.h" +#include "lldb/Utility/Status.h" +#include "lldb/lldb-forward.h" +#include "llvm/Support/Error.h" + +namespace lldb_private { + +class ScriptedFrameProvider { +public: + /// Constructor that initializes the scripted frame provider. + /// + /// \param[in] thread_sp + /// The thread for which to provide scripted frames. + /// + /// \param[in] scripted_metadata + /// The metadata containing the class name and arguments for the + /// scripted frame provider. + /// + /// \param[out] error + /// Status object to report any errors during initialization. + ScriptedFrameProvider(lldb::ThreadSP thread_sp, + const ScriptedMetadata &scripted_metadata, + Status &error); + ~ScriptedFrameProvider(); + + /// Get the stack frames from the scripted frame provider. + /// + /// \return + /// An Expected containing the StackFrameListSP if successful, + /// otherwise an error describing what went wrong. + llvm::Expected<lldb::StackFrameListSP> + GetStackFrames(lldb::StackFrameListSP real_frames); ---------------- JDevlieghere wrote:
Assuming this gets called lazily from the StackFrameList: 1. I would expect this to take the `provided_frames` as an in/out parameter. 2. I would expect an argument with a number of how many frames to provide. The number of frames should be larger than the size of the already provided frames. https://github.com/llvm/llvm-project/pull/161870 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
