Revert "[lldb] Extend frame recognizers to hide frames from backtraces (#104523)"

This reverts commit f01f80ce6c.

This commit introduces an msan violation. See the discussion on https://github.com/llvm/llvm-project/pull/104523.
This commit is contained in:
Dmitri Gribenko
2024-08-22 11:58:19 +02:00
parent aa70f83e66
commit 547917aebd
32 changed files with 75 additions and 424 deletions

View File

@@ -1524,35 +1524,6 @@ lldb::ValueObjectListSP ScriptInterpreterPythonImpl::GetRecognizedArguments(
return ValueObjectListSP();
}
bool ScriptInterpreterPythonImpl::ShouldHide(
const StructuredData::ObjectSP &os_plugin_object_sp,
lldb::StackFrameSP frame_sp) {
Locker py_lock(this, Locker::AcquireLock | Locker::NoSTDIN, Locker::FreeLock);
if (!os_plugin_object_sp)
return false;
StructuredData::Generic *generic = os_plugin_object_sp->GetAsGeneric();
if (!generic)
return false;
PythonObject implementor(PyRefType::Borrowed,
(PyObject *)generic->GetValue());
if (!implementor.IsAllocated())
return false;
bool result =
SWIGBridge::LLDBSwigPython_ShouldHide(implementor.get(), frame_sp);
// if it fails, print the error but otherwise go on
if (PyErr_Occurred()) {
PyErr_Print();
PyErr_Clear();
}
return result;
}
ScriptedProcessInterfaceUP
ScriptInterpreterPythonImpl::CreateScriptedProcessInterface() {
return std::make_unique<ScriptedProcessPythonInterface>(*this);