@@ -80631,16 +80631,10 @@ LLDBSwigPythonCreateScriptedProcess
80631
80631
80632
80632
PythonObject result = {};
80633
80633
if (arg_info.get().max_positional_args == 2) {
80634
- if (args_impl != nullptr) {
80635
- error_string.assign("args passed, but __init__ does not take an args dictionary");
80636
- Py_RETURN_NONE;
80637
- }
80638
- result = pfunc(target_arg, dict);
80639
- } else if (arg_info.get().max_positional_args >= 3) {
80640
80634
PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(new lldb::SBStructuredData(args_impl)));
80641
- result = pfunc(target_arg, args_arg, dict );
80635
+ result = pfunc(target_arg, args_arg);
80642
80636
} else {
80643
- error_string.assign("wrong number of arguments in __init__, should be 2 or 3 (not including self)");
80637
+ error_string.assign("wrong number of arguments in __init__, should be 2 (not including self)");
80644
80638
Py_RETURN_NONE;
80645
80639
}
80646
80640
@@ -80654,7 +80648,8 @@ LLDBSwigPythonCreateScriptedThread
80654
80648
(
80655
80649
const char *python_class_name,
80656
80650
const char *session_dictionary_name,
80657
- const lldb::TargetSP& target_sp,
80651
+ const lldb::ProcessSP& process_sp,
80652
+ lldb_private::StructuredDataImpl *args_impl,
80658
80653
std::string &error_string
80659
80654
)
80660
80655
{
@@ -80672,12 +80667,12 @@ LLDBSwigPythonCreateScriptedThread
80672
80667
return nullptr;
80673
80668
}
80674
80669
80675
- // I do not want the SBTarget to be deallocated when going out of scope
80670
+ // I do not want the SBProcess to be deallocated when going out of scope
80676
80671
// because python has ownership of it and will manage memory for this
80677
80672
// object by itself
80678
- PythonObject target_arg (PyRefType::Owned, SBTypeToSWIGWrapper(new lldb::SBTarget(target_sp )));
80673
+ PythonObject process_arg (PyRefType::Owned, SBTypeToSWIGWrapper(new lldb::SBProcess(process_sp )));
80679
80674
80680
- if (!target_arg .IsAllocated())
80675
+ if (!process_arg .IsAllocated())
80681
80676
Py_RETURN_NONE;
80682
80677
80683
80678
llvm::Expected<PythonCallable::ArgInfo> arg_info = pfunc.GetArgInfo();
@@ -80694,10 +80689,11 @@ LLDBSwigPythonCreateScriptedThread
80694
80689
}
80695
80690
80696
80691
PythonObject result = {};
80697
- if (arg_info.get().max_positional_args == 1) {
80698
- result = pfunc(target_arg);
80692
+ if (arg_info.get().max_positional_args == 2) {
80693
+ PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(new lldb::SBStructuredData(args_impl)));
80694
+ result = pfunc(process_arg, args_arg);
80699
80695
} else {
80700
- error_string.assign("wrong number of arguments in __init__, should be 2 or 3 (not including self)");
80696
+ error_string.assign("wrong number of arguments in __init__, should be 2 (not including self)");
80701
80697
Py_RETURN_NONE;
80702
80698
}
80703
80699
0 commit comments