Get the information stored in the Floating Point Data registers for the process associated with the file descriptor.

#include <sys/procfs.h>


The arguments to devctl() are:

Argument Value
filedes A file descriptor for the process.
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 data 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 size of the data. For example:

procfs_fpreg my_fpreg;

devctl( fd, DCMD_PROC_GETFPREG, my_fpreg, sizeof(procfs_fpreg), &size);
Note: If the thread hasn't used any floating-point arithmetic, the read may fail because an FPU context has not yet been allocated.

To set the Floating Point Data registers, use DCMD_PROC_SETFPREG.