2 Test lldb-mi -thread-info command.
5 from __future__ import print_function
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class MiThreadInfoTestCase(lldbmi_testcase.MiTestCaseBase):
15 mydir = TestBase.compute_mydir(__file__)
17 @skipIfWindows # pthreads not supported on Windows
18 @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
19 def test_lldbmi_thread_info(self):
20 """Test that -thread-info prints thread info and the current-thread-id"""
22 self.spawnLldbMi(args=None)
25 self.runCmd("-file-exec-and-symbols %s" % self.myexe)
28 self.runCmd("-break-insert ThreadProc")
31 # Run to the breakpoint
32 self.runCmd("-exec-run")
33 self.expect("\^running")
34 self.expect("\*stopped,reason=\"breakpoint-hit\"")
36 self.runCmd("-thread-info")
38 "\^done,threads=\[\{id=\"1\",(.*)\},\{id=\"2\",(.*)\],current-thread-id=\"2\"")
40 self.runCmd("-gdb-quit")