From cfa55bfe781474a30467b1bbf2e7874985171196 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Tue, 18 Jan 2022 12:46:17 +0100 Subject: [lldb/Plugins] Enrich ScriptedThreads Stop Reasons with Exceptions This patch adds Exceptions to the list of supported stop reasons for Scripted Threads. The main motivation for this is that breakpoints are triggered as a special exception class on ARM platforms, so adding it as a stop reason allows the ScriptedProcess to selected the ScriptedThread that stopped at a breakpoint (or crashed :p). rdar://87430376 Differential Revision: https://reviews.llvm.org/D117074 Signed-off-by: Med Ismail Bennani --- .../functionalities/scripted_process/TestScriptedProcess.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py') diff --git a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py index be55771c14fb..4831d48a0b5a 100644 --- a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py +++ b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py @@ -188,13 +188,13 @@ class ScriptedProcesTestCase(TestBase): self.assertEqual(process.GetProcessID(), 42) self.assertEqual(process.GetNumThreads(), 3) - thread = process.GetSelectedThread() + thread = process.GetThreadAtIndex(2) self.assertTrue(thread, "Invalid thread.") - self.assertEqual(thread.GetName(), "StackCoreScriptedThread.thread-0") + self.assertEqual(thread.GetName(), "StackCoreScriptedThread.thread-2") - self.assertEqual(thread.GetNumFrames(), 2) + self.assertEqual(thread.GetNumFrames(), 6) frame = thread.GetSelectedFrame() self.assertTrue(frame, "Invalid frame.") - # self.assertEqual(frame.GetFunctionName(), "bar") - # self.assertEqual(int(frame.FindValue("i", lldb.eValueTypeVariableArgument).GetValue()), 42) - # self.assertEqual(int(frame.FindValue("j", lldb.eValueTypeVariableLocal).GetValue()), 42 * 42) + self.assertIn("bar", frame.GetFunctionName()) + self.assertEqual(int(frame.FindValue("i", lldb.eValueTypeVariableArgument).GetValue()), 42) + self.assertEqual(int(frame.FindValue("j", lldb.eValueTypeVariableLocal).GetValue()), 42 * 42) -- cgit v1.2.3