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