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

NAME

6       unw_init_remote -- initialize cursor for remote unwinding
7

SYNOPSIS

9       #include <libunwind.h>
10
11       int unw_init_remote(unw_cursor_t *c, unw_addr_space_t as, void *arg);
12

DESCRIPTION

14       The  unw_init_remote() routine initializes the unwind cursor pointed to
15       by c for unwinding in the address space identified by as.  The as argu‐
16       ment can either be set to unw_local_addr_space (local address space) or
17       to an arbitrary address space created with unw_create_addr_space().
18
19       The arg void-pointer tells the address space exactly what entity should
20       be  unwound. For example, if unw_local_addr_space is passed in as, then
21       arg needs to be  a  pointer  to  a  context  structure  containing  the
22       machine-state  of the initial stack frame.  However, other address-spa‐
23       ces may instead expect a process-id, a thread-id, or a  pointer  to  an
24       arbitrary  structure  which  identifies  the  stack-frame  chain  to be
25       unwound. In other words, the interpretation of arg is  entirely  depen‐
26       dent  on the address-space in use; libunwind never interprets the argu‐
27       ment in any way on its own.
28
29       Note that unw_init_remote() can be used to initiate  unwinding  in  any
30       process,  including  the  local process in which the unwinder itself is
31       running. However, for local unwinding, it is  generally  preferable  to
32       use  unw_init_local()  instead, because it is easier to use and because
33       it may perform better.
34

RETURN VALUE

36       On successful completion, unw_init_remote() returns 0.   Otherwise  the
37       negative value of one of the error-codes below is returned.
38

THREAD AND SIGNAL SAFETY

40       unw_init_remote()  is thread-safe. If the local address-space is passed
41       in argument as, this routine is also safe to use from a signal handler.
42

ERRORS

44       UNW_EINVAL
45               unw_init_remote() was called in a version  of  libunwind  which
46              supports local unwinding only (this normally happens when defin‐
47              ing UNW_LOCAL_ONLY before including <libunwind.h> and then call‐
48              ing unw_init_remote()).
49
50       UNW_EUNSPEC
51               An unspecified error occurred.
52
53       UNW_EBADREG
54               A register needed by unw_init_remote() wasn't accessible.
55

SEE ALSO

57       libunwind(3), unw_create_addr_space(3), unw_init_local(3)
58

AUTHOR

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