diff options
| author | Med Ismail Bennani <ismail@bennani.ma> | 2024-09-19 13:55:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-19 13:55:41 -0700 |
| commit | 21026073e3b0583caf0c81564c4d7ebf002fe67b (patch) | |
| tree | 622effdb134ebedf78fb36abab49adb5b4e9cd22 /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h | |
| parent | 1335a11176f99cc54f423fe173708bd2373b59f7 (diff) | |
[lldb/Interpreter] Add requirements to Scripted Interface abstract methods (#109063)
This patch adds new requirements to the Scripted Interface abstract
method checker to check the minimum number of argument for abstract
methods.
This check is done when creating the interface object so the object is
not created if the user implementation doesn't match the abstract method
requirement.
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h index 1535d573e72f..703b942fe564 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h @@ -31,9 +31,12 @@ public: StructuredData::DictionarySP args_sp, StructuredData::Generic *script_obj = nullptr) override; - llvm::SmallVector<llvm::StringLiteral> GetAbstractMethods() const override { - return llvm::SmallVector<llvm::StringLiteral>( - {"read_memory_at_address", "is_alive", "get_scripted_thread_plugin"}); + llvm::SmallVector<AbstractMethodRequirement> + GetAbstractMethodRequirements() const override { + return llvm::SmallVector<AbstractMethodRequirement>( + {{"read_memory_at_address", 4}, + {"is_alive"}, + {"get_scripted_thread_plugin"}}); } StructuredData::DictionarySP GetCapabilities() override; |
