armv8_dpm_read_current_registers() function
Read basic registers of the current context: R0 to R15, and CPSR in AArch32 state or R0 to R31, PC and CPSR in AArch64 state; sets the core mode (such as USR or IRQ) and state (such as ARM or Thumb). In normal operation this is called on entry to halting debug state, possibly after some other operations supporting restore of debug state or making sure the CPU is fully idle (drain write buffer, etc).
Syntax
int armv8_dpm_read_current_registers(struct arm_dpm *dpm);