1 import gdbremote_testcase
2 from lldbsuite
.test
.decorators
import *
3 from lldbsuite
.test
.lldbtest
import *
4 from lldbsuite
.test
import lldbutil
7 class TestGdbRemote_vCont(gdbremote_testcase
.GdbRemoteTestCaseBase
):
8 def vCont_supports_mode(self
, mode
, inferior_args
=None):
9 # Setup the stub and set the gdb remote command stream.
10 procs
= self
.prep_debug_monitor_and_inferior(inferior_args
=inferior_args
)
11 self
.add_vCont_query_packets()
13 # Run the gdb remote command stream.
14 context
= self
.expect_gdbremote_sequence()
15 self
.assertIsNotNone(context
)
17 # Pull out supported modes.
18 supported_vCont_modes
= self
.parse_vCont_query_response(context
)
19 self
.assertIsNotNone(supported_vCont_modes
)
21 # Verify we support the given mode.
22 self
.assertIn(mode
, supported_vCont_modes
)
24 def test_vCont_supports_c(self
):
26 self
.vCont_supports_mode("c")
28 def test_vCont_supports_C(self
):
30 self
.vCont_supports_mode("C")
32 def test_vCont_supports_s(self
):
34 self
.vCont_supports_mode("s")
36 def test_vCont_supports_S(self
):
38 self
.vCont_supports_mode("S")
40 @add_test_categories(["llgs"])
41 def test_vCont_supports_t(self
):
43 self
.vCont_supports_mode("t")
45 @skipIfWindows # No pty support to test O* & I* notification packets.
46 @skipIf(triple
="^mips")
47 def test_single_step_only_steps_one_instruction_with_Hc_vCont_s(self
):
49 self
.set_inferior_startup_launch()
50 self
.single_step_only_steps_one_instruction(
51 use_Hc_packet
=True, step_instruction
="vCont;s"
54 @skipIfWindows # No pty support to test O* & I* notification packets.
55 @skipIf(triple
="^mips")
56 def test_single_step_only_steps_one_instruction_with_vCont_s_thread(self
):
58 self
.set_inferior_startup_launch()
59 self
.single_step_only_steps_one_instruction(
60 use_Hc_packet
=False, step_instruction
="vCont;s:{thread}"