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