aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/scripted_process
diff options
context:
space:
mode:
authorMed Ismail Bennani <medismail.bennani@gmail.com>2023-02-16 15:15:52 -0800
committerMed Ismail Bennani <medismail.bennani@gmail.com>2023-03-03 19:33:02 -0800
commite02a355f9846d5ec9cd64b086674770ecc795c26 (patch)
tree8cc5c308c3d1d76ea4ac35f20629442ec84abeda /lldb/test/API/functionalities/scripted_process
parentb9d4c94a603d3cc1f44ab7dd1d4f3ae9c80da98b (diff)
downloadllvm-e02a355f9846d5ec9cd64b086674770ecc795c26.tar.gz
llvm-e02a355f9846d5ec9cd64b086674770ecc795c26.tar.bz2
llvm-e02a355f9846d5ec9cd64b086674770ecc795c26.zip
[lldb/Plugins] Clean-up Scripted Process interface requirements (NFC)
The goal of the simple patch is to clean-up the scripted process interface by removing methods that were introduced with the interface originally, but that were never really implemented (get_thread_with_id & get_registers_for_thread). This patch also changes `get_memory_region_containing_address` to have a base implementation (that retunrs `None`), instead of forcing the user to override it in their derived class. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process')
-rw-r--r--lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py9
-rw-r--r--lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py9
-rw-r--r--lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py6
3 files changed, 0 insertions, 24 deletions
diff --git a/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py b/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
index 94664114430e..47038144bb08 100644
--- a/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
+++ b/lldb/test/API/functionalities/scripted_process/dummy_scripted_process.py
@@ -11,15 +11,6 @@ class DummyScriptedProcess(ScriptedProcess):
super().__init__(exe_ctx, args)
self.threads[0] = DummyScriptedThread(self, None)
- def get_memory_region_containing_address(self, addr: int) -> lldb.SBMemoryRegionInfo:
- return None
-
- def get_thread_with_id(self, tid: int):
- return {}
-
- def get_registers_for_thread(self, tid: int):
- return {}
-
def read_memory_at_address(self, addr: int, size: int, error: lldb.SBError) -> lldb.SBData:
debugger = self.target.GetDebugger()
index = debugger.GetIndexOfTarget(self.target)
diff --git a/lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py b/lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
index 5852df9625d9..b931076b8978 100644
--- a/lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
+++ b/lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py
@@ -11,15 +11,6 @@ class InvalidScriptedProcess(ScriptedProcess):
super().__init__(exe_ctx, args)
self.threads[0] = InvalidScriptedThread(self, None)
- def get_memory_region_containing_address(self, addr: int) -> lldb.SBMemoryRegionInfo:
- return None
-
- def get_thread_with_id(self, tid: int):
- return {}
-
- def get_registers_for_thread(self, tid: int):
- return {}
-
def read_memory_at_address(self, addr: int, size: int, error: lldb.SBError) -> lldb.SBData:
error.SetErrorString("This is an invalid scripted process!")
return lldb.SBData()
diff --git a/lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py b/lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
index 44a2a37fcc3f..e7e27fde98cc 100644
--- a/lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
+++ b/lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py
@@ -59,12 +59,6 @@ class StackCoreScriptedProcess(ScriptedProcess):
return None
return mem_region
- def get_thread_with_id(self, tid: int):
- return {}
-
- def get_registers_for_thread(self, tid: int):
- return {}
-
def read_memory_at_address(self, addr: int, size: int, error: lldb.SBError) -> lldb.SBData:
data = lldb.SBData()
bytes_read = self.corefile_process.ReadMemory(addr, size, error)