Resume the process that's associated with the file descriptor, if it has previously been stopped.
You must have opened the file descriptor for writing. To stop the process, use DCMD_PROC_STOP .
The DCMD_PROC_RUN command also lets you set the "points of interest" (that is, signals or faults you want to stop on) and other run flags (that is, instruction pointer or single-step).
The argument is a pointer to a procfs_run structure (see debug_run_t in <sys/debug.h>). This structure is passed on as control information to the process before it resumes. For example:
procfs_run run; memset( &run, 0, sizeof(run) ); run.flags |= _DEBUG_RUN_CLRFLT | _DEBUG_RUN_CLRSIG; devctl( fd, DCMD_PROC_RUN, &run, sizeof(run), 0);
The procfs_run or debug_run_t structure is defined as follows:
typedef struct _debug_run {
uint32_t flags;
pthread_t tid;
sigset_t trace;
sigset_t hold;
fltset_t fault;
uintptr_t ip;
} debug_run_t;
The members include:
Use sigemptyset() and sigaddset() to build the set of signals or faults for the trace, hold and fault members.