[lldb] Revert scripted symbol locator (#181945)
This revert #181334 and its follow-up PRs (including #181488, #181492, #181493, #181494 and #181498) as well as Ismail's documentation changes (#181594, #181717). The original commit causes a test failure in CI (https://github.com/llvm/llvm-project/issues/181938) but the more I look at the patch, the more I'm convinced it was not ready to land. It will be easier to iterate on the feedback by re-landing this than by using post-commit review.
This commit is contained in:
1 parent
3fc48b7817
commit
091296f3e3
49 files changed
+13
-1814
No files matched your search
@@ -17,16 +17,9 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include "lldb/Core/ModuleSpec.h"
|
||||
#include "lldb/Host/Config.h"
|
||||
#include "lldb/Interpreter/Interfaces/ScriptedInterface.h"
|
||||
#include "lldb/Utility/DataBufferHeap.h"
|
||||
#include "lldb/Utility/FileSpec.h"
|
||||
#include "lldb/Utility/FileSpecList.h"
|
||||
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
#include "lldb/API/SBFileSpecList.h"
|
||||
#include "lldb/API/SBModuleSpec.h"
|
||||
|
||||
#include "../PythonDataObjects.h"
|
||||
#include "../SWIGPythonBridge.h"
|
||||
@@ -639,10 +632,6 @@ protected:
|
||||
return python::SWIGBridge::ToSWIGWrapper(arg);
|
||||
}
|
||||
|
||||
python::PythonObject Transform(lldb::ModuleSP arg) {
|
||||
return python::SWIGBridge::ToSWIGWrapper(arg);
|
||||
}
|
||||
|
||||
python::PythonObject Transform(Event *arg) {
|
||||
return python::SWIGBridge::ToSWIGWrapper(arg);
|
||||
}
|
||||
@@ -671,24 +660,6 @@ protected:
|
||||
return python::SWIGBridge::ToSWIGWrapper(arg);
|
||||
}
|
||||
|
||||
python::PythonObject Transform(const ModuleSpec &arg) {
|
||||
return python::SWIGBridge::ToSWIGWrapper(
|
||||
m_interpreter.MakeSBModuleSpec(arg));
|
||||
}
|
||||
|
||||
python::PythonObject Transform(const FileSpecList &arg) {
|
||||
auto sb_list = std::make_unique<lldb::SBFileSpecList>();
|
||||
for (size_t i = 0; i < arg.GetSize(); i++) {
|
||||
sb_list->Append(
|
||||
lldb::SBFileSpec(arg.GetFileSpecAtIndex(i).GetPath().c_str(), false));
|
||||
}
|
||||
return python::SWIGBridge::ToSWIGWrapper(std::move(sb_list));
|
||||
}
|
||||
|
||||
python::PythonObject Transform(const std::string &arg) {
|
||||
return python::PythonString(arg);
|
||||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
void ReverseTransform(T &original_arg, U transformed_arg, Status &error) {
|
||||
// If U is not a PythonObject, don't touch it!
|
||||
@@ -700,16 +671,6 @@ protected:
|
||||
original_arg = ExtractValueFromPythonObject<T>(transformed_arg, error);
|
||||
}
|
||||
|
||||
// Read-only types: Python doesn't modify these, so reverse transform is a
|
||||
// no-op.
|
||||
void ReverseTransform(std::string &original_arg,
|
||||
python::PythonObject transformed_arg, Status &error) {
|
||||
python::PythonString py_str(python::PyRefType::Borrowed,
|
||||
transformed_arg.get());
|
||||
if (py_str.IsValid())
|
||||
original_arg = py_str.GetString().str();
|
||||
}
|
||||
|
||||
void ReverseTransform(bool &original_arg,
|
||||
python::PythonObject transformed_arg, Status &error) {
|
||||
python::PythonBoolean boolean_arg = python::PythonBoolean(
|
||||
@@ -867,24 +828,6 @@ lldb::ValueObjectListSP
|
||||
ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::ValueObjectListSP>(
|
||||
python::PythonObject &p, Status &error);
|
||||
|
||||
template <>
|
||||
FileSpec ScriptedPythonInterface::ExtractValueFromPythonObject<FileSpec>(
|
||||
python::PythonObject &p, Status &error);
|
||||
|
||||
template <>
|
||||
ModuleSpec ScriptedPythonInterface::ExtractValueFromPythonObject<ModuleSpec>(
|
||||
python::PythonObject &p, Status &error);
|
||||
|
||||
template <>
|
||||
FileSpecList
|
||||
ScriptedPythonInterface::ExtractValueFromPythonObject<FileSpecList>(
|
||||
python::PythonObject &p, Status &error);
|
||||
|
||||
template <>
|
||||
lldb::ModuleSP
|
||||
ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::ModuleSP>(
|
||||
python::PythonObject &p, Status &error);
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // LLDB_ENABLE_PYTHON
|
||||
|
||||
Reference in new issue
Block a user