9#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H
10#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_INTERFACES_SCRIPTEDPYTHONINTERFACE_H
20#include "lldb/Host/Config.h"
29class ScriptInterpreterPythonImpl;
32 ScriptedPythonInterface(ScriptInterpreterPythonImpl &interpreter);
33 ~ScriptedPythonInterface()
override =
default;
35 enum class AbstractMethodCheckerCases {
39 eUnknownArgumentCount,
40 eInvalidArgumentCount,
44 struct AbstractMethodCheckerPayload {
46 struct InvalidArgumentCountPayload {
47 InvalidArgumentCountPayload(
size_t required,
size_t actual)
48 : required_argument_count(required), actual_argument_count(actual) {}
50 size_t required_argument_count;
51 size_t actual_argument_count;
54 AbstractMethodCheckerCases checker_case;
55 std::variant<std::monostate, InvalidArgumentCountPayload> payload;
58 llvm::Expected<FileSpec> GetScriptedModulePath()
override {
59 using namespace python;
60 using Locker = ScriptInterpreterPythonImpl::Locker;
62 Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
65 if (!m_object_instance_sp)
66 return llvm::createStringError(
"scripted Interface has invalid object");
69 PythonObject(PyRefType::Borrowed,
70 static_cast<PyObject *
>(m_object_instance_sp->GetValue()));
72 if (!py_obj.IsAllocated())
73 return llvm::createStringError(
74 "scripted Interface has invalid python object");
76 PythonObject py_obj_class = py_obj.GetAttributeValue(
"__class__");
77 if (!py_obj_class.IsValid())
78 return llvm::createStringError(
79 "scripted Interface python object is missing '__class__' attribute");
81 PythonObject py_obj_module = py_obj_class.GetAttributeValue(
"__module__");
82 if (!py_obj_module.IsValid())
83 return llvm::createStringError(
84 "scripted Interface python object '__class__' is missing "
85 "'__module__' attribute");
87 PythonString py_obj_module_str = py_obj_module.Str();
88 if (!py_obj_module_str.IsValid())
89 return llvm::createStringError(
90 "scripted Interface python object '__class__.__module__' attribute "
93 llvm::StringRef py_obj_module_str_ref = py_obj_module_str.GetString();
94 PythonModule py_module = PythonModule::AddModule(py_obj_module_str_ref);
95 if (!py_module.IsValid())
96 return llvm::createStringError(
"failed to import '%s' module",
97 py_obj_module_str_ref.data());
99 PythonObject py_module_file = py_module.GetAttributeValue(
"__file__");
100 if (!py_module_file.IsValid())
101 return llvm::createStringError(
102 "module '%s' is missing '__file__' attribute",
103 py_obj_module_str_ref.data());
105 PythonString py_module_file_str = py_module_file.Str();
106 if (!py_module_file_str.IsValid())
107 return llvm::createStringError(
108 "module '%s.__file__' attribute is not a string",
109 py_obj_module_str_ref.data());
111 return FileSpec(py_module_file_str.GetString());
114 llvm::Expected<std::map<llvm::StringLiteral, AbstractMethodCheckerPayload>>
115 CheckAbstractMethodImplementation(
116 const python::PythonDictionary &class_dict)
const {
118 using namespace python;
120 std::map<llvm::StringLiteral, AbstractMethodCheckerPayload> checker;
121#define SET_CASE_AND_CONTINUE(method_name, case) \
123 checker[method_name] = {case, {}}; \
127 for (
const AbstractMethodRequirement &requirement :
128 GetAbstractMethodRequirements()) {
129 llvm::StringLiteral method_name = requirement.name;
130 if (!class_dict.HasKey(method_name))
131 SET_CASE_AND_CONTINUE(method_name,
132 AbstractMethodCheckerCases::eNotImplemented)
133 llvm::Expected<PythonObject> callable_or_err =
134 class_dict.GetItem(method_name);
135 if (!callable_or_err) {
136 llvm::consumeError(callable_or_err.takeError());
137 SET_CASE_AND_CONTINUE(method_name,
138 AbstractMethodCheckerCases::eNotAllocated)
141 PythonCallable callable = callable_or_err->AsType<PythonCallable>();
143 SET_CASE_AND_CONTINUE(method_name,
144 AbstractMethodCheckerCases::eNotCallable)
146 if (!requirement.min_arg_count)
147 SET_CASE_AND_CONTINUE(method_name, AbstractMethodCheckerCases::eValid)
149 auto arg_info_or_err = callable.GetArgInfo();
150 if (!arg_info_or_err) {
151 llvm::consumeError(arg_info_or_err.takeError());
152 SET_CASE_AND_CONTINUE(method_name,
153 AbstractMethodCheckerCases::eUnknownArgumentCount)
156 PythonCallable::ArgInfo arg_info = *arg_info_or_err;
157 if (requirement.min_arg_count <= arg_info.max_positional_args) {
158 SET_CASE_AND_CONTINUE(method_name, AbstractMethodCheckerCases::eValid)
160 checker[method_name] = {
161 AbstractMethodCheckerCases::eInvalidArgumentCount,
162 AbstractMethodCheckerPayload::InvalidArgumentCountPayload(
163 requirement.min_arg_count, arg_info.max_positional_args)};
167#undef SET_CASE_AND_CONTINUE
172 template <
typename... Args>
173 llvm::Expected<StructuredData::GenericSP>
174 CreatePluginObject(llvm::StringRef class_name,
175 StructuredData::Generic *script_obj, Args... args) {
176 using namespace python;
177 using Locker = ScriptInterpreterPythonImpl::Locker;
179 Log *log =
GetLog(LLDBLog::Script);
180 auto create_error = [](llvm::StringLiteral format,
auto &&...ts) {
181 return llvm::createStringError(
182 llvm::formatv(format.data(), std::forward<
decltype(ts)>(ts)...)
186 bool has_class_name = !class_name.empty();
187 bool has_interpreter_dict =
188 !(llvm::StringRef(m_interpreter.GetDictionaryName()).empty());
189 if (!has_class_name && !has_interpreter_dict && !script_obj) {
191 return create_error(
"Missing script class name.");
192 else if (!has_interpreter_dict)
193 return create_error(
"Invalid script interpreter dictionary.");
195 return create_error(
"Missing scripting object.");
198 Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
201 PythonObject result = {};
204 result = PythonObject(PyRefType::Borrowed,
205 static_cast<PyObject *
>(script_obj->GetValue()));
208 PythonModule::MainModule().ResolveName<python::PythonDictionary>(
209 m_interpreter.GetDictionaryName());
210 if (!dict.IsAllocated())
211 return create_error(
"Could not find interpreter dictionary: {0}",
212 m_interpreter.GetDictionaryName());
215 PythonObject::ResolveNameWithDictionary<python::PythonCallable>(
217 if (!init.IsAllocated())
218 return create_error(
"Could not find script class: {0}",
221 std::tuple<Args...> original_args = std::forward_as_tuple(args...);
222 auto transformed_args = TransformArgs(original_args);
224 std::string error_string;
225 llvm::Expected<PythonCallable::ArgInfo> arg_info = init.GetArgInfo();
227 llvm::handleAllErrors(
228 arg_info.takeError(),
229 [&](PythonException &E) { error_string.append(E.ReadBacktrace()); },
230 [&](
const llvm::ErrorInfoBase &E) {
231 error_string.append(E.message());
233 return llvm::createStringError(llvm::inconvertibleErrorCode(),
237 llvm::Expected<PythonObject> expected_return_object =
238 create_error(
"Resulting object is not initialized.");
252 size_t num_args =
sizeof...(Args);
253 if (arg_info->max_positional_args != PythonCallable::ArgInfo::UNBOUNDED &&
254 num_args != arg_info->max_positional_args) {
255 if (num_args != arg_info->max_positional_args - 1)
256 return create_error(
"Passed arguments ({0}) doesn't match the number "
257 "of expected arguments ({1}).",
258 num_args, arg_info->max_positional_args);
261 [&init, &expected_return_object](
auto &&...args) {
262 llvm::consumeError(expected_return_object.takeError());
263 expected_return_object = init(args...);
265 std::tuple_cat(transformed_args, std::make_tuple(dict)));
268 [&init, &expected_return_object](
auto &&...args) {
269 llvm::consumeError(expected_return_object.takeError());
270 expected_return_object = init(args...);
275 if (!expected_return_object)
276 return expected_return_object.takeError();
277 result = expected_return_object.get();
280 if (!result.IsValid())
281 return create_error(
"Resulting object is not a valid Python Object.");
282 if (!result.HasAttribute(
"__class__"))
283 return create_error(
"Resulting object doesn't have '__class__' member.");
285 PythonObject obj_class = result.GetAttributeValue(
"__class__");
286 if (!obj_class.IsValid())
287 return create_error(
"Resulting class object is not a valid.");
288 if (!obj_class.HasAttribute(
"__name__"))
290 "Resulting object class doesn't have '__name__' member.");
291 PythonString obj_class_name =
292 obj_class.GetAttributeValue(
"__name__").AsType<PythonString>();
294 PythonObject object_class_mapping_proxy =
295 obj_class.GetAttributeValue(
"__dict__");
296 if (!obj_class.HasAttribute(
"__dict__"))
298 "Resulting object class doesn't have '__dict__' member.");
300 PythonCallable dict_converter = PythonModule::BuiltinsModule()
302 .AsType<PythonCallable>();
303 if (!dict_converter.IsAllocated())
305 "Python 'builtins' module doesn't have 'dict' class.");
307 PythonDictionary object_class_dict =
308 dict_converter(object_class_mapping_proxy).AsType<PythonDictionary>();
309 if (!object_class_dict.IsAllocated())
310 return create_error(
"Coudn't create dictionary from resulting object "
311 "class mapping proxy object.");
313 auto checker_or_err = CheckAbstractMethodImplementation(object_class_dict);
315 return checker_or_err.takeError();
317 llvm::Error abstract_method_errors = llvm::Error::success();
318 for (
const auto &method_checker : *checker_or_err)
319 switch (method_checker.second.checker_case) {
320 case AbstractMethodCheckerCases::eNotImplemented:
321 abstract_method_errors = llvm::joinErrors(
322 std::move(abstract_method_errors),
323 std::move(create_error(
"Abstract method {0}.{1} not implemented.",
324 obj_class_name.GetString(),
325 method_checker.first)));
327 case AbstractMethodCheckerCases::eNotAllocated:
328 abstract_method_errors = llvm::joinErrors(
329 std::move(abstract_method_errors),
330 std::move(create_error(
"Abstract method {0}.{1} not allocated.",
331 obj_class_name.GetString(),
332 method_checker.first)));
334 case AbstractMethodCheckerCases::eNotCallable:
335 abstract_method_errors = llvm::joinErrors(
336 std::move(abstract_method_errors),
337 std::move(create_error(
"Abstract method {0}.{1} not callable.",
338 obj_class_name.GetString(),
339 method_checker.first)));
341 case AbstractMethodCheckerCases::eUnknownArgumentCount:
342 abstract_method_errors = llvm::joinErrors(
343 std::move(abstract_method_errors),
344 std::move(create_error(
345 "Abstract method {0}.{1} has unknown argument count.",
346 obj_class_name.GetString(), method_checker.first)));
348 case AbstractMethodCheckerCases::eInvalidArgumentCount: {
349 auto &payload_variant = method_checker.second.payload;
350 if (!std::holds_alternative<
351 AbstractMethodCheckerPayload::InvalidArgumentCountPayload>(
353 abstract_method_errors = llvm::joinErrors(
354 std::move(abstract_method_errors),
355 std::move(create_error(
356 "Abstract method {0}.{1} has unexpected argument count.",
357 obj_class_name.GetString(), method_checker.first)));
359 auto payload = std::get<
360 AbstractMethodCheckerPayload::InvalidArgumentCountPayload>(
362 abstract_method_errors = llvm::joinErrors(
363 std::move(abstract_method_errors),
365 create_error(
"Abstract method {0}.{1} has unexpected "
366 "argument count (expected {2} but has {3}).",
367 obj_class_name.GetString(), method_checker.first,
368 payload.required_argument_count,
369 payload.actual_argument_count)));
372 case AbstractMethodCheckerCases::eValid:
373 LLDB_LOG(log,
"Abstract method {0}.{1} implemented & valid.",
374 obj_class_name.GetString(), method_checker.first);
378 if (abstract_method_errors) {
379 Status error = Status::FromError(std::move(abstract_method_errors));
380 LLDB_LOG(log,
"Abstract method error in {0}:\n{1}", class_name,
382 return error.ToError();
385 m_object_instance_sp = StructuredData::GenericSP(
386 new StructuredPythonObject(std::move(result)));
387 return m_object_instance_sp;
403 template <
typename T = StructuredData::ObjectSP,
typename... Args>
404 T CallStaticMethod(llvm::StringRef class_name, llvm::StringRef method_name,
405 Status &
error, Args &&...args) {
406 using namespace python;
407 using Locker = ScriptInterpreterPythonImpl::Locker;
409 std::string caller_signature =
410 llvm::Twine(LLVM_PRETTY_FUNCTION + llvm::Twine(
" (") +
411 llvm::Twine(class_name) + llvm::Twine(
".") +
412 llvm::Twine(method_name) + llvm::Twine(
")"))
415 if (class_name.empty())
416 return ErrorWithMessage<T>(caller_signature,
"missing script class name",
419 Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
424 PythonModule::MainModule().ResolveName<python::PythonDictionary>(
425 m_interpreter.GetDictionaryName());
426 if (!dict.IsAllocated())
427 return ErrorWithMessage<T>(
429 llvm::formatv(
"could not find interpreter dictionary: {0}",
430 m_interpreter.GetDictionaryName())
436 PythonObject::ResolveNameWithDictionary<python::PythonCallable>(
438 if (!class_obj.IsAllocated())
439 return ErrorWithMessage<T>(
441 llvm::formatv(
"could not find script class: {0}", class_name).str(),
445 if (!class_obj.HasAttribute(method_name))
446 return ErrorWithMessage<T>(
448 llvm::formatv(
"class {0} does not have method {1}", class_name,
453 PythonCallable method =
454 class_obj.GetAttributeValue(method_name).AsType<PythonCallable>();
455 if (!method.IsAllocated())
456 return ErrorWithMessage<T>(caller_signature,
457 llvm::formatv(
"method {0}.{1} is not callable",
458 class_name, method_name)
463 std::tuple<Args...> original_args = std::forward_as_tuple(args...);
464 auto transformed_args = TransformArgs(original_args);
467 llvm::Expected<PythonObject> expected_return_object =
468 llvm::make_error<llvm::StringError>(
"Not initialized.",
469 llvm::inconvertibleErrorCode());
471 [&method, &expected_return_object](
auto &&...args) {
472 llvm::consumeError(expected_return_object.takeError());
473 expected_return_object = method(args...);
477 if (llvm::Error e = expected_return_object.takeError()) {
478 error = Status::FromError(std::move(e));
479 return ErrorWithMessage<T>(
480 caller_signature,
"python static method could not be called",
error);
483 PythonObject py_return = std::move(expected_return_object.get());
486 if (
sizeof...(Args) > 0)
487 if (!ReassignPtrsOrRefsArgs(original_args, transformed_args))
488 return ErrorWithMessage<T>(
490 "couldn't re-assign reference and pointer arguments",
error);
493 return ExtractValueFromPythonObject<T>(py_return,
error);
497 template <
typename T = StructuredData::ObjectSP>
498 T ExtractValueFromPythonObject(python::PythonObject &p, Status &
error) {
499 return p.CreateStructuredObject();
502 template <
typename T = StructuredData::ObjectSP,
typename... Args>
503 T Dispatch(llvm::StringRef method_name, Status &
error, Args &&...args) {
504 using namespace python;
505 using Locker = ScriptInterpreterPythonImpl::Locker;
507 std::string caller_signature =
508 llvm::Twine(LLVM_PRETTY_FUNCTION + llvm::Twine(
" (") +
509 llvm::Twine(method_name) + llvm::Twine(
")"))
511 if (!m_object_instance_sp)
512 return ErrorWithMessage<T>(caller_signature,
"python object ill-formed",
515 Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
518 PythonObject implementor(PyRefType::Borrowed,
519 (PyObject *)m_object_instance_sp->GetValue());
521 if (!implementor.IsAllocated())
522 return llvm::is_contained(GetAbstractMethods(), method_name)
523 ? ErrorWithMessage<T>(caller_signature,
524 "python implementor not allocated",
528 std::tuple<Args...> original_args = std::forward_as_tuple(args...);
529 auto transformed_args = TransformArgs(original_args);
531 llvm::Expected<PythonObject> expected_return_object =
532 llvm::make_error<llvm::StringError>(
"Not initialized.",
533 llvm::inconvertibleErrorCode());
535 [&implementor, &method_name, &expected_return_object](
auto &&...args) {
536 llvm::consumeError(expected_return_object.takeError());
537 expected_return_object =
538 implementor.CallMethod(method_name.data(), args...);
542 if (llvm::Error e = expected_return_object.takeError()) {
543 error = Status::FromError(std::move(e));
544 return ErrorWithMessage<T>(caller_signature,
545 "python method could not be called",
error);
548 PythonObject py_return = std::move(expected_return_object.get());
554 if (
sizeof...(Args) > 0)
555 if (!ReassignPtrsOrRefsArgs(original_args, transformed_args))
556 return ErrorWithMessage<T>(
558 "couldn't re-assign reference and pointer arguments",
error);
560 if (!py_return.IsAllocated())
562 return ExtractValueFromPythonObject<T>(py_return,
error);
565 template <
typename... Args>
566 Status GetStatusFromMethod(llvm::StringRef method_name, Args &&...args) {
568 Dispatch<Status>(method_name,
error, std::forward<Args>(args)...);
573 template <
typename T> T Transform(T
object) {
578 python::PythonObject Transform(
bool arg) {
580 return python::PythonBoolean(arg);
583 python::PythonObject Transform(
const Status &arg) {
584 return python::SWIGBridge::ToSWIGWrapper(arg.Clone());
587 python::PythonObject Transform(Status &&arg) {
588 return python::SWIGBridge::ToSWIGWrapper(std::move(arg));
591 python::PythonObject Transform(
const StructuredDataImpl &arg) {
592 return python::SWIGBridge::ToSWIGWrapper(arg);
596 return python::SWIGBridge::ToSWIGWrapper(arg);
600 return python::SWIGBridge::ToSWIGWrapper(arg);
604 return python::SWIGBridge::ToSWIGWrapper(arg);
608 return python::SWIGBridge::ToSWIGWrapper(arg);
612 return python::SWIGBridge::ToSWIGWrapper(arg);
616 return python::SWIGBridge::ToSWIGWrapper(arg);
620 return python::SWIGBridge::ToSWIGWrapper(arg);
624 return python::SWIGBridge::ToSWIGWrapper(arg);
628 return python::SWIGBridge::ToSWIGWrapper(arg);
632 return python::SWIGBridge::ToSWIGWrapper(arg);
635 python::PythonObject Transform(Event *arg) {
636 return python::SWIGBridge::ToSWIGWrapper(arg);
639 python::PythonObject Transform(
const SymbolContext &arg) {
640 return python::SWIGBridge::ToSWIGWrapper(arg);
644 return python::SWIGBridge::ToSWIGWrapper(arg.get());
648 return python::SWIGBridge::ToSWIGWrapper(arg);
652 return python::SWIGBridge::ToSWIGWrapper(arg);
656 return python::SWIGBridge::ToSWIGWrapper(arg);
659 template <
typename T,
typename U>
660 void ReverseTransform(T &original_arg, U transformed_arg, Status &
error) {
664 template <
typename T>
665 void ReverseTransform(T &original_arg, python::PythonObject transformed_arg,
667 original_arg = ExtractValueFromPythonObject<T>(transformed_arg,
error);
670 void ReverseTransform(
bool &original_arg,
671 python::PythonObject transformed_arg, Status &
error) {
672 python::PythonBoolean boolean_arg = python::PythonBoolean(
673 python::PyRefType::Borrowed, transformed_arg.get());
674 if (boolean_arg.IsValid())
675 original_arg = boolean_arg.GetValue();
677 error = Status::FromErrorStringWithFormatv(
678 "{}: Invalid boolean argument.", LLVM_PRETTY_FUNCTION);
681 template <std::size_t... I,
typename... Args>
682 auto TransformTuple(
const std::tuple<Args...> &args,
683 std::index_sequence<I...>) {
684 return std::make_tuple(Transform(std::get<I>(args))...);
689 template <
typename... Args>
690 auto TransformArgs(
const std::tuple<Args...> &args) {
691 return TransformTuple(args, std::make_index_sequence<
sizeof...(Args)>());
694 template <
typename T,
typename U>
695 void TransformBack(T &original_arg, U transformed_arg, Status &
error) {
696 ReverseTransform(original_arg, transformed_arg,
error);
699 template <std::size_t... I,
typename... Ts,
typename... Us>
700 bool ReassignPtrsOrRefsArgs(std::tuple<Ts...> &original_args,
701 std::tuple<Us...> &transformed_args,
702 std::index_sequence<I...>) {
704 (TransformBack(std::get<I>(original_args), std::get<I>(transformed_args),
707 return error.Success();
710 template <
typename... Ts,
typename... Us>
711 bool ReassignPtrsOrRefsArgs(std::tuple<Ts...> &original_args,
712 std::tuple<Us...> &transformed_args) {
713 if (
sizeof...(Ts) !=
sizeof...(Us))
716 return ReassignPtrsOrRefsArgs(original_args, transformed_args,
717 std::make_index_sequence<
sizeof...(Ts)>());
720 template <
typename T,
typename... Args>
721 void FormatArgs(std::string &fmt, T arg, Args... args)
const {
722 FormatArgs(fmt, arg);
723 FormatArgs(fmt, args...);
726 template <
typename T>
void FormatArgs(std::string &fmt, T arg)
const {
727 fmt += python::PythonFormat<T>::format;
730 void FormatArgs(std::string &fmt)
const {}
733 ScriptInterpreterPythonImpl &m_interpreter;
738ScriptedPythonInterface::ExtractValueFromPythonObject<StructuredData::ArraySP>(
743ScriptedPythonInterface::ExtractValueFromPythonObject<
747Status ScriptedPythonInterface::ExtractValueFromPythonObject<Status>(
751Event *ScriptedPythonInterface::ExtractValueFromPythonObject<Event *>(
756ScriptedPythonInterface::ExtractValueFromPythonObject<SymbolContext>(
761ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::StreamSP>(
766ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::ThreadSP>(
771ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::StackFrameSP>(
776ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::BreakpointSP>(
781ScriptedPythonInterface::ExtractValueFromPythonObject<
794ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::DataExtractorSP>(
798std::optional<MemoryRegionInfo>
799ScriptedPythonInterface::ExtractValueFromPythonObject<
800 std::optional<MemoryRegionInfo>>(python::PythonObject &p,
Status &
error);
804ScriptedPythonInterface::ExtractValueFromPythonObject<
809ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::DescriptionLevel>(
814ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::StackFrameListSP>(
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
std::shared_ptr< Dictionary > DictionarySP
std::shared_ptr< Array > ArraySP
Defines a symbol context baton that can be handed other debug core functions.
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.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
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::ProcessAttachInfo > ProcessAttachInfoSP
std::shared_ptr< lldb_private::Stream > StreamSP
std::shared_ptr< lldb_private::Breakpoint > BreakpointSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Target > TargetSP
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