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
):
22 def other(self
, packet
):
23 if packet
== "vCont?":
24 return "vCont;c;C;s;S"
25 if packet
.startswith("vCont;"):
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
):
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
):
54 def other(self
, packet
):
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
):
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"])