@@ -5652,7 +5652,7 @@ bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallParsedCommandObject(
5652
5652
auto pfunc = self.ResolveName<PythonCallable>("__call__");
5653
5653
5654
5654
if (!pfunc.IsAllocated()) {
5655
- cmd_retobj.AppendError("Could not find '__call__' method in implementation class");
5655
+ cmd_retobj.AppendError("Could not find '__call__' method in implementation class");
5656
5656
return false;
5657
5657
}
5658
5658
@@ -5911,6 +5911,26 @@ static void LLDBSwigPythonCallPythonLogOutputCallback(const char *str,
5911
5911
}
5912
5912
}
5913
5913
5914
+ // For CommandPrintCallback functions
5915
+ static CommandReturnObjectCallbackResult LLDBSwigPythonCallPythonCommandPrintCallback(SBCommandReturnObject& result, void *callback_baton) {
5916
+ SWIG_Python_Thread_Block swig_thread_block;
5917
+
5918
+ PyErr_Cleaner py_err_cleaner(true);
5919
+
5920
+ PythonObject result_arg = SWIGBridge::ToSWIGWrapper(
5921
+ std::make_unique<SBCommandReturnObject>(result));
5922
+ PythonCallable callable =
5923
+ Retain<PythonCallable>(reinterpret_cast<PyObject *>(callback_baton));
5924
+
5925
+ if (!callable.IsValid())
5926
+ return eCommandReturnObjectPrintCallbackSkipped;
5927
+
5928
+ PythonObject callback_result = callable(result_arg);
5929
+
5930
+ long long ret_val = unwrapOrSetPythonException(As<long long>(callback_result));
5931
+ return (CommandReturnObjectCallbackResult)ret_val;
5932
+ }
5933
+
5914
5934
// For DebuggerTerminateCallback functions
5915
5935
static void LLDBSwigPythonCallPythonSBDebuggerTerminateCallback(lldb::user_id_t debugger_id,
5916
5936
void *baton) {
@@ -17699,6 +17719,46 @@ SWIGINTERN PyObject *_wrap_SBCommandInterpreter_GetTranscript(PyObject *self, Py
17699
17719
}
17700
17720
17701
17721
17722
+ SWIGINTERN PyObject *_wrap_SBCommandInterpreter_SetPrintCallback(PyObject *self, PyObject *args) {
17723
+ PyObject *resultobj = 0;
17724
+ lldb::SBCommandInterpreter *arg1 = (lldb::SBCommandInterpreter *) 0 ;
17725
+ lldb::SBCommandPrintCallback arg2 = (lldb::SBCommandPrintCallback) 0 ;
17726
+ void *arg3 = (void *) 0 ;
17727
+ void *argp1 = 0 ;
17728
+ int res1 = 0 ;
17729
+ PyObject *swig_obj[2] ;
17730
+
17731
+ (void)self;
17732
+ if (!SWIG_Python_UnpackTuple(args, "SBCommandInterpreter_SetPrintCallback", 2, 2, swig_obj)) SWIG_fail;
17733
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBCommandInterpreter, 0 | 0 );
17734
+ if (!SWIG_IsOK(res1)) {
17735
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBCommandInterpreter_SetPrintCallback" "', argument " "1"" of type '" "lldb::SBCommandInterpreter *""'");
17736
+ }
17737
+ arg1 = reinterpret_cast< lldb::SBCommandInterpreter * >(argp1);
17738
+ {
17739
+ if (!(swig_obj[1] == Py_None ||
17740
+ PyCallable_Check(reinterpret_cast<PyObject *>(swig_obj[1])))) {
17741
+ PyErr_SetString(PyExc_TypeError, "Need a callable object or None!");
17742
+ SWIG_fail;
17743
+ }
17744
+
17745
+ // Don't lose the callback reference.
17746
+ Py_INCREF(swig_obj[1]);
17747
+ arg2 = LLDBSwigPythonCallPythonCommandPrintCallback;
17748
+ arg3 = swig_obj[1];
17749
+ }
17750
+ {
17751
+ SWIG_PYTHON_THREAD_BEGIN_ALLOW;
17752
+ (arg1)->SetPrintCallback(arg2,arg3);
17753
+ SWIG_PYTHON_THREAD_END_ALLOW;
17754
+ }
17755
+ resultobj = SWIG_Py_Void();
17756
+ return resultobj;
17757
+ fail:
17758
+ return NULL;
17759
+ }
17760
+
17761
+
17702
17762
SWIGINTERN PyObject *SBCommandInterpreter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17703
17763
PyObject *obj = NULL;
17704
17764
if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
@@ -18665,6 +18725,34 @@ SWIGINTERN PyObject *_wrap_SBCommandReturnObject_IsValid(PyObject *self, PyObjec
18665
18725
}
18666
18726
18667
18727
18728
+ SWIGINTERN PyObject *_wrap_SBCommandReturnObject_GetCommand(PyObject *self, PyObject *args) {
18729
+ PyObject *resultobj = 0;
18730
+ lldb::SBCommandReturnObject *arg1 = (lldb::SBCommandReturnObject *) 0 ;
18731
+ void *argp1 = 0 ;
18732
+ int res1 = 0 ;
18733
+ PyObject *swig_obj[1] ;
18734
+ char *result = 0 ;
18735
+
18736
+ (void)self;
18737
+ if (!args) SWIG_fail;
18738
+ swig_obj[0] = args;
18739
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBCommandReturnObject, 0 | 0 );
18740
+ if (!SWIG_IsOK(res1)) {
18741
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBCommandReturnObject_GetCommand" "', argument " "1"" of type '" "lldb::SBCommandReturnObject *""'");
18742
+ }
18743
+ arg1 = reinterpret_cast< lldb::SBCommandReturnObject * >(argp1);
18744
+ {
18745
+ SWIG_PYTHON_THREAD_BEGIN_ALLOW;
18746
+ result = (char *)(arg1)->GetCommand();
18747
+ SWIG_PYTHON_THREAD_END_ALLOW;
18748
+ }
18749
+ resultobj = SWIG_FromCharPtr((const char *)result);
18750
+ return resultobj;
18751
+ fail:
18752
+ return NULL;
18753
+ }
18754
+
18755
+
18668
18756
SWIGINTERN PyObject *_wrap_SBCommandReturnObject_GetOutput__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
18669
18757
PyObject *resultobj = 0;
18670
18758
lldb::SBCommandReturnObject *arg1 = (lldb::SBCommandReturnObject *) 0 ;
@@ -29195,6 +29283,33 @@ SWIGINTERN PyObject *_wrap_SBDebugger_GetSyntheticForType(PyObject *self, PyObje
29195
29283
}
29196
29284
29197
29285
29286
+ SWIGINTERN PyObject *_wrap_SBDebugger_ResetStatistics(PyObject *self, PyObject *args) {
29287
+ PyObject *resultobj = 0;
29288
+ lldb::SBDebugger *arg1 = (lldb::SBDebugger *) 0 ;
29289
+ void *argp1 = 0 ;
29290
+ int res1 = 0 ;
29291
+ PyObject *swig_obj[1] ;
29292
+
29293
+ (void)self;
29294
+ if (!args) SWIG_fail;
29295
+ swig_obj[0] = args;
29296
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBDebugger, 0 | 0 );
29297
+ if (!SWIG_IsOK(res1)) {
29298
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBDebugger_ResetStatistics" "', argument " "1"" of type '" "lldb::SBDebugger *""'");
29299
+ }
29300
+ arg1 = reinterpret_cast< lldb::SBDebugger * >(argp1);
29301
+ {
29302
+ SWIG_PYTHON_THREAD_BEGIN_ALLOW;
29303
+ (arg1)->ResetStatistics();
29304
+ SWIG_PYTHON_THREAD_END_ALLOW;
29305
+ }
29306
+ resultobj = SWIG_Py_Void();
29307
+ return resultobj;
29308
+ fail:
29309
+ return NULL;
29310
+ }
29311
+
29312
+
29198
29313
SWIGINTERN PyObject *_wrap_SBDebugger_RunCommandInterpreter(PyObject *self, PyObject *args) {
29199
29314
PyObject *resultobj = 0;
29200
29315
lldb::SBDebugger *arg1 = (lldb::SBDebugger *) 0 ;
@@ -65557,6 +65672,33 @@ SWIGINTERN PyObject *_wrap_SBTarget_GetStatistics(PyObject *self, PyObject *args
65557
65672
}
65558
65673
65559
65674
65675
+ SWIGINTERN PyObject *_wrap_SBTarget_ResetStatistics(PyObject *self, PyObject *args) {
65676
+ PyObject *resultobj = 0;
65677
+ lldb::SBTarget *arg1 = (lldb::SBTarget *) 0 ;
65678
+ void *argp1 = 0 ;
65679
+ int res1 = 0 ;
65680
+ PyObject *swig_obj[1] ;
65681
+
65682
+ (void)self;
65683
+ if (!args) SWIG_fail;
65684
+ swig_obj[0] = args;
65685
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBTarget, 0 | 0 );
65686
+ if (!SWIG_IsOK(res1)) {
65687
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBTarget_ResetStatistics" "', argument " "1"" of type '" "lldb::SBTarget *""'");
65688
+ }
65689
+ arg1 = reinterpret_cast< lldb::SBTarget * >(argp1);
65690
+ {
65691
+ SWIG_PYTHON_THREAD_BEGIN_ALLOW;
65692
+ (arg1)->ResetStatistics();
65693
+ SWIG_PYTHON_THREAD_END_ALLOW;
65694
+ }
65695
+ resultobj = SWIG_Py_Void();
65696
+ return resultobj;
65697
+ fail:
65698
+ return NULL;
65699
+ }
65700
+
65701
+
65560
65702
SWIGINTERN PyObject *_wrap_SBTarget_GetPlatform(PyObject *self, PyObject *args) {
65561
65703
PyObject *resultobj = 0;
65562
65704
lldb::SBTarget *arg1 = (lldb::SBTarget *) 0 ;
@@ -96323,6 +96465,7 @@ static PyMethodDef SwigMethods[] = {
96323
96465
{ "SBCommandInterpreter_ResolveCommand", _wrap_SBCommandInterpreter_ResolveCommand, METH_VARARGS, "SBCommandInterpreter_ResolveCommand(SBCommandInterpreter self, char const * command_line, SBCommandReturnObject result)"},
96324
96466
{ "SBCommandInterpreter_GetStatistics", _wrap_SBCommandInterpreter_GetStatistics, METH_O, "SBCommandInterpreter_GetStatistics(SBCommandInterpreter self) -> SBStructuredData"},
96325
96467
{ "SBCommandInterpreter_GetTranscript", _wrap_SBCommandInterpreter_GetTranscript, METH_O, "SBCommandInterpreter_GetTranscript(SBCommandInterpreter self) -> SBStructuredData"},
96468
+ { "SBCommandInterpreter_SetPrintCallback", _wrap_SBCommandInterpreter_SetPrintCallback, METH_VARARGS, "SBCommandInterpreter_SetPrintCallback(SBCommandInterpreter self, lldb::SBCommandPrintCallback callback)"},
96326
96469
{ "SBCommandInterpreter_swigregister", SBCommandInterpreter_swigregister, METH_O, NULL},
96327
96470
{ "SBCommandInterpreter_swiginit", SBCommandInterpreter_swiginit, METH_VARARGS, NULL},
96328
96471
{ "new_SBCommandInterpreterRunOptions", _wrap_new_SBCommandInterpreterRunOptions, METH_VARARGS, "\n"
@@ -96361,6 +96504,7 @@ static PyMethodDef SwigMethods[] = {
96361
96504
{ "delete_SBCommandReturnObject", _wrap_delete_SBCommandReturnObject, METH_O, "delete_SBCommandReturnObject(SBCommandReturnObject self)"},
96362
96505
{ "SBCommandReturnObject___nonzero__", _wrap_SBCommandReturnObject___nonzero__, METH_O, "SBCommandReturnObject___nonzero__(SBCommandReturnObject self) -> bool"},
96363
96506
{ "SBCommandReturnObject_IsValid", _wrap_SBCommandReturnObject_IsValid, METH_O, "SBCommandReturnObject_IsValid(SBCommandReturnObject self) -> bool"},
96507
+ { "SBCommandReturnObject_GetCommand", _wrap_SBCommandReturnObject_GetCommand, METH_O, "SBCommandReturnObject_GetCommand(SBCommandReturnObject self) -> char const *"},
96364
96508
{ "SBCommandReturnObject_GetErrorData", _wrap_SBCommandReturnObject_GetErrorData, METH_O, "SBCommandReturnObject_GetErrorData(SBCommandReturnObject self) -> SBStructuredData"},
96365
96509
{ "SBCommandReturnObject_PutOutput", _wrap_SBCommandReturnObject_PutOutput, METH_VARARGS, "\n"
96366
96510
"SBCommandReturnObject_PutOutput(SBCommandReturnObject self, SBFile file) -> size_t\n"
@@ -96712,6 +96856,7 @@ static PyMethodDef SwigMethods[] = {
96712
96856
{ "SBDebugger_GetSummaryForType", _wrap_SBDebugger_GetSummaryForType, METH_VARARGS, "SBDebugger_GetSummaryForType(SBDebugger self, SBTypeNameSpecifier arg2) -> SBTypeSummary"},
96713
96857
{ "SBDebugger_GetFilterForType", _wrap_SBDebugger_GetFilterForType, METH_VARARGS, "SBDebugger_GetFilterForType(SBDebugger self, SBTypeNameSpecifier arg2) -> SBTypeFilter"},
96714
96858
{ "SBDebugger_GetSyntheticForType", _wrap_SBDebugger_GetSyntheticForType, METH_VARARGS, "SBDebugger_GetSyntheticForType(SBDebugger self, SBTypeNameSpecifier arg2) -> SBTypeSynthetic"},
96859
+ { "SBDebugger_ResetStatistics", _wrap_SBDebugger_ResetStatistics, METH_O, "SBDebugger_ResetStatistics(SBDebugger self)"},
96715
96860
{ "SBDebugger_RunCommandInterpreter", _wrap_SBDebugger_RunCommandInterpreter, METH_VARARGS, "\n"
96716
96861
"SBDebugger_RunCommandInterpreter(SBDebugger self, bool auto_handle_events, bool spawn_thread, SBCommandInterpreterRunOptions options, int & num_errors, bool & quit_requested, bool & stopped_for_crash)\n"
96717
96862
"Launch a command interpreter session. Commands are read from standard input or\n"
@@ -98526,6 +98671,7 @@ static PyMethodDef SwigMethods[] = {
98526
98671
"SBTarget_GetStatistics(SBTarget self) -> SBStructuredData\n"
98527
98672
"SBTarget_GetStatistics(SBTarget self, SBStatisticsOptions options) -> SBStructuredData\n"
98528
98673
""},
98674
+ { "SBTarget_ResetStatistics", _wrap_SBTarget_ResetStatistics, METH_O, "SBTarget_ResetStatistics(SBTarget self)"},
98529
98675
{ "SBTarget_GetPlatform", _wrap_SBTarget_GetPlatform, METH_O, "\n"
98530
98676
"SBTarget_GetPlatform(SBTarget self) -> SBPlatform\n"
98531
98677
"\n"
@@ -102876,6 +103022,7 @@ SWIG_init(void) {
102876
103022
SWIG_Python_SetConstant(d, "eSectionTypeDWARFDebugTuIndex",SWIG_From_int(static_cast< int >(lldb::eSectionTypeDWARFDebugTuIndex)));
102877
103023
SWIG_Python_SetConstant(d, "eSectionTypeCTF",SWIG_From_int(static_cast< int >(lldb::eSectionTypeCTF)));
102878
103024
SWIG_Python_SetConstant(d, "eSectionTypeLLDBTypeSummaries",SWIG_From_int(static_cast< int >(lldb::eSectionTypeLLDBTypeSummaries)));
103025
+ SWIG_Python_SetConstant(d, "eSectionTypeLLDBFormatters",SWIG_From_int(static_cast< int >(lldb::eSectionTypeLLDBFormatters)));
102879
103026
SWIG_Python_SetConstant(d, "eSectionTypeSwiftModules",SWIG_From_int(static_cast< int >(lldb::eSectionTypeSwiftModules)));
102880
103027
SWIG_Python_SetConstant(d, "eEmulateInstructionOptionNone",SWIG_From_int(static_cast< int >(lldb::eEmulateInstructionOptionNone)));
102881
103028
SWIG_Python_SetConstant(d, "eEmulateInstructionOptionAutoAdvancePC",SWIG_From_int(static_cast< int >(lldb::eEmulateInstructionOptionAutoAdvancePC)));
@@ -103180,6 +103327,8 @@ SWIG_init(void) {
103180
103327
SWIG_Python_SetConstant(d, "eSeverityError",SWIG_From_int(static_cast< int >(lldb::eSeverityError)));
103181
103328
SWIG_Python_SetConstant(d, "eSeverityWarning",SWIG_From_int(static_cast< int >(lldb::eSeverityWarning)));
103182
103329
SWIG_Python_SetConstant(d, "eSeverityInfo",SWIG_From_int(static_cast< int >(lldb::eSeverityInfo)));
103330
+ SWIG_Python_SetConstant(d, "eCommandReturnObjectPrintCallbackSkipped",SWIG_From_int(static_cast< int >(lldb::eCommandReturnObjectPrintCallbackSkipped)));
103331
+ SWIG_Python_SetConstant(d, "eCommandReturnObjectPrintCallbackHandled",SWIG_From_int(static_cast< int >(lldb::eCommandReturnObjectPrintCallbackHandled)));
103183
103332
SWIG_Python_SetConstant(d, "SBCommandInterpreter_eBroadcastBitThreadShouldExit",SWIG_From_int(static_cast< int >(lldb::SBCommandInterpreter::eBroadcastBitThreadShouldExit)));
103184
103333
SWIG_Python_SetConstant(d, "SBCommandInterpreter_eBroadcastBitResetPrompt",SWIG_From_int(static_cast< int >(lldb::SBCommandInterpreter::eBroadcastBitResetPrompt)));
103185
103334
SWIG_Python_SetConstant(d, "SBCommandInterpreter_eBroadcastBitQuitCommandReceived",SWIG_From_int(static_cast< int >(lldb::SBCommandInterpreter::eBroadcastBitQuitCommandReceived)));
0 commit comments