[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / packages / Python / lldbsuite / test / functionalities / gdb_remote_client / TestStopPCs.py
blobc86d3e75fe8cde75fe1dab607838ccbb96c3270d
1 import lldb
2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test.decorators import *
4 from gdbclientutils import *
7 class TestStopPCs(GDBRemoteTestBase):
9 @skipIfXmlSupportMissing
10 def test(self):
11 class MyResponder(MockGDBServerResponder):
12 def haltReason(self):
13 return "T02thread:1ff0d;threads:1ff0d,2ff0d;thread-pcs:10001bc00,10002bc00;"
15 def threadStopInfo(self, threadnum):
16 if threadnum == 0x1ff0d:
17 return "T02thread:1ff0d;threads:1ff0d,2ff0d;thread-pcs:10001bc00,10002bc00;"
18 if threadnum == 0x2ff0d:
19 return "T00thread:2ff0d;threads:1ff0d,2ff0d;thread-pcs:10001bc00,10002bc00;"
21 def qXferRead(self, obj, annex, offset, length):
22 if annex == "target.xml":
23 return """<?xml version="1.0"?>
24 <target version="1.0">
25 <architecture>i386:x86-64</architecture>
26 <feature name="org.gnu.gdb.i386.core">
27 <reg name="rip" bitsize="64" regnum="0" type="code_ptr" group="general"/>
28 </feature>
29 </target>""", False
30 else:
31 return None, False
33 self.server.responder = MyResponder()
34 target = self.dbg.CreateTarget('')
35 if self.TraceOn():
36 self.runCmd("log enable gdb-remote packets")
37 self.addTearDownHook(
38 lambda: self.runCmd("log disable gdb-remote packets"))
39 process = self.connect(target)
41 self.assertEqual(process.GetNumThreads(), 2)
42 th0 = process.GetThreadAtIndex(0)
43 th1 = process.GetThreadAtIndex(1)
44 self.assertEqual(th0.GetThreadID(), 0x1ff0d)
45 self.assertEqual(th1.GetThreadID(), 0x2ff0d)
46 self.assertEqual(th0.GetFrameAtIndex(0).GetPC(), 0x10001bc00)
47 self.assertEqual(th1.GetFrameAtIndex(0).GetPC(), 0x10002bc00)