Get the information stored in the alternate register set for the process associated with the file descriptor. The argument is a pointer to a procfs_fpreg structure (see debug_fpreg_t in <sys/debug.h>) that's filled in with the required information on return. If you provide a non-NULL extra argument, it's filled with the actual size of the register set. For example:

procfs_fpreg reg;
int regsize;

devctl( fd, DCMD_PROC_GETALTREG, &reg, sizeof(reg), &regsize);
Note: If the thread hasn't used the alternate register set (e.g. AltiVec registers), the read may fail.

To set the alternate register set, use DCMD_PROC_SETALTREG .