def_check_t_bit(self):# Make sure the thumb bit is set in XPSR in case the reset handler# points to an invalid address. Only do this if the core is actually halted, otherwise we# can't access XPSR.ifself.get_state()==Target.State.HALTED:xpsr=self.read_core_register_raw('xpsr')ifxpsr&self.XPSR_THUMB==0:self.write_core_register('xpsr',xpsr|self.XPSR_THUMB)LOG.warning("T bit in XPSR is invalid; the vector table may be invalid or corrupt")