9#ifndef LLDB_INTERPRETER_INTERFACES_SCRIPTEDINTERFACE_H
10#define LLDB_INTERPRETER_INTERFACES_SCRIPTEDINTERFACE_H
20#include "llvm/Support/Compiler.h"
39 virtual llvm::SmallVector<AbstractMethodRequirement>
43 return llvm::make_error<UnimplementedError>();
47 llvm::SmallVector<llvm::StringLiteral> abstract_methods;
50 return requirement.name;
52 return abstract_methods;
55 template <
typename Ret>
61 std::string full_error_message =
62 llvm::Twine(caller_name + llvm::Twine(
" ERROR = ") +
63 llvm::Twine(error_msg))
65 if (
const char *detailed_error =
error.AsCString())
67 llvm::Twine(llvm::Twine(
" (") + llvm::Twine(detailed_error) +
74 template <
typename T = StructuredData::ObjectSP>
81 if (!obj->IsValid()) {
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
static Ret ErrorWithMessage(llvm::StringRef caller_name, llvm::StringRef error_msg, Status &error, LLDBLog log_category=LLDBLog::Process)
virtual ~ScriptedInterface()=default
llvm::SmallVector< llvm::StringLiteral > const GetAbstractMethods() const
virtual llvm::SmallVector< AbstractMethodRequirement > GetAbstractMethodRequirements() const =0
static bool CheckStructuredDataObject(llvm::StringRef caller, T obj, Status &error)
virtual llvm::Expected< FileSpec > GetScriptedModulePath()
ScriptedInterface()=default
StructuredData::GenericSP GetScriptObjectInstance()
static bool CreateInstance(lldb::ScriptLanguage language, ScriptedInterfaceUsages usages)
StructuredData::GenericSP m_object_instance_sp
std::shared_ptr< Generic > GenericSP
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
ScriptLanguage
Script interpreter types.