xref: /openbsd-src/gnu/lib/libexecinfo/execinfo.h (revision 771fbea0148a7fe458cf2c657edb98b32659f150)
1*771fbea0Smortimer /*	$OpenBSD: execinfo.h,v 1.1 2021/06/09 19:37:43 mortimer Exp $	*/
2*771fbea0Smortimer 
3*771fbea0Smortimer /*-
4*771fbea0Smortimer  * Copyright (c) 2012 The NetBSD Foundation, Inc.
5*771fbea0Smortimer  * All rights reserved.
6*771fbea0Smortimer  *
7*771fbea0Smortimer  * This code is derived from software contributed to The NetBSD Foundation
8*771fbea0Smortimer  * by Christos Zoulas.
9*771fbea0Smortimer  *
10*771fbea0Smortimer  * Redistribution and use in source and binary forms, with or without
11*771fbea0Smortimer  * modification, are permitted provided that the following conditions
12*771fbea0Smortimer  * are met:
13*771fbea0Smortimer  * 1. Redistributions of source code must retain the above copyright
14*771fbea0Smortimer  *    notice, this list of conditions and the following disclaimer.
15*771fbea0Smortimer  * 2. Redistributions in binary form must reproduce the above copyright
16*771fbea0Smortimer  *    notice, this list of conditions and the following disclaimer in the
17*771fbea0Smortimer  *    documentation and/or other materials provided with the distribution.
18*771fbea0Smortimer  *
19*771fbea0Smortimer  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*771fbea0Smortimer  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*771fbea0Smortimer  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*771fbea0Smortimer  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*771fbea0Smortimer  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*771fbea0Smortimer  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*771fbea0Smortimer  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*771fbea0Smortimer  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*771fbea0Smortimer  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*771fbea0Smortimer  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*771fbea0Smortimer  * POSSIBILITY OF SUCH DAMAGE.
30*771fbea0Smortimer  */
31*771fbea0Smortimer #ifndef _EXECINFO_H_
32*771fbea0Smortimer #define _EXECINFO_H_
33*771fbea0Smortimer 
34*771fbea0Smortimer #include <sys/cdefs.h>
35*771fbea0Smortimer #include <stddef.h>
36*771fbea0Smortimer 
37*771fbea0Smortimer __BEGIN_DECLS
38*771fbea0Smortimer size_t backtrace(void **, size_t);
39*771fbea0Smortimer char **backtrace_symbols(void *const *, size_t);
40*771fbea0Smortimer int backtrace_symbols_fd(void *const *, size_t, int);
41*771fbea0Smortimer char **backtrace_symbols_fmt(void *const *, size_t, const char *);
42*771fbea0Smortimer int backtrace_symbols_fd_fmt(void *const *, size_t, int, const char *);
43*771fbea0Smortimer __END_DECLS
44*771fbea0Smortimer 
45*771fbea0Smortimer #endif /* _EXECINFO_H_ */
46