brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 5ed7574 Raw
62 lines · python
1import gdbremote_testcase2from lldbsuite.test.decorators import *3from lldbsuite.test.lldbtest import *4from lldbsuite.test import lldbutil5 6 7class 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()12 13        # Run the gdb remote command stream.14        context = self.expect_gdbremote_sequence()15        self.assertIsNotNone(context)16 17        # Pull out supported modes.18        supported_vCont_modes = self.parse_vCont_query_response(context)19        self.assertIsNotNone(supported_vCont_modes)20 21        # Verify we support the given mode.22        self.assertIn(mode, supported_vCont_modes)23 24    def test_vCont_supports_c(self):25        self.build()26        self.vCont_supports_mode("c")27 28    def test_vCont_supports_C(self):29        self.build()30        self.vCont_supports_mode("C")31 32    def test_vCont_supports_s(self):33        self.build()34        self.vCont_supports_mode("s")35 36    def test_vCont_supports_S(self):37        self.build()38        self.vCont_supports_mode("S")39 40    @add_test_categories(["llgs"])41    def test_vCont_supports_t(self):42        self.build()43        self.vCont_supports_mode("t")44 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):48        self.build()49        self.set_inferior_startup_launch()50        self.single_step_only_steps_one_instruction(51            use_Hc_packet=True, step_instruction="vCont;s"52        )53 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):57        self.build()58        self.set_inferior_startup_launch()59        self.single_step_only_steps_one_instruction(60            use_Hc_packet=False, step_instruction="vCont;s:{thread}"61        )62