diff options
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py')
| -rw-r--r-- | lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py index 2e80f74622fb..c8ce37c24d49 100644 --- a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py +++ b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py @@ -196,6 +196,22 @@ class ScriptedProcesTestCase(TestBase): self.assertTrue(thread, "Invalid thread.") self.assertEqual(thread.GetName(), "StackCoreScriptedThread.thread-2") + self.assertTrue(target.triple, "Invalid target triple") + arch = target.triple.split('-')[0] + supported_arch = ['x86_64', 'arm64', 'arm64e'] + self.assertIn(arch, supported_arch) + # When creating a corefile of a arm process, lldb saves the exception + # that triggers the breakpoint in the LC_NOTES of the corefile, so they + # can be reloaded with the corefile on the next debug session. + if arch in 'arm64e': + self.assertTrue(thread.GetStopReason(), lldb.eStopReasonException) + # However, it's architecture specific, and corefiles made from intel + # process don't save any metadata to retrieve to stop reason. + # To mitigate this, the StackCoreScriptedProcess will report a + # eStopReasonSignal with a SIGTRAP, mimicking what debugserver does. + else: + self.assertTrue(thread.GetStopReason(), lldb.eStopReasonSignal) + self.assertEqual(thread.GetNumFrames(), 6) frame = thread.GetSelectedFrame() self.assertTrue(frame, "Invalid frame.") |
