Author: Jason Molenda Date: 2024-11-15T00:56:34-08:00 New Revision: fda4a324a384af8dc57cbe0a9b6284c2e8ca073f
URL: https://github.com/llvm/llvm-project/commit/fda4a324a384af8dc57cbe0a9b6284c2e8ca073f DIFF: https://github.com/llvm/llvm-project/commit/fda4a324a384af8dc57cbe0a9b6284c2e8ca073f.diff LOG: [lldb] Only run scripted process test on x86_64/arm64 The newly added test/API/functionalities/scripted_process_empty_memory_region/dummy_scripted_process.py imports examples/python/templates/scripted_process.py which only has register definitions for x86_64 and arm64. Only run this test on those two architectures for now. Added: Modified: lldb/examples/python/templates/scripted_process.py lldb/test/API/functionalities/scripted_process_empty_memory_region/TestScriptedProcessEmptyMemoryRegion.py Removed: ################################################################################ diff --git a/lldb/examples/python/templates/scripted_process.py b/lldb/examples/python/templates/scripted_process.py index b7b6499580e50c..c7d5b28b52c00a 100644 --- a/lldb/examples/python/templates/scripted_process.py +++ b/lldb/examples/python/templates/scripted_process.py @@ -5,7 +5,6 @@ class ScriptedProcess(metaclass=ABCMeta): - """ The base class for a scripted process. @@ -229,7 +228,6 @@ def create_breakpoint(self, addr, error): class ScriptedThread(metaclass=ABCMeta): - """ The base class for a scripted thread. @@ -357,7 +355,10 @@ def get_register_info(self): if self.originating_process.arch == "x86_64": self.register_info["sets"] = ["General Purpose Registers"] self.register_info["registers"] = INTEL64_GPR - elif "arm64" in self.originating_process.arch: + elif ( + "arm64" in self.originating_process.arch + or self.originating_process.arch == "aarch64" + ): self.register_info["sets"] = ["General Purpose Registers"] self.register_info["registers"] = ARM64_GPR else: @@ -411,9 +412,9 @@ def __init__(self, exe_ctx, args, launched_driving_process=True): ) ) - self.threads[ - driving_thread.GetThreadID() - ] = PassthroughScriptedThread(self, structured_data) + self.threads[driving_thread.GetThreadID()] = ( + PassthroughScriptedThread(self, structured_data) + ) for module in self.driving_target.modules: path = module.file.fullpath @@ -507,9 +508,9 @@ def get_stop_reason(self): if self.driving_thread.GetStopReason() != lldb.eStopReasonNone: if "arm64" in self.originating_process.arch: stop_reason["type"] = lldb.eStopReasonException - stop_reason["data"][ - "desc" - ] = self.driving_thread.GetStopDescription(100) + stop_reason["data"]["desc"] = ( + self.driving_thread.GetStopDescription(100) + ) elif self.originating_process.arch == "x86_64": stop_reason["type"] = lldb.eStopReasonSignal stop_reason["data"]["signal"] = signal.SIGTRAP diff --git a/lldb/test/API/functionalities/scripted_process_empty_memory_region/TestScriptedProcessEmptyMemoryRegion.py b/lldb/test/API/functionalities/scripted_process_empty_memory_region/TestScriptedProcessEmptyMemoryRegion.py index 1ff084cfb0278e..85d7db59cba1e4 100644 --- a/lldb/test/API/functionalities/scripted_process_empty_memory_region/TestScriptedProcessEmptyMemoryRegion.py +++ b/lldb/test/API/functionalities/scripted_process_empty_memory_region/TestScriptedProcessEmptyMemoryRegion.py @@ -14,6 +14,9 @@ class ScriptedProcessEmptyMemoryRegion(TestBase): NO_DEBUG_INFO_TESTCASE = True + # imports examples/python/templates/scripted_process.py + # which only has register definitions for x86_64 and arm64. + @skipIf(archs=no_match(["arm64", "x86_64"])) def test_scripted_process_empty_memory_region(self): """Test that lldb handles an empty SBMemoryRegionInfo object from a scripted process plugin.""" _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits