1287472b3SEd Maste /* $NetBSD: execinfo.h,v 1.2 2012/06/09 21:22:17 christos Exp $ */ 2*e7fec5c3SEd Maste /* $FreeBSD$ */ 3287472b3SEd Maste 4287472b3SEd Maste /*- 5287472b3SEd Maste * Copyright (c) 2012 The NetBSD Foundation, Inc. 6287472b3SEd Maste * All rights reserved. 7287472b3SEd Maste * 8287472b3SEd Maste * This code is derived from software contributed to The NetBSD Foundation 9287472b3SEd Maste * by Christos Zoulas. 10287472b3SEd Maste * 11287472b3SEd Maste * Redistribution and use in source and binary forms, with or without 12287472b3SEd Maste * modification, are permitted provided that the following conditions 13287472b3SEd Maste * are met: 14287472b3SEd Maste * 1. Redistributions of source code must retain the above copyright 15287472b3SEd Maste * notice, this list of conditions and the following disclaimer. 16287472b3SEd Maste * 2. Redistributions in binary form must reproduce the above copyright 17287472b3SEd Maste * notice, this list of conditions and the following disclaimer in the 18287472b3SEd Maste * documentation and/or other materials provided with the distribution. 19287472b3SEd Maste * 20287472b3SEd Maste * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 21287472b3SEd Maste * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22287472b3SEd Maste * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23287472b3SEd Maste * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 24287472b3SEd Maste * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25287472b3SEd Maste * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26287472b3SEd Maste * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27287472b3SEd Maste * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28287472b3SEd Maste * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29287472b3SEd Maste * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30287472b3SEd Maste * POSSIBILITY OF SUCH DAMAGE. 31287472b3SEd Maste */ 32287472b3SEd Maste #ifndef _EXECINFO_H_ 33287472b3SEd Maste #define _EXECINFO_H_ 34287472b3SEd Maste 35287472b3SEd Maste #include <stddef.h> 36287472b3SEd Maste 37287472b3SEd Maste __BEGIN_DECLS 38287472b3SEd Maste size_t backtrace(void **, size_t); 39287472b3SEd Maste char **backtrace_symbols(void *const *, size_t); 40287472b3SEd Maste int backtrace_symbols_fd(void *const *, size_t, int); 41287472b3SEd Maste char **backtrace_symbols_fmt(void *const *, size_t, const char *); 42287472b3SEd Maste int backtrace_symbols_fd_fmt(void *const *, size_t, int, const char *); 43287472b3SEd Maste __END_DECLS 44287472b3SEd Maste 45287472b3SEd Maste #endif /* _EXECINFO_H_ */ 46