9#ifndef LLDB_INTERPRETER_SCRIPTEDINTERFACE_H
10#define LLDB_INTERPRETER_SCRIPTEDINTERFACE_H
18#include "llvm/Support/Compiler.h"
33 template <
typename Ret>
39 error.SetErrorString(llvm::Twine(caller_name + llvm::Twine(
" ERROR = ") +
40 llvm::Twine(error_msg))
45 template <
typename T = StructuredData::ObjectSP>
48 return ErrorWithMessage<bool>(caller,
49 llvm::Twine(
"Null StructuredData object (" +
50 llvm::Twine(
error.AsCString()) +
56 if (!obj->IsValid()) {
57 return ErrorWithMessage<bool>(
59 llvm::Twine(
"Invalid StructuredData object (" +
60 llvm::Twine(
error.AsCString()) + llvm::Twine(
")."))
66 return ErrorWithMessage<bool>(caller,
error.AsCString(),
error);
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
static Ret ErrorWithMessage(llvm::StringRef caller_name, llvm::StringRef error_msg, Status &error, LLDBLog log_caterogy=LLDBLog::Process)
virtual ~ScriptedInterface()=default
bool CheckStructuredDataObject(llvm::StringRef caller, T obj, Status &error)
ScriptedInterface()=default
virtual StructuredData::GenericSP CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj=nullptr)=0
StructuredData::GenericSP m_object_instance_sp
std::shared_ptr< Generic > GenericSP
std::shared_ptr< Dictionary > DictionarySP
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.