Skip to content

Commit add63b8

Browse files
committed
[rebranch][lldb] Regenerate static bindings
1 parent 42553a1 commit add63b8

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

lldb/bindings/python/static-binding/LLDBWrapPython.cpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80631,16 +80631,10 @@ LLDBSwigPythonCreateScriptedProcess
8063180631

8063280632
PythonObject result = {};
8063380633
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) {
8064080634
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);
8064280636
} 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)");
8064480638
Py_RETURN_NONE;
8064580639
}
8064680640

@@ -80654,7 +80648,8 @@ LLDBSwigPythonCreateScriptedThread
8065480648
(
8065580649
const char *python_class_name,
8065680650
const char *session_dictionary_name,
80657-
const lldb::TargetSP& target_sp,
80651+
const lldb::ProcessSP& process_sp,
80652+
lldb_private::StructuredDataImpl *args_impl,
8065880653
std::string &error_string
8065980654
)
8066080655
{
@@ -80672,12 +80667,12 @@ LLDBSwigPythonCreateScriptedThread
8067280667
return nullptr;
8067380668
}
8067480669

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
8067680671
// because python has ownership of it and will manage memory for this
8067780672
// 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)));
8067980674

80680-
if (!target_arg.IsAllocated())
80675+
if (!process_arg.IsAllocated())
8068180676
Py_RETURN_NONE;
8068280677

8068380678
llvm::Expected<PythonCallable::ArgInfo> arg_info = pfunc.GetArgInfo();
@@ -80694,10 +80689,11 @@ LLDBSwigPythonCreateScriptedThread
8069480689
}
8069580690

8069680691
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);
8069980695
} 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)");
8070180697
Py_RETURN_NONE;
8070280698
}
8070380699

0 commit comments

Comments
 (0)