[all-commits] [llvm/llvm-project] cc9ad7: [lldb] Check for abstract methods implementation i...
Med Ismail Bennani via All-commits
all-commits at lists.llvm.org
Tue Nov 7 12:07:30 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cc9ad72713405ef8f2468c7a714a137b4a3343ba
https://github.com/llvm/llvm-project/commit/cc9ad72713405ef8f2468c7a714a137b4a3343ba
Author: Med Ismail Bennani <ismail at bennani.ma>
Date: 2023-11-07 (Tue, 07 Nov 2023)
Changed paths:
M lldb/include/lldb/Interpreter/Interfaces/ScriptedInterface.h
M lldb/include/lldb/Interpreter/Interfaces/ScriptedPlatformInterface.h
M lldb/include/lldb/Interpreter/Interfaces/ScriptedProcessInterface.h
M lldb/include/lldb/Interpreter/Interfaces/ScriptedThreadInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/OperatingSystemPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedThreadPythonInterface.h
M lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
M lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
M lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
A lldb/test/API/functionalities/scripted_process/missing_methods_scripted_process.py
M lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
Log Message:
-----------
[lldb] Check for abstract methods implementation in Scripted Plugin Objects (#71260)
This patch enforces that every scripted object implements all the
necessary abstract methods.
Every scripted affordance language interface can implement a list of
abstract methods name that checked when the object is instanciated.
Since some scripting affordances implementations can be derived from
template base classes, we can't check the object dictionary since it
will contain the definition of the base class, so instead, this checks
the scripting class dictionary.
Previously, for the various python interfaces, we used
`ABC.abstractmethod` decorators but this is too language specific and
doesn't work for scripting affordances that are not derived from
template base classes (i.e OperatingSystem, ScriptedThreadPlan, ...), so
this patch provides generic/language-agnostic checks for every scripted
affordance.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
More information about the All-commits
mailing list