@@ -64135,6 +64135,66 @@ SWIGINTERN PyObject *_wrap_SBThreadPlan_IsPlanStale(PyObject *SWIGUNUSEDPARM(sel
64135
64135
}
64136
64136
64137
64137
64138
+ SWIGINTERN PyObject *_wrap_SBThreadPlan_GetStopOthers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64139
+ PyObject *resultobj = 0;
64140
+ lldb::SBThreadPlan *arg1 = (lldb::SBThreadPlan *) 0 ;
64141
+ void *argp1 = 0 ;
64142
+ int res1 = 0 ;
64143
+ PyObject *swig_obj[1] ;
64144
+ bool result;
64145
+
64146
+ if (!args) SWIG_fail;
64147
+ swig_obj[0] = args;
64148
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBThreadPlan, 0 | 0 );
64149
+ if (!SWIG_IsOK(res1)) {
64150
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBThreadPlan_GetStopOthers" "', argument " "1"" of type '" "lldb::SBThreadPlan *""'");
64151
+ }
64152
+ arg1 = reinterpret_cast< lldb::SBThreadPlan * >(argp1);
64153
+ {
64154
+ SWIG_PYTHON_THREAD_BEGIN_ALLOW;
64155
+ result = (bool)(arg1)->GetStopOthers();
64156
+ SWIG_PYTHON_THREAD_END_ALLOW;
64157
+ }
64158
+ resultobj = SWIG_From_bool(static_cast< bool >(result));
64159
+ return resultobj;
64160
+ fail:
64161
+ return NULL;
64162
+ }
64163
+
64164
+
64165
+ SWIGINTERN PyObject *_wrap_SBThreadPlan_SetStopOthers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64166
+ PyObject *resultobj = 0;
64167
+ lldb::SBThreadPlan *arg1 = (lldb::SBThreadPlan *) 0 ;
64168
+ bool arg2 ;
64169
+ void *argp1 = 0 ;
64170
+ int res1 = 0 ;
64171
+ bool val2 ;
64172
+ int ecode2 = 0 ;
64173
+ PyObject *swig_obj[2] ;
64174
+
64175
+ if (!SWIG_Python_UnpackTuple(args, "SBThreadPlan_SetStopOthers", 2, 2, swig_obj)) SWIG_fail;
64176
+ res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lldb__SBThreadPlan, 0 | 0 );
64177
+ if (!SWIG_IsOK(res1)) {
64178
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SBThreadPlan_SetStopOthers" "', argument " "1"" of type '" "lldb::SBThreadPlan *""'");
64179
+ }
64180
+ arg1 = reinterpret_cast< lldb::SBThreadPlan * >(argp1);
64181
+ ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
64182
+ if (!SWIG_IsOK(ecode2)) {
64183
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SBThreadPlan_SetStopOthers" "', argument " "2"" of type '" "bool""'");
64184
+ }
64185
+ arg2 = static_cast< bool >(val2);
64186
+ {
64187
+ SWIG_PYTHON_THREAD_BEGIN_ALLOW;
64188
+ (arg1)->SetStopOthers(arg2);
64189
+ SWIG_PYTHON_THREAD_END_ALLOW;
64190
+ }
64191
+ resultobj = SWIG_Py_Void();
64192
+ return resultobj;
64193
+ fail:
64194
+ return NULL;
64195
+ }
64196
+
64197
+
64138
64198
SWIGINTERN PyObject *_wrap_SBThreadPlan_QueueThreadPlanForStepOverRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64139
64199
PyObject *resultobj = 0;
64140
64200
lldb::SBThreadPlan *arg1 = (lldb::SBThreadPlan *) 0 ;
@@ -80183,6 +80243,127 @@ LLDBSwigPythonCallBreakpointResolver
80183
80243
return ret_val;
80184
80244
}
80185
80245
80246
+ SWIGEXPORT void *
80247
+ LLDBSwigPythonCreateScriptedStopHook
80248
+ (
80249
+ lldb::TargetSP target_sp,
80250
+ const char *python_class_name,
80251
+ const char *session_dictionary_name,
80252
+ lldb_private::StructuredDataImpl *args_impl,
80253
+ Status &error
80254
+ )
80255
+ {
80256
+ if (python_class_name == NULL || python_class_name[0] == '\0') {
80257
+ error.SetErrorString("Empty class name.");
80258
+ Py_RETURN_NONE;
80259
+ }
80260
+ if (!session_dictionary_name) {
80261
+ error.SetErrorString("No session dictionary");
80262
+ Py_RETURN_NONE;
80263
+ }
80264
+
80265
+ PyErr_Cleaner py_err_cleaner(true);
80266
+
80267
+ auto dict =
80268
+ PythonModule::MainModule().ResolveName<PythonDictionary>(
80269
+ session_dictionary_name);
80270
+ auto pfunc =
80271
+ PythonObject::ResolveNameWithDictionary<PythonCallable>(
80272
+ python_class_name, dict);
80273
+
80274
+ if (!pfunc.IsAllocated()) {
80275
+ error.SetErrorStringWithFormat("Could not find class: %s.",
80276
+ python_class_name);
80277
+ return nullptr;
80278
+ }
80279
+
80280
+ lldb::SBTarget *target_val
80281
+ = new lldb::SBTarget(target_sp);
80282
+
80283
+ PythonObject target_arg(PyRefType::Owned, SBTypeToSWIGWrapper(target_val));
80284
+
80285
+ lldb::SBStructuredData *args_value = new lldb::SBStructuredData(args_impl);
80286
+ PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(args_value));
80287
+
80288
+ PythonObject result = pfunc(target_arg, args_arg, dict);
80289
+
80290
+ if (result.IsAllocated())
80291
+ {
80292
+ // Check that the handle_stop callback is defined:
80293
+ auto callback_func = result.ResolveName<PythonCallable>("handle_stop");
80294
+ if (callback_func.IsAllocated()) {
80295
+ if (auto args_info = callback_func.GetArgInfo()) {
80296
+ size_t num_args = (*args_info).max_positional_args;
80297
+ if (num_args != 2) {
80298
+ error.SetErrorStringWithFormat("Wrong number of args for "
80299
+ "handle_stop callback, should be 2 (excluding self), got: %d",
80300
+ num_args);
80301
+ Py_RETURN_NONE;
80302
+ } else
80303
+ return result.release();
80304
+ } else {
80305
+ error.SetErrorString("Couldn't get num arguments for handle_stop "
80306
+ "callback.");
80307
+ Py_RETURN_NONE;
80308
+ }
80309
+ return result.release();
80310
+ }
80311
+ else {
80312
+ error.SetErrorStringWithFormat("Class \"%s\" is missing the required "
80313
+ "handle_stop callback.",
80314
+ python_class_name);
80315
+ result.release();
80316
+ }
80317
+ }
80318
+ Py_RETURN_NONE;
80319
+ }
80320
+
80321
+ SWIGEXPORT bool
80322
+ LLDBSwigPythonStopHookCallHandleStop
80323
+ (
80324
+ void *implementor,
80325
+ lldb::ExecutionContextRefSP exc_ctx_sp,
80326
+ lldb::StreamSP stream
80327
+ )
80328
+ {
80329
+ // handle_stop will return a bool with the meaning "should_stop"...
80330
+ // If you return nothing we'll assume we are going to stop.
80331
+ // Also any errors should return true, since we should stop on error.
80332
+
80333
+ PyErr_Cleaner py_err_cleaner(false);
80334
+ PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
80335
+ auto pfunc = self.ResolveName<PythonCallable>("handle_stop");
80336
+
80337
+ if (!pfunc.IsAllocated())
80338
+ return true;
80339
+
80340
+ PythonObject result;
80341
+ lldb::SBExecutionContext sb_exc_ctx(exc_ctx_sp);
80342
+ PythonObject exc_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_exc_ctx));
80343
+ lldb::SBStream sb_stream;
80344
+ PythonObject sb_stream_arg(PyRefType::Owned,
80345
+ SBTypeToSWIGWrapper(sb_stream));
80346
+ result = pfunc(exc_ctx_arg, sb_stream_arg);
80347
+
80348
+ if (PyErr_Occurred())
80349
+ {
80350
+ stream->PutCString("Python error occurred handling stop-hook.");
80351
+ PyErr_Print();
80352
+ PyErr_Clear();
80353
+ return true;
80354
+ }
80355
+
80356
+ // Now add the result to the output stream. SBStream only
80357
+ // makes an internally help StreamString which I can't interpose, so I
80358
+ // have to copy it over here.
80359
+ stream->PutCString(sb_stream.GetData());
80360
+
80361
+ if (result.get() == Py_False)
80362
+ return false;
80363
+ else
80364
+ return true;
80365
+ }
80366
+
80186
80367
// wrapper that calls an optional instance member of an object taking no arguments
80187
80368
static PyObject*
80188
80369
LLDBSwigPython_CallOptionalMember
@@ -83893,6 +84074,11 @@ static PyMethodDef SwigMethods[] = {
83893
84074
{ "SBThreadPlan_SetPlanComplete", _wrap_SBThreadPlan_SetPlanComplete, METH_VARARGS, "SBThreadPlan_SetPlanComplete(SBThreadPlan self, bool success)"},
83894
84075
{ "SBThreadPlan_IsPlanComplete", _wrap_SBThreadPlan_IsPlanComplete, METH_O, "SBThreadPlan_IsPlanComplete(SBThreadPlan self) -> bool"},
83895
84076
{ "SBThreadPlan_IsPlanStale", _wrap_SBThreadPlan_IsPlanStale, METH_O, "SBThreadPlan_IsPlanStale(SBThreadPlan self) -> bool"},
84077
+ { "SBThreadPlan_GetStopOthers", _wrap_SBThreadPlan_GetStopOthers, METH_O, "\n"
84078
+ "SBThreadPlan_GetStopOthers(SBThreadPlan self) -> bool\n"
84079
+ "Return whether this plan will ask to stop other threads when it runs.\n"
84080
+ ""},
84081
+ { "SBThreadPlan_SetStopOthers", _wrap_SBThreadPlan_SetStopOthers, METH_VARARGS, "SBThreadPlan_SetStopOthers(SBThreadPlan self, bool stop_others)"},
83896
84082
{ "SBThreadPlan_QueueThreadPlanForStepOverRange", _wrap_SBThreadPlan_QueueThreadPlanForStepOverRange, METH_VARARGS, "SBThreadPlan_QueueThreadPlanForStepOverRange(SBThreadPlan self, SBAddress start_address, lldb::addr_t range_size) -> SBThreadPlan"},
83897
84083
{ "SBThreadPlan_QueueThreadPlanForStepInRange", _wrap_SBThreadPlan_QueueThreadPlanForStepInRange, METH_VARARGS, "SBThreadPlan_QueueThreadPlanForStepInRange(SBThreadPlan self, SBAddress start_address, lldb::addr_t range_size) -> SBThreadPlan"},
83898
84084
{ "SBThreadPlan_QueueThreadPlanForStepOut", _wrap_SBThreadPlan_QueueThreadPlanForStepOut, METH_VARARGS, "SBThreadPlan_QueueThreadPlanForStepOut(SBThreadPlan self, uint32_t frame_idx_to_step_to, bool first_insn=False) -> SBThreadPlan"},
@@ -86308,6 +86494,7 @@ SWIG_init(void) {
86308
86494
SWIG_Python_SetConstant(d, "LLDB_INVALID_SIGNAL_NUMBER",SWIG_From_int(static_cast< int >(2147483647)));
86309
86495
SWIG_Python_SetConstant(d, "LLDB_INVALID_OFFSET",SWIG_From_unsigned_SS_long_SS_long(static_cast< unsigned long long >(18446744073709551615ULL)));
86310
86496
SWIG_Python_SetConstant(d, "LLDB_INVALID_LINE_NUMBER",SWIG_From_unsigned_SS_int(static_cast< unsigned int >(4294967295U)));
86497
+ SWIG_Python_SetConstant(d, "LLDB_INVALID_COLUMN_NUMBER",SWIG_From_int(static_cast< int >(0)));
86311
86498
SWIG_Python_SetConstant(d, "LLDB_INVALID_QUEUE_ID",SWIG_From_int(static_cast< int >(0)));
86312
86499
SWIG_Python_SetConstant(d, "LLDB_ARCH_DEFAULT",SWIG_FromCharPtr("systemArch"));
86313
86500
SWIG_Python_SetConstant(d, "LLDB_ARCH_DEFAULT_32BIT",SWIG_FromCharPtr("systemArch32"));
@@ -86326,6 +86513,7 @@ SWIG_init(void) {
86326
86513
SWIG_Python_SetConstant(d, "LLDB_OPT_SET_9",SWIG_From_unsigned_SS_int(static_cast< unsigned int >((1U << 8))));
86327
86514
SWIG_Python_SetConstant(d, "LLDB_OPT_SET_10",SWIG_From_unsigned_SS_int(static_cast< unsigned int >((1U << 9))));
86328
86515
SWIG_Python_SetConstant(d, "LLDB_OPT_SET_11",SWIG_From_unsigned_SS_int(static_cast< unsigned int >((1U << 10))));
86516
+ SWIG_Python_SetConstant(d, "LLDB_OPT_SET_12",SWIG_From_unsigned_SS_int(static_cast< unsigned int >((1U << 11))));
86329
86517
SWIG_Python_SetConstant(d, "eStateInvalid",SWIG_From_int(static_cast< int >(lldb::eStateInvalid)));
86330
86518
SWIG_Python_SetConstant(d, "eStateUnloaded",SWIG_From_int(static_cast< int >(lldb::eStateUnloaded)));
86331
86519
SWIG_Python_SetConstant(d, "eStateConnected",SWIG_From_int(static_cast< int >(lldb::eStateConnected)));
@@ -86608,6 +86796,7 @@ SWIG_init(void) {
86608
86796
SWIG_Python_SetConstant(d, "eArgTypeExpression",SWIG_From_int(static_cast< int >(lldb::eArgTypeExpression)));
86609
86797
SWIG_Python_SetConstant(d, "eArgTypeExpressionPath",SWIG_From_int(static_cast< int >(lldb::eArgTypeExpressionPath)));
86610
86798
SWIG_Python_SetConstant(d, "eArgTypeExprFormat",SWIG_From_int(static_cast< int >(lldb::eArgTypeExprFormat)));
86799
+ SWIG_Python_SetConstant(d, "eArgTypeFileLineColumn",SWIG_From_int(static_cast< int >(lldb::eArgTypeFileLineColumn)));
86611
86800
SWIG_Python_SetConstant(d, "eArgTypeFilename",SWIG_From_int(static_cast< int >(lldb::eArgTypeFilename)));
86612
86801
SWIG_Python_SetConstant(d, "eArgTypeFormat",SWIG_From_int(static_cast< int >(lldb::eArgTypeFormat)));
86613
86802
SWIG_Python_SetConstant(d, "eArgTypeFrameIndex",SWIG_From_int(static_cast< int >(lldb::eArgTypeFrameIndex)));
0 commit comments