Plwp_stack, Plwp_alt_stack, Plwp_main_stack - retrieve stack information for a victim process
#include <libproc.h>
int Plwp_stack(ps_prochandle_t *Pr, lwpid_t lwpid, stack_t *stkp);
int Plwp_alt_stack(ps_prochandle_t *Pr, lwpid_t lwpid, stack_t *stkp);
int Plwp_main_stack(ps_prochandle_t *Pr, lwpid_t lwpid, stack_t *stkp);
The Pr argument identifies a victim process or core file attached to the controlling process by the create and grab interfaces. For more information, see the Pcreate(3PROC) and Pgrab(3PROC) man pages. The lwpid argument identifies one of the lwps in the victim process, and the stkp argument identifies the result buffer.
The Plwp_stack() function returns the current stack information for the specified lwp in the stkp argument.
The Plwp_alt_stack() function returns the alternate stack information for the specified lwp in the stkp argument, whether or not it is currently executing on that stack.
The Plwp_main_stack() function returns the primary stack information for the specified lwp in the stkp argument, whether or not it is currently executing on that stack.
On successful completion, all of these functions return 0. On error, they return -1 and set errno to indicate the error.
On failure, these errno values may be set:
Process has been lost to control, needs the Preopen() function
No such lwp
See attributes(7) for descriptions of the following attributes:
|
libproc.h(3HEAD), libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), proc(5)