Path: blob/master/thirdparty/libbacktrace/backtrace-supported.h
9905 views
/* backtrace-supported.h.in -- Whether stack backtrace is supported.1Copyright (C) 2012-2021 Free Software Foundation, Inc.2Written by Ian Lance Taylor, Google.34Redistribution and use in source and binary forms, with or without5modification, are permitted provided that the following conditions are6met:78(1) Redistributions of source code must retain the above copyright9notice, this list of conditions and the following disclaimer.1011(2) Redistributions in binary form must reproduce the above copyright12notice, this list of conditions and the following disclaimer in13the documentation and/or other materials provided with the14distribution.1516(3) The name of the author may not be used to17endorse or promote products derived from this software without18specific prior written permission.1920THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR21IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED22WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE23DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,24INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES25(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR26SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)27HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,28STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING29IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE30POSSIBILITY OF SUCH DAMAGE. */3132/* The file backtrace-supported.h.in is used by configure to generate33the file backtrace-supported.h. The file backtrace-supported.h may34be #include'd to see whether the backtrace library will be able to35get a backtrace and produce symbolic information. */363738/* BACKTRACE_SUPPORTED will be #define'd as 1 if the backtrace library39should work, 0 if it will not. Libraries may #include this to make40other arrangements. */4142#define BACKTRACE_SUPPORTED 14344/* BACKTRACE_USES_MALLOC will be #define'd as 1 if the backtrace45library will call malloc as it works, 0 if it will call mmap46instead. This may be used to determine whether it is safe to call47the backtrace functions from a signal handler. In general this48only applies to calls like backtrace and backtrace_pcinfo. It does49not apply to backtrace_simple, which never calls malloc. It does50not apply to backtrace_print, which always calls fprintf and51therefore malloc. */5253#define BACKTRACE_USES_MALLOC 15455/* BACKTRACE_SUPPORTS_THREADS will be #define'd as 1 if the backtrace56library is configured with threading support, 0 if not. If this is570, the threaded parameter to backtrace_create_state must be passed58as 0. */5960#define BACKTRACE_SUPPORTS_THREADS 16162/* BACKTRACE_SUPPORTS_DATA will be #defined'd as 1 if the backtrace_syminfo63will work for variables. It will always work for functions. */6465#define BACKTRACE_SUPPORTS_DATA 0666768