diff options
| author | Adrian Prantl <aprantl@apple.com> | 2024-08-23 09:55:47 -0700 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2024-08-23 11:06:01 -0700 |
| commit | 3c0fba4f2471cacb27d787c7d8f54f21d9dcafae (patch) | |
| tree | 1358f71aaa271accdd5e311072c09fbc6c0808c5 /lldb/bindings/python/python-wrapper.swig | |
| parent | b7c1be1a7f49539ea644ff3fd8b55f237e37b35e (diff) | |
Revert "Revert "[lldb] Extend frame recognizers to hide frames from backtraces (#104523)""
This reverts commit 547917aebd1e79a8929b53f0ddf3b5185ee4df74.
Diffstat (limited to 'lldb/bindings/python/python-wrapper.swig')
| -rw-r--r-- | lldb/bindings/python/python-wrapper.swig | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/bindings/python/python-wrapper.swig b/lldb/bindings/python/python-wrapper.swig index 8f050643fa68..2ce42e3e017d 100644 --- a/lldb/bindings/python/python-wrapper.swig +++ b/lldb/bindings/python/python-wrapper.swig @@ -813,7 +813,7 @@ PythonObject lldb_private::python::SWIGBridge::LLDBSWIGPython_CreateFrameRecogni } PyObject *lldb_private::python::SWIGBridge::LLDBSwigPython_GetRecognizedArguments( - PyObject * implementor, const lldb::StackFrameSP &frame_sp) { + PyObject *implementor, const lldb::StackFrameSP &frame_sp) { static char callee_name[] = "get_recognized_arguments"; PythonObject arg = SWIGBridge::ToSWIGWrapper(frame_sp); @@ -824,6 +824,22 @@ PyObject *lldb_private::python::SWIGBridge::LLDBSwigPython_GetRecognizedArgument return result; } +bool lldb_private::python::SWIGBridge::LLDBSwigPython_ShouldHide( + PyObject *implementor, const lldb::StackFrameSP &frame_sp) { + static char callee_name[] = "should_hide"; + + PythonObject arg = SWIGBridge::ToSWIGWrapper(frame_sp); + + PythonString str(callee_name); + + PyObject *result = + PyObject_CallMethodObjArgs(implementor, str.get(), arg.get(), NULL); + bool ret_val = result ? PyObject_IsTrue(result) : false; + Py_XDECREF(result); + + return result; +} + void *lldb_private::python::SWIGBridge::LLDBSWIGPython_GetDynamicSetting( void *module, const char *setting, const lldb::TargetSP &target_sp) { if (!module || !setting) |
