DCMD_PROC_GETREGSET

Read the given register set.

#include <sys/procfs.h>

#define DCMD_PROC_GETREGSET  __DIOTF(_DCMD_PROC, __PROC_SUBCMD_PROCFS + 25, procfs_regset)

The arguments to devctl() are:

Argument Value
filedes A file descriptor for the process.
dcmd DCMD_PROC_GETREGSET
dev_data_ptr A pointer to a procfs_regset structure
n_bytes sizeof(procfs_regset)
dev_info_ptr NULL

The argument is a pointer to a procfs_regset structure that's filled in with the required information on return. For example:

procfs_regset regset;

regset.id = REGSET_PERFREGS;
devctl( fd, DCMD_PROC_GETREGSET, &regset, sizeof(regset), NULL );

To set a given register set, use DCMD_PROC_SETREGSET.