#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/Pipe.h"
#include "lldb/Host/PseudoTerminal.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StringList.h"
#if defined(_WIN32)
#include "lldb/Host/windows/ConnectionGenericFileWindows.h"
#endif
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <optional>
#include <string>
usingnamespacelldb;
usingnamespacelldb_private;
ScriptInterpreter::ScriptInterpreter(Debugger &debugger,
lldb::ScriptLanguage script_lang)
: … { … }
void ScriptInterpreter::CollectDataForBreakpointCommandCallback(
std::vector<std::reference_wrapper<BreakpointOptions>> &bp_options_vec,
CommandReturnObject &result) { … }
void ScriptInterpreter::CollectDataForWatchpointCommandCallback(
WatchpointOptions *bp_options, CommandReturnObject &result) { … }
StructuredData::DictionarySP ScriptInterpreter::GetInterpreterInfo() { … }
bool ScriptInterpreter::LoadScriptingModule(const char *filename,
const LoadScriptOptions &options,
lldb_private::Status &error,
StructuredData::ObjectSP *module_sp,
FileSpec extra_search_dir) { … }
std::string ScriptInterpreter::LanguageToString(lldb::ScriptLanguage language) { … }
lldb::DataExtractorSP
ScriptInterpreter::GetDataExtractorFromSBData(const lldb::SBData &data) const { … }
lldb::BreakpointSP ScriptInterpreter::GetOpaqueTypeFromSBBreakpoint(
const lldb::SBBreakpoint &breakpoint) const { … }
lldb::ProcessAttachInfoSP ScriptInterpreter::GetOpaqueTypeFromSBAttachInfo(
const lldb::SBAttachInfo &attach_info) const { … }
lldb::ProcessLaunchInfoSP ScriptInterpreter::GetOpaqueTypeFromSBLaunchInfo(
const lldb::SBLaunchInfo &launch_info) const { … }
Status
ScriptInterpreter::GetStatusFromSBError(const lldb::SBError &error) const { … }
Event *
ScriptInterpreter::GetOpaqueTypeFromSBEvent(const lldb::SBEvent &event) const { … }
lldb::StreamSP ScriptInterpreter::GetOpaqueTypeFromSBStream(
const lldb::SBStream &stream) const { … }
std::optional<MemoryRegionInfo>
ScriptInterpreter::GetOpaqueTypeFromSBMemoryRegionInfo(
const lldb::SBMemoryRegionInfo &mem_region) const { … }
lldb::ScriptLanguage
ScriptInterpreter::StringToLanguage(const llvm::StringRef &language) { … }
Status ScriptInterpreter::SetBreakpointCommandCallback(
std::vector<std::reference_wrapper<BreakpointOptions>> &bp_options_vec,
const char *callback_text) { … }
Status ScriptInterpreter::SetBreakpointCommandCallbackFunction(
std::vector<std::reference_wrapper<BreakpointOptions>> &bp_options_vec,
const char *function_name, StructuredData::ObjectSP extra_args_sp) { … }
std::unique_ptr<ScriptInterpreterLocker>
ScriptInterpreter::AcquireInterpreterLock() { … }
static void ReadThreadBytesReceived(void *baton, const void *src,
size_t src_len) { … }
llvm::Expected<std::unique_ptr<ScriptInterpreterIORedirect>>
ScriptInterpreterIORedirect::Create(bool enable_io, Debugger &debugger,
CommandReturnObject *result) { … }
ScriptInterpreterIORedirect::ScriptInterpreterIORedirect(
std::unique_ptr<File> input, std::unique_ptr<File> output)
: … { … }
ScriptInterpreterIORedirect::ScriptInterpreterIORedirect(
Debugger &debugger, CommandReturnObject *result)
: … { … }
void ScriptInterpreterIORedirect::Flush() { … }
ScriptInterpreterIORedirect::~ScriptInterpreterIORedirect() { … }