Lines Matching refs:m_state
101 return arm_thread_state64_get_pc(m_state.context.gpr); in GetPC()
103 return m_state.context.gpr.__pc; in GetPC()
119 arm_thread_state64_set_pc_fptr (m_state.context.gpr, (void*) value); in SetPC()
121 m_state.context.gpr.__pc = value; in SetPC()
132 return arm_thread_state64_get_sp(m_state.context.gpr); in GetSP()
134 return m_state.context.gpr.__sp; in GetSP()
142 if (!force && m_state.GetError(set, Read) == KERN_SUCCESS) in GetGPRState()
149 (thread_state_t)&m_state.context.gpr, &count); in GetGPRState()
151 uint64_t *x = &m_state.context.gpr.__x[0]; in GetGPRState()
154 uint64_t log_fp = arm_thread_state64_get_fp(m_state.context.gpr); in GetGPRState()
155 uint64_t log_lr = arm_thread_state64_get_lr(m_state.context.gpr); in GetGPRState()
156 uint64_t log_sp = arm_thread_state64_get_sp(m_state.context.gpr); in GetGPRState()
157 uint64_t log_pc = arm_thread_state64_get_pc(m_state.context.gpr); in GetGPRState()
159 uint64_t log_fp = m_state.context.gpr.__fp; in GetGPRState()
160 uint64_t log_lr = m_state.context.gpr.__lr; in GetGPRState()
161 uint64_t log_sp = m_state.context.gpr.__sp; in GetGPRState()
162 uint64_t log_pc = m_state.context.gpr.__pc; in GetGPRState()
204 log_fp, log_lr, log_sp, log_pc, m_state.context.gpr.__cpsr); in GetGPRState()
206 m_state.SetError(set, Read, kret); in GetGPRState()
213 if (!force && m_state.GetError(set, Read) == KERN_SUCCESS) in GetVFPState()
220 (thread_state_t)&m_state.context.vfp, &count); in GetVFPState()
260 ((uint64_t *)&m_state.context.vfp.__v[0])[0], in GetVFPState()
261 ((uint64_t *)&m_state.context.vfp.__v[0])[1], in GetVFPState()
262 ((uint64_t *)&m_state.context.vfp.__v[1])[0], in GetVFPState()
263 ((uint64_t *)&m_state.context.vfp.__v[1])[1], in GetVFPState()
264 ((uint64_t *)&m_state.context.vfp.__v[2])[0], in GetVFPState()
265 ((uint64_t *)&m_state.context.vfp.__v[2])[1], in GetVFPState()
266 ((uint64_t *)&m_state.context.vfp.__v[3])[0], in GetVFPState()
267 ((uint64_t *)&m_state.context.vfp.__v[3])[1], in GetVFPState()
268 ((uint64_t *)&m_state.context.vfp.__v[4])[0], in GetVFPState()
269 ((uint64_t *)&m_state.context.vfp.__v[4])[1], in GetVFPState()
270 ((uint64_t *)&m_state.context.vfp.__v[5])[0], in GetVFPState()
271 ((uint64_t *)&m_state.context.vfp.__v[5])[1], in GetVFPState()
272 ((uint64_t *)&m_state.context.vfp.__v[6])[0], in GetVFPState()
273 ((uint64_t *)&m_state.context.vfp.__v[6])[1], in GetVFPState()
274 ((uint64_t *)&m_state.context.vfp.__v[7])[0], in GetVFPState()
275 ((uint64_t *)&m_state.context.vfp.__v[7])[1], in GetVFPState()
276 ((uint64_t *)&m_state.context.vfp.__v[8])[0], in GetVFPState()
277 ((uint64_t *)&m_state.context.vfp.__v[8])[1], in GetVFPState()
278 ((uint64_t *)&m_state.context.vfp.__v[9])[0], in GetVFPState()
279 ((uint64_t *)&m_state.context.vfp.__v[9])[1], in GetVFPState()
280 ((uint64_t *)&m_state.context.vfp.__v[10])[0], in GetVFPState()
281 ((uint64_t *)&m_state.context.vfp.__v[10])[1], in GetVFPState()
282 ((uint64_t *)&m_state.context.vfp.__v[11])[0], in GetVFPState()
283 ((uint64_t *)&m_state.context.vfp.__v[11])[1], in GetVFPState()
284 ((uint64_t *)&m_state.context.vfp.__v[12])[0], in GetVFPState()
285 ((uint64_t *)&m_state.context.vfp.__v[12])[1], in GetVFPState()
286 ((uint64_t *)&m_state.context.vfp.__v[13])[0], in GetVFPState()
287 ((uint64_t *)&m_state.context.vfp.__v[13])[1], in GetVFPState()
288 ((uint64_t *)&m_state.context.vfp.__v[14])[0], in GetVFPState()
289 ((uint64_t *)&m_state.context.vfp.__v[14])[1], in GetVFPState()
290 ((uint64_t *)&m_state.context.vfp.__v[15])[0], in GetVFPState()
291 ((uint64_t *)&m_state.context.vfp.__v[15])[1], in GetVFPState()
292 ((uint64_t *)&m_state.context.vfp.__v[16])[0], in GetVFPState()
293 ((uint64_t *)&m_state.context.vfp.__v[16])[1], in GetVFPState()
294 ((uint64_t *)&m_state.context.vfp.__v[17])[0], in GetVFPState()
295 ((uint64_t *)&m_state.context.vfp.__v[17])[1], in GetVFPState()
296 ((uint64_t *)&m_state.context.vfp.__v[18])[0], in GetVFPState()
297 ((uint64_t *)&m_state.context.vfp.__v[18])[1], in GetVFPState()
298 ((uint64_t *)&m_state.context.vfp.__v[19])[0], in GetVFPState()
299 ((uint64_t *)&m_state.context.vfp.__v[19])[1], in GetVFPState()
300 ((uint64_t *)&m_state.context.vfp.__v[20])[0], in GetVFPState()
301 ((uint64_t *)&m_state.context.vfp.__v[20])[1], in GetVFPState()
302 ((uint64_t *)&m_state.context.vfp.__v[21])[0], in GetVFPState()
303 ((uint64_t *)&m_state.context.vfp.__v[21])[1], in GetVFPState()
304 ((uint64_t *)&m_state.context.vfp.__v[22])[0], in GetVFPState()
305 ((uint64_t *)&m_state.context.vfp.__v[22])[1], in GetVFPState()
306 ((uint64_t *)&m_state.context.vfp.__v[23])[0], in GetVFPState()
307 ((uint64_t *)&m_state.context.vfp.__v[23])[1], in GetVFPState()
308 ((uint64_t *)&m_state.context.vfp.__v[24])[0], in GetVFPState()
309 ((uint64_t *)&m_state.context.vfp.__v[24])[1], in GetVFPState()
310 ((uint64_t *)&m_state.context.vfp.__v[25])[0], in GetVFPState()
311 ((uint64_t *)&m_state.context.vfp.__v[25])[1], in GetVFPState()
312 ((uint64_t *)&m_state.context.vfp.__v[26])[0], in GetVFPState()
313 ((uint64_t *)&m_state.context.vfp.__v[26])[1], in GetVFPState()
314 ((uint64_t *)&m_state.context.vfp.__v[27])[0], in GetVFPState()
315 ((uint64_t *)&m_state.context.vfp.__v[27])[1], in GetVFPState()
316 ((uint64_t *)&m_state.context.vfp.__v[28])[0], in GetVFPState()
317 ((uint64_t *)&m_state.context.vfp.__v[28])[1], in GetVFPState()
318 ((uint64_t *)&m_state.context.vfp.__v[29])[0], in GetVFPState()
319 ((uint64_t *)&m_state.context.vfp.__v[29])[1], in GetVFPState()
320 ((uint64_t *)&m_state.context.vfp.__v[30])[0], in GetVFPState()
321 ((uint64_t *)&m_state.context.vfp.__v[30])[1], in GetVFPState()
322 ((uint64_t *)&m_state.context.vfp.__v[31])[0], in GetVFPState()
323 ((uint64_t *)&m_state.context.vfp.__v[31])[1], in GetVFPState()
324 m_state.context.vfp.__fpsr, m_state.context.vfp.__fpcr); in GetVFPState()
327 m_state.SetError(set, Read, kret); in GetVFPState()
334 if (!force && m_state.GetError(set, Read) == KERN_SUCCESS) in GetEXCState()
341 (thread_state_t)&m_state.context.exc, &count); in GetEXCState()
342 m_state.SetError(set, Read, kret); in GetEXCState()
361 if (!force && m_state.GetError(set, Read) == KERN_SUCCESS) in GetDBGState()
368 (thread_state_t)&m_state.dbg, &count); in GetDBGState()
369 m_state.SetError(set, Read, kret); in GetDBGState()
378 (thread_state_t)&m_state.context.gpr, e_regSetGPRCount); in SetGPRState()
379 m_state.SetError(set, Write, in SetGPRState()
381 m_state.InvalidateRegisterSetState(set); // Invalidate the current register in SetGPRState()
391 (thread_state_t)&m_state.context.vfp, e_regSetVFPCount); in SetVFPState()
392 m_state.SetError(set, Write, in SetVFPState()
394 m_state.InvalidateRegisterSetState(set); // Invalidate the current register in SetVFPState()
404 (thread_state_t)&m_state.context.exc, e_regSetEXCCount); in SetEXCState()
405 m_state.SetError(set, Write, in SetEXCState()
407 m_state.InvalidateRegisterSetState(set); // Invalidate the current register in SetEXCState()
417 (thread_state_t)&m_state.dbg, e_regSetDBGCount); in SetDBGState()
421 (thread_state_t)&m_state.dbg, e_regSetDBGCount); in SetDBGState()
428 m_state.SetError(set, Write, in SetDBGState()
430 m_state.InvalidateRegisterSetState(set); // Invalidate the current register in SetDBGState()
450 !IsWatchpointEnabled(m_state.dbg, m_watchpoint_hw_index)) { in ThreadWillResume()
562 m_state.InvalidateAllRegisterStates(); in ThreadDidStop()
621 uint64_t pc = arm_thread_state64_get_pc (m_state.context.gpr); in EnableHardwareSingleStep()
623 uint64_t pc = m_state.context.gpr.__pc; in EnableHardwareSingleStep()
630 m_state.dbg.__mdscr_el1 |= SS_ENABLE; in EnableHardwareSingleStep()
635 m_state.dbg.__mdscr_el1 &= ~(SS_ENABLE); in EnableHardwareSingleStep()
761 if ((m_state.dbg.__bcr[i] & BCR_ENABLE) == 0) in EnableHardwareBreakpoint()
767 m_state.dbg.__bvr[i] = aligned_bp_address; in EnableHardwareBreakpoint()
768 m_state.dbg.__bcr[i] = control_value; in EnableHardwareBreakpoint()
774 (uint64_t)m_state.dbg.__bvr[i], in EnableHardwareBreakpoint()
775 (uint32_t)m_state.dbg.__bcr[i]); in EnableHardwareBreakpoint()
913 if ((m_state.dbg.__wcr[i] & WCR_ENABLE) == 0) in EnableHardwareWatchpoint()
929 m_state.dbg.__wvr[i] = aligned_wp_address; // DVA (Data Virtual Address) in EnableHardwareWatchpoint()
930 m_state.dbg.__wcr[i] = byte_address_select | // Which bytes that follow in EnableHardwareWatchpoint()
941 (uint64_t)m_state.dbg.__wvr[i], (uint32_t)m_state.dbg.__wcr[i]); in EnableHardwareWatchpoint()
987 m_state.dbg.__wvr[hw_index] = m_disabled_watchpoints[hw_index].addr; in ReenableHardwareWatchpoint_helper()
988 m_state.dbg.__wcr[hw_index] = m_disabled_watchpoints[hw_index].control; in ReenableHardwareWatchpoint_helper()
993 hw_index, hw_index, (uint64_t)m_state.dbg.__wvr[hw_index], in ReenableHardwareWatchpoint_helper()
994 hw_index, (uint64_t)m_state.dbg.__wcr[hw_index]); in ReenableHardwareWatchpoint_helper()
1024 m_disabled_watchpoints[hw_index].addr = m_state.dbg.__wvr[hw_index]; in DisableHardwareWatchpoint_helper()
1025 m_disabled_watchpoints[hw_index].control = m_state.dbg.__wcr[hw_index]; in DisableHardwareWatchpoint_helper()
1027 m_state.dbg.__wcr[hw_index] &= ~((nub_addr_t)WCR_ENABLE); in DisableHardwareWatchpoint_helper()
1031 hw_index, hw_index, (uint64_t)m_state.dbg.__wvr[hw_index], in DisableHardwareWatchpoint_helper()
1032 hw_index, (uint64_t)m_state.dbg.__wcr[hw_index]); in DisableHardwareWatchpoint_helper()
1049 m_disabled_breakpoints[hw_index].addr = m_state.dbg.__bvr[hw_index]; in DisableHardwareBreakpoint()
1050 m_disabled_breakpoints[hw_index].control = m_state.dbg.__bcr[hw_index]; in DisableHardwareBreakpoint()
1052 m_state.dbg.__bcr[hw_index] = 0; in DisableHardwareBreakpoint()
1057 hw_index, hw_index, (uint64_t)m_state.dbg.__bvr[hw_index], in DisableHardwareBreakpoint()
1058 hw_index, (uint64_t)m_state.dbg.__bcr[hw_index]); in DisableHardwareBreakpoint()
1096 DBG &debug_state = m_state.dbg; in GetHardwareWatchpointHit()
1137 if (IsWatchpointEnabled(m_state.dbg, hw_index)) in GetWatchpointAddressByIndex()
1138 return GetWatchAddress(m_state.dbg, hw_index); in GetWatchpointAddressByIndex()
1997 value->value.uint64 = arm_thread_state64_get_pc (m_state.context.gpr); in GetRegisterValue()
1999 value->value.uint64 = arm_thread_state64_get_lr (m_state.context.gpr); in GetRegisterValue()
2001 value->value.uint64 = arm_thread_state64_get_sp (m_state.context.gpr); in GetRegisterValue()
2003 value->value.uint64 = arm_thread_state64_get_fp (m_state.context.gpr); in GetRegisterValue()
2005 value->value.uint64 = m_state.context.gpr.__x[reg]; in GetRegisterValue()
2007 value->value.uint64 = m_state.context.gpr.__x[reg]; in GetRegisterValue()
2011 value->value.uint32 = m_state.context.gpr.__cpsr; in GetRegisterValue()
2020 memcpy(&value->value.v_uint8, &m_state.context.vfp.__v[reg - vfp_v0], in GetRegisterValue()
2024 ((uint8_t *)&m_state.context.vfp.opaque) + ((reg - vfp_v0) * 16), in GetRegisterValue()
2030 memcpy(&value->value.uint32, &m_state.context.vfp.__fpsr, 4); in GetRegisterValue()
2033 ((uint8_t *)&m_state.context.vfp.opaque) + (32 * 16) + 0, 4); in GetRegisterValue()
2038 memcpy(&value->value.uint32, &m_state.context.vfp.__fpcr, 4); in GetRegisterValue()
2041 ((uint8_t *)&m_state.context.vfp.opaque) + (32 * 16) + 4, 4); in GetRegisterValue()
2046 memcpy(&value->value.v_uint8, &m_state.context.vfp.__v[reg - vfp_s0], in GetRegisterValue()
2050 ((uint8_t *)&m_state.context.vfp.opaque) + ((reg - vfp_s0) * 16), in GetRegisterValue()
2056 memcpy(&value->value.v_uint8, &m_state.context.vfp.__v[reg - vfp_d0], in GetRegisterValue()
2060 ((uint8_t *)&m_state.context.vfp.opaque) + ((reg - vfp_d0) * 16), in GetRegisterValue()
2069 value->value.uint64 = m_state.context.exc.__far; in GetRegisterValue()
2072 value->value.uint32 = m_state.context.exc.__esr; in GetRegisterValue()
2075 value->value.uint32 = m_state.context.exc.__exception; in GetRegisterValue()
2107 arm_thread_state64_set_pc_fptr (m_state.context.gpr, (void*) signed_value); in SetRegisterValue()
2109 arm_thread_state64_set_lr_fptr (m_state.context.gpr, (void*) signed_value); in SetRegisterValue()
2111 arm_thread_state64_set_sp (m_state.context.gpr, value->value.uint64); in SetRegisterValue()
2113 arm_thread_state64_set_fp (m_state.context.gpr, value->value.uint64); in SetRegisterValue()
2115 m_state.context.gpr.__x[reg] = value->value.uint64; in SetRegisterValue()
2117 m_state.context.gpr.__x[reg] = value->value.uint64; in SetRegisterValue()
2121 m_state.context.gpr.__cpsr = value->value.uint32; in SetRegisterValue()
2129 memcpy(&m_state.context.vfp.__v[reg - vfp_v0], &value->value.v_uint8, in SetRegisterValue()
2132 memcpy(((uint8_t *)&m_state.context.vfp.opaque) + ((reg - vfp_v0) * 16), in SetRegisterValue()
2138 memcpy(&m_state.context.vfp.__fpsr, &value->value.uint32, 4); in SetRegisterValue()
2140 memcpy(((uint8_t *)&m_state.context.vfp.opaque) + (32 * 16) + 0, in SetRegisterValue()
2146 memcpy(&m_state.context.vfp.__fpcr, &value->value.uint32, 4); in SetRegisterValue()
2148 memcpy(((uint8_t *)m_state.context.vfp.opaque) + (32 * 16) + 4, in SetRegisterValue()
2154 memcpy(&m_state.context.vfp.__v[reg - vfp_s0], &value->value.v_uint8, in SetRegisterValue()
2157 memcpy(((uint8_t *)&m_state.context.vfp.opaque) + ((reg - vfp_s0) * 16), in SetRegisterValue()
2163 memcpy(&m_state.context.vfp.__v[reg - vfp_d0], &value->value.v_uint8, in SetRegisterValue()
2166 memcpy(((uint8_t *)&m_state.context.vfp.opaque) + ((reg - vfp_d0) * 16), in SetRegisterValue()
2175 m_state.context.exc.__far = value->value.uint64; in SetRegisterValue()
2178 m_state.context.exc.__esr = value->value.uint32; in SetRegisterValue()
2181 m_state.context.exc.__exception = value->value.uint32; in SetRegisterValue()
2235 return m_state.RegsAreValid(set); in RegisterSetStateIsValid()
2239 nub_size_t size = sizeof(m_state.context.gpr) + sizeof(m_state.context.vfp) + in GetRegisterContext()
2240 sizeof(m_state.context.exc); in GetRegisterContext()
2253 ::memcpy(p, &m_state.context.gpr, sizeof(m_state.context.gpr)); in GetRegisterContext()
2254 p += sizeof(m_state.context.gpr); in GetRegisterContext()
2255 ::memcpy(p, &m_state.context.vfp, sizeof(m_state.context.vfp)); in GetRegisterContext()
2256 p += sizeof(m_state.context.vfp); in GetRegisterContext()
2257 ::memcpy(p, &m_state.context.exc, sizeof(m_state.context.exc)); in GetRegisterContext()
2258 p += sizeof(m_state.context.exc); in GetRegisterContext()
2274 nub_size_t size = sizeof(m_state.context.gpr) + sizeof(m_state.context.vfp) + in SetRegisterContext()
2275 sizeof(m_state.context.exc); in SetRegisterContext()
2287 ::memcpy(&m_state.context.gpr, p, sizeof(m_state.context.gpr)); in SetRegisterContext()
2288 p += sizeof(m_state.context.gpr); in SetRegisterContext()
2289 ::memcpy(&m_state.context.vfp, p, sizeof(m_state.context.vfp)); in SetRegisterContext()
2290 p += sizeof(m_state.context.vfp); in SetRegisterContext()
2291 ::memcpy(&m_state.context.exc, p, sizeof(m_state.context.exc)); in SetRegisterContext()
2292 p += sizeof(m_state.context.exc); in SetRegisterContext()
2328 m_saved_register_states[save_id] = m_state.context; in SaveRegisterState()
2337 m_state.context.gpr = pos->second.gpr; in RestoreRegisterState()
2338 m_state.context.vfp = pos->second.vfp; in RestoreRegisterState()