xref: /illumos-gate/usr/src/head/execinfo.h (revision ba3594ba9b5dd4c846c472a8d657edcb7c8109ac)
1f151e4bfSbarts /*
2f151e4bfSbarts  * CDDL HEADER START
3f151e4bfSbarts  *
4f151e4bfSbarts  * The contents of this file are subject to the terms of the
5f151e4bfSbarts  * Common Development and Distribution License (the "License").
6f151e4bfSbarts  * You may not use this file except in compliance with the License.
7f151e4bfSbarts  *
8f151e4bfSbarts  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f151e4bfSbarts  * or http://www.opensolaris.org/os/licensing.
10f151e4bfSbarts  * See the License for the specific language governing permissions
11f151e4bfSbarts  * and limitations under the License.
12f151e4bfSbarts  *
13f151e4bfSbarts  * When distributing Covered Code, include this CDDL HEADER in each
14f151e4bfSbarts  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15f151e4bfSbarts  * If applicable, add the following below this CDDL HEADER, with the
16f151e4bfSbarts  * fields enclosed by brackets "[]" replaced with your own identifying
17f151e4bfSbarts  * information: Portions Copyright [yyyy] [name of copyright owner]
18f151e4bfSbarts  *
19f151e4bfSbarts  * CDDL HEADER END
20f151e4bfSbarts  */
21f151e4bfSbarts /*
22*ba3594baSGarrett D'Amore  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23*ba3594baSGarrett D'Amore  *
24f151e4bfSbarts  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25f151e4bfSbarts  * Use is subject to license terms.
26f151e4bfSbarts  */
27f151e4bfSbarts 
28f151e4bfSbarts #ifndef	_EXECINFO_H
29f151e4bfSbarts #define	_EXECINFO_H
30f151e4bfSbarts 
31f151e4bfSbarts /*
32f151e4bfSbarts  * These functions provide glibc-compatible backtrace functionality.
33f151e4bfSbarts  * Improved functionality is available using Solaris-specific APIs;
34f151e4bfSbarts  * see man page for walkcontext(), printstack() and addtosymstr().
35f151e4bfSbarts  */
36f151e4bfSbarts #ifdef	__cplusplus
37f151e4bfSbarts extern "C" {
38f151e4bfSbarts #endif
39f151e4bfSbarts 
40f151e4bfSbarts extern int backtrace(void **, int);
41f151e4bfSbarts extern char **backtrace_symbols(void *const *, int);
42f151e4bfSbarts extern void backtrace_symbols_fd(void *const *, int, int);
43f151e4bfSbarts 
44f151e4bfSbarts #ifdef	__cplusplus
45f151e4bfSbarts }
46f151e4bfSbarts #endif
47f151e4bfSbarts 
48f151e4bfSbarts #endif /* _EXECINFO_H */
49