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