Revert "[LoongArch] Eliminate the redundant sign extension of division (#107971)"
[llvm-project.git] / lldb / test / API / functionalities / gdb_remote_client / TestContinue.py
blob3af4ca859f86e45a40b8f822f52068b979914b01
1 import lldb
2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test.decorators import *
4 from lldbsuite.test.gdbclientutils import *
5 from lldbsuite.test.lldbgdbclient import GDBRemoteTestBase
8 class TestContinue(GDBRemoteTestBase):
9 class BaseResponder(MockGDBServerResponder):
10 def qSupported(self, client_supported):
11 return "PacketSize=3fff;QStartNoAckMode+;multiprocess+"
13 def qfThreadInfo(self):
14 return "mp400.401"
16 def haltReason(self):
17 return "S13"
19 def cont(self):
20 return "W01"
22 def other(self, packet):
23 if packet == "vCont?":
24 return "vCont;c;C;s;S"
25 if packet.startswith("vCont;"):
26 return "W00"
27 return ""
29 def test_continue_no_multiprocess(self):
30 class MyResponder(self.BaseResponder):
31 def qSupported(self, client_supported):
32 return "PacketSize=3fff;QStartNoAckMode+"
34 def qfThreadInfo(self):
35 return "m401"
37 self.server.responder = MyResponder()
38 self.runCmd("platform select remote-linux")
39 target = self.createTarget("a.yaml")
40 process = self.connect(target)
41 lldbutil.expect_state_changes(
42 self, self.dbg.GetListener(), process, [lldb.eStateExited]
44 self.assertPacketLogContains(["vCont;C13:401"])
46 def test_continue_no_vCont(self):
47 class MyResponder(self.BaseResponder):
48 def qSupported(self, client_supported):
49 return "PacketSize=3fff;QStartNoAckMode+"
51 def qfThreadInfo(self):
52 return "m401"
54 def other(self, packet):
55 return ""
57 self.server.responder = MyResponder()
58 self.runCmd("platform select remote-linux")
59 target = self.createTarget("a.yaml")
60 process = self.connect(target)
61 lldbutil.expect_state_changes(
62 self, self.dbg.GetListener(), process, [lldb.eStateExited]
64 self.assertPacketLogContains(["Hc401", "C13"])
66 def test_continue_multiprocess(self):
67 class MyResponder(self.BaseResponder):
68 pass
70 self.server.responder = MyResponder()
71 self.runCmd("platform select remote-linux")
72 target = self.createTarget("a.yaml")
73 process = self.connect(target)
74 lldbutil.expect_state_changes(
75 self, self.dbg.GetListener(), process, [lldb.eStateExited]
77 self.assertPacketLogContains(["vCont;C13:p400.401"])