Lines Matching refs:g
63 def get_reg_le(g, reg): argument
64 res = g.cmd(b'p%x' % reg)
71 def get_reg_be(g, reg): argument
72 res = g.cmd(b'p%x' % reg)
75 def get_reg(self, g, reg): argument
78 return self.get_reg_le(g, reg)
80 return self.get_reg_be(g, reg)
82 def get_pc(self, g): argument
83 return self.get_reg(g, self.REG_PC)
85 def check_pc(self, g, addr): argument
86 pc = self.get_pc(g)
91 def gdb_step(g): argument
92 g.cmd(b's', b'T05thread:01;')
95 def gdb_bstep(g): argument
96 g.cmd(b'bs', b'T05thread:01;')
132 g = gdb.GDBRemote('127.0.0.1', port, False, False)
133 g.connect()
134 r = g.cmd(b'qSupported')
136 g.cmd(b'qXfer:features:read:target.xml:0,ffb')
146 pc = self.get_pc(g)
149 self.gdb_step(g)
154 self.gdb_bstep(g)
155 self.check_pc(g, addr)
161 self.check_pc(g, addr)
162 self.gdb_step(g)
169 g.cmd(b'Z1,%x,1' % addr, b'OK')
178 g.cmd(b'c')
183 (self.get_pc(g), self.vm_get_icount(vm)))
187 g.cmd(b'bc', b'T05thread:01;')
191 self.check_pc(g, steps[-1])
204 def get_pc(self, g): argument
205 return self.get_reg_le(g, self.REG_PC) \
206 + self.get_reg_le(g, self.REG_CS) * 0x10