LLDB mainline
ScriptedFrameProviderInterface.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
10#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
11
12#include "lldb/lldb-private.h"
13
14#include "ScriptedInterface.h"
15
16namespace lldb_private {
18public:
19 virtual bool AppliesToThread(llvm::StringRef class_name,
20 lldb::ThreadSP thread_sp) {
21 return true;
22 }
23
24 virtual llvm::Expected<StructuredData::GenericSP>
25 CreatePluginObject(llvm::StringRef class_name,
26 lldb::StackFrameListSP input_frames,
28
29 /// Get a description string for the frame provider.
30 ///
31 /// This is called by the descriptor to fetch a description from the
32 /// scripted implementation. Implementations should call a static method
33 /// on the scripting class to retrieve the description.
34 ///
35 /// \param class_name The name of the scripting class implementing the
36 /// provider.
37 ///
38 /// \return A string describing what this frame provider does, or an
39 /// empty string if no description is available.
40 virtual std::string GetDescription(llvm::StringRef class_name) { return {}; }
41
42 virtual StructuredData::ObjectSP GetFrameAtIndex(uint32_t index) {
43 return {};
44 }
45};
46} // namespace lldb_private
47
48#endif // LLDB_INTERPRETER_INTERFACES_SCRIPTEDFRAMEPROVIDERINTERFACE_H
virtual llvm::Expected< StructuredData::GenericSP > CreatePluginObject(llvm::StringRef class_name, lldb::StackFrameListSP input_frames, StructuredData::DictionarySP args_sp)=0
virtual StructuredData::ObjectSP GetFrameAtIndex(uint32_t index)
virtual std::string GetDescription(llvm::StringRef class_name)
Get a description string for the frame provider.
virtual bool AppliesToThread(llvm::StringRef class_name, lldb::ThreadSP thread_sp)
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::StackFrameList > StackFrameListSP