diff options
| author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-01-18 12:46:17 +0100 |
|---|---|---|
| committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2022-01-24 20:25:54 +0100 |
| commit | cfa55bfe781474a30467b1bbf2e7874985171196 (patch) | |
| tree | 2946ab3193145a2db419baca91f05783c0594917 /lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py | |
| parent | d3e0f7e1503b1bca8baa6483d3b5c452a91f60a6 (diff) | |
[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 <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py')
| -rw-r--r-- | lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py | 12 |
1 files changed, 6 insertions, 6 deletions
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) |
