diff options
| author | Jason Molenda <jmolenda@apple.com> | 2024-11-15 00:55:20 -0800 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2024-11-15 00:56:34 -0800 |
| commit | fda4a324a384af8dc57cbe0a9b6284c2e8ca073f (patch) | |
| tree | c09d765111e1a5a779f84fe9c45aaa482e9bed74 /lldb/examples/python | |
| parent | e54365006a46850e25bb2546c78a7e0ec88a544e (diff) | |
[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.
Diffstat (limited to 'lldb/examples/python')
| -rw-r--r-- | lldb/examples/python/templates/scripted_process.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lldb/examples/python/templates/scripted_process.py b/lldb/examples/python/templates/scripted_process.py index b7b6499580e5..c7d5b28b52c0 100644 --- a/lldb/examples/python/templates/scripted_process.py +++ b/lldb/examples/python/templates/scripted_process.py @@ -5,7 +5,6 @@ import json, struct, signal class ScriptedProcess(metaclass=ABCMeta): - """ The base class for a scripted process. @@ -229,7 +228,6 @@ class ScriptedProcess(metaclass=ABCMeta): class ScriptedThread(metaclass=ABCMeta): - """ The base class for a scripted thread. @@ -357,7 +355,10 @@ class ScriptedThread(metaclass=ABCMeta): 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 @@ class PassthroughScriptedProcess(ScriptedProcess): ) ) - 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 @@ class PassthroughScriptedThread(ScriptedThread): 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 |
