1UNW_STEP(3)                  Programming Library                   UNW_STEP(3)
2
3
4

NAME

6       unw_step -- advance to next stack frame
7

SYNOPSIS

9       #include <libunwind.h>
10
11       int unw_step(unw_cursor_t *cp);
12

DESCRIPTION

14       The unw_step() routine advances the unwind cursor cp to the next older,
15       less deeply nested stack frame.
16

RETURN VALUE

18       On successful completion, unw_step() returns a positive  value  if  the
19       updated  cursor  refers  to  a  valid stack frame, or 0 if the previous
20       stack frame was the last frame in the chain.  On  error,  the  negative
21       value of one of the error-codes below is returned.
22

THREAD AND SIGNAL SAFETY

24       unw_step()  is thread-safe. If cursor cp is in the local address-space,
25       this routine is also safe to use from a signal handler.
26

ERRORS

28       UNW_EUNSPEC
29               An unspecified error occurred.
30
31       UNW_ENOINFO
32               Libunwind was unable to locate the unwind-info needed  to  com‐
33              plete the operation.
34
35       UNW_EBADVERSION
36               The  unwind-info needed to complete the operation has a version
37              or a format that is not understood by libunwind.
38
39       UNW_EINVALIDIP
40               The instruction-pointer (``program-counter'') of the next stack
41              frame is invalid (e.g., not properly aligned).
42
43       UNW_EBADFRAME
44               The next stack frame is invalid.
45
46       UNW_ESTOPUNWIND
47               Returned  if  a call to find_proc_info() returned -UNW_ESTOPUN‐
48              WIND.
49
50       In  addition,  unw_step()  may  return  any  error  returned   by   the
51       find_proc_info(), get_dyn_info_list_addr(), access_mem(), access_reg(),
52       or access_fpreg() call-backs (see unw_create_addr_space(3)).
53

SEE ALSO

55       libunwind(3), unw_create_addr_space(3)
56

AUTHOR

58       David Mosberger-Tang
59       Email: dmosberger@gmail.com
60       WWW: http://www.nongnu.org/libunwind/.
61
62
63
64Programming Library             16 August 2007                     UNW_STEP(3)
Impressum