uwx_self.h revision 121642
1/*
2Copyright (c) 2003 Hewlett-Packard Development Company, L.P.
3Permission is hereby granted, free of charge, to any person
4obtaining a copy of this software and associated documentation
5files (the "Software"), to deal in the Software without
6restriction, including without limitation the rights to use,
7copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the
9Software is furnished to do so, subject to the following
10conditions:
11
12The above copyright notice and this permission notice shall be
13included in all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22OTHER DEALINGS IN THE SOFTWARE.
23*/
24
25#ifndef _KERNEL
26#include <signal.h>
27#endif
28
29struct uwx_self_info;
30
31extern struct uwx_self_info *uwx_self_init_info(struct uwx_env *env);
32
33extern int uwx_self_free_info(struct uwx_self_info *info);
34
35extern int uwx_self_init_context(struct uwx_env *env);
36
37extern int uwx_self_init_from_sigcontext(
38    struct uwx_env *env,
39    struct uwx_self_info *info,
40    ucontext_t *ucontext);
41
42extern int uwx_self_do_context_frame(
43    struct uwx_env *env,
44    struct uwx_self_info *info);
45
46extern int uwx_self_copyin(
47    int request,
48    char *loc,
49    uint64_t rem,
50    int len,
51    intptr_t tok);
52
53extern int uwx_self_lookupip(
54    int request,
55    uint64_t ip,
56    intptr_t tok,
57    uint64_t **resultp);
58
59#define UWX_SELF_ERR_BADABICONTEXT  (-101)
60