9#include "lldb/Host/Config.h"
64 "Couldn't cast lldb::SBEvent to lldb_private::Event.");
75 return m_interpreter.GetOpaqueTypeFromSBStream(*sb_stream);
77 "Couldn't cast lldb::SBStream to lldb_private::Stream.");
88 return m_interpreter.GetOpaqueTypeFromSBFrame(*sb_frame);
90 "Couldn't cast lldb::SBFrame to lldb_private::StackFrame.");
101 return m_interpreter.GetOpaqueTypeFromSBThread(*sb_thread);
103 "Couldn't cast lldb::SBThread to lldb_private::Thread.");
115 return m_interpreter.GetOpaqueTypeFromSBSymbolContext(*sb_symbol_context);
117 "Couldn't cast lldb::SBSymbolContext to lldb_private::SymbolContext.");
131 "Couldn't cast lldb::SBData to lldb::DataExtractorSP.");
135 return m_interpreter.GetDataExtractorFromSBData(*sb_data);
145 if (!sb_breakpoint) {
147 "Couldn't cast lldb::SBBreakpoint to lldb::BreakpointSP.");
151 return m_interpreter.GetOpaqueTypeFromSBBreakpoint(*sb_breakpoint);
164 "Couldn't cast lldb::SBBreakpointLocation to "
165 "lldb::BreakpointLocationSP.");
169 return m_interpreter.GetOpaqueTypeFromSBBreakpointLocation(*sb_break_loc);
178 if (!sb_attach_info) {
180 "Couldn't cast lldb::SBAttachInfo to lldb::ProcessAttachInfoSP.");
184 return m_interpreter.GetOpaqueTypeFromSBAttachInfo(*sb_attach_info);
193 if (!sb_launch_info) {
195 "Couldn't cast lldb::SBLaunchInfo to lldb::ProcessLaunchInfoSP.");
199 return m_interpreter.GetOpaqueTypeFromSBLaunchInfo(*sb_launch_info);
203std::optional<MemoryRegionInfo>
211 if (!sb_mem_reg_info) {
213 "Couldn't cast lldb::SBMemoryRegionInfo to "
214 "lldb_private::MemoryRegionInfo.");
218 return m_interpreter.GetOpaqueTypeFromSBMemoryRegionInfo(*sb_mem_reg_info);
232 "Couldn't cast lldb::SBExecutionContext to "
233 "lldb::ExecutionContextRefSP.");
237 return m_interpreter.GetOpaqueTypeFromSBExecutionContext(*sb_exe_ctx);
246 if (!unsigned_or_err) {
250 unsigned long long unsigned_val = *unsigned_or_err;
252 error =
Status(
"value too large for lldb::DescriptionLevel.");
266 if (!sb_frame_list) {
268 "couldn't cast lldb::SBFrameList to lldb::StackFrameListSP.");
272 return m_interpreter.GetOpaqueTypeFromSBFrameList(*sb_frame_list);
283 "couldn't cast lldb::SBValue to lldb::ValueObjectSP");
287 return m_interpreter.GetOpaqueTypeFromSBValue(*sb_value);
297 if (!sb_value_list) {
299 "couldn't cast lldb::SBValueList to lldb::ValueObjectListSP");
304 for (uint32_t i = 0, e = sb_value_list->
GetSize(); i < e; ++i) {
306 out->Append(m_interpreter.GetOpaqueTypeFromSBValue(value));
static llvm::raw_ostream & error(Stream &strm)
lldb::SBValue GetValueAtIndex(uint32_t index)
Represents a list of SBFrame objects.
ScriptedInterface()=default
ScriptInterpreterPythonImpl & m_interpreter
T ExtractValueFromPythonObject(python::PythonObject &p, Status &error)
ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter)
static Status FromErrorStringWithFormat(const char *format,...) __attribute__((format(printf
static Status FromErrorString(const char *str)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Array > ArraySP
Defines a symbol context baton that can be handed other debug core functions.
StructuredData::DictionarySP CreateStructuredDictionary() const
StructuredData::ArraySP CreateStructuredArray() const
llvm::Expected< unsigned long long > AsUnsignedLongLong() const
void * LLDBSWIGPython_CastPyObjectToSBExecutionContext(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBFrameList(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBThread(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBData(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBSymbolContext(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBStream(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBMemoryRegionInfo(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBBreakpointLocation(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBError(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBAttachInfo(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBLaunchInfo(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBValueList(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBValue(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBEvent(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBBreakpoint(PyObject *data)
void * LLDBSWIGPython_CastPyObjectToSBFrame(PyObject *data)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::BreakpointLocation > BreakpointLocationSP
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Thread > ThreadSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ProcessAttachInfo > ProcessAttachInfoSP
std::shared_ptr< lldb_private::Stream > StreamSP
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::ValueObjectList > ValueObjectListSP
class LLDB_API SBMemoryRegionInfo
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::ProcessLaunchInfo > ProcessLaunchInfoSP
std::shared_ptr< lldb_private::StackFrameList > StackFrameListSP
std::shared_ptr< lldb_private::ExecutionContextRef > ExecutionContextRefSP