1 PSTACK_ITER(3PROC) Process Control Library Functions PSTACK_ITER(3PROC)
2
3 NAME
4 Pstack_iter - iterate process stack frames
5
6 SYNOPSIS
7 Process Control Library (libproc, -lproc)
8 #include <libproc.h>
9
10 int
11 Pstack_iter(struct ps_prochandle *P, const prgregset_t regs,
12 proc_stack_f *func, void *data);
13
14 DESCRIPTION
15 The Pstack_iter() function iterates over the stack frames in the process
16 P starting at the point defined by regs.
17
18 For each valid stack frame encountered, the callback function func is
19 invoked with data passed as argument. The full signature of proc_stack_f
20 is defined in libproc(3LIB). With each callback, a register set,
21 argument set, and argument count will be provided. In that register set,
22 only a subset of the registers will be valid, which include the frame
23 pointer, program counter, and on SPARC systems, the next program counter.
24 These registers can be accessed with the constants R_FP, R_PC, and R_nPC
25 respectively. These correspond to the registers %ebp and %eip on i386,
26 %rbp and %rip on amd64, %fp, %pc, and %npc on both SPARC and SPARCv9.
27
|
1 PSTACK_ITER(3PROC) Process Control Library Functions PSTACK_ITER(3PROC)
2
3 NAME
4 Pstack_iter - iterate process stack frames
5
6 LIBRARY
7 Process Control Library (libproc, -lproc)
8
9 SYNOPSIS
10 #include <libproc.h>
11
12 int
13 Pstack_iter(struct ps_prochandle *P, const prgregset_t regs,
14 proc_stack_f *func, void *data);
15
16 DESCRIPTION
17 The Pstack_iter() function iterates over the stack frames in the process
18 P starting at the point defined by regs.
19
20 For each valid stack frame encountered, the callback function func is
21 invoked with data passed as argument. The full signature of proc_stack_f
22 is defined in libproc(3LIB). With each callback, a register set,
23 argument set, and argument count will be provided. In that register set,
24 only a subset of the registers will be valid, which include the frame
25 pointer, program counter, and on SPARC systems, the next program counter.
26 These registers can be accessed with the constants R_FP, R_PC, and R_nPC
27 respectively. These correspond to the registers %ebp and %eip on i386,
28 %rbp and %rip on amd64, %fp, %pc, and %npc on both SPARC and SPARCv9.
29
|