Get the information stored in the alternate register set for the process associated with the file descriptor.
#include <sys/procfs.h> #define DCMD_PROC_GETALTREG __DIOF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 21, procfs_fpreg)
The arguments to devctl() are:
Argument | Value |
---|---|
filedes | A file descriptor for the process. |
dcmd | DCMD_PROC_GETALTREG |
dev_data_ptr | A pointer to a procfs_fpreg structure |
n_bytes | sizeof(procfs_fpreg) |
dev_info_ptr | NULL, or a pointer to an integer where the size of the register set can be stored |
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, ®, sizeof(reg), ®size);
To set the alternate register set, use DCMD_PROC_SETALTREG.