1 1.1 christos /* backtrace-supported.h.in -- Whether stack backtrace is supported. 2 1.1.1.2 christos Copyright (C) 2012-2024 Free Software Foundation, Inc. 3 1.1 christos Written by Ian Lance Taylor, Google. 4 1.1 christos 5 1.1 christos Redistribution and use in source and binary forms, with or without 6 1.1 christos modification, are permitted provided that the following conditions are 7 1.1 christos met: 8 1.1 christos 9 1.1 christos (1) Redistributions of source code must retain the above copyright 10 1.1 christos notice, this list of conditions and the following disclaimer. 11 1.1 christos 12 1.1 christos (2) Redistributions in binary form must reproduce the above copyright 13 1.1 christos notice, this list of conditions and the following disclaimer in 14 1.1 christos the documentation and/or other materials provided with the 15 1.1 christos distribution. 16 1.1 christos 17 1.1 christos (3) The name of the author may not be used to 18 1.1 christos endorse or promote products derived from this software without 19 1.1 christos specific prior written permission. 20 1.1 christos 21 1.1 christos THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 1.1 christos IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 1.1 christos WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 1.1 christos DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 1.1 christos INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 1.1 christos (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 1.1 christos SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 1.1 christos HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 1.1 christos STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 30 1.1 christos IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 1.1 christos POSSIBILITY OF SUCH DAMAGE. */ 32 1.1 christos 33 1.1 christos /* The file backtrace-supported.h.in is used by configure to generate 34 1.1 christos the file backtrace-supported.h. The file backtrace-supported.h may 35 1.1 christos be #include'd to see whether the backtrace library will be able to 36 1.1 christos get a backtrace and produce symbolic information. */ 37 1.1 christos 38 1.1 christos 39 1.1 christos /* BACKTRACE_SUPPORTED will be #define'd as 1 if the backtrace library 40 1.1 christos should work, 0 if it will not. Libraries may #include this to make 41 1.1 christos other arrangements. */ 42 1.1 christos 43 1.1 christos #define BACKTRACE_SUPPORTED @BACKTRACE_SUPPORTED@ 44 1.1 christos 45 1.1 christos /* BACKTRACE_USES_MALLOC will be #define'd as 1 if the backtrace 46 1.1 christos library will call malloc as it works, 0 if it will call mmap 47 1.1 christos instead. This may be used to determine whether it is safe to call 48 1.1 christos the backtrace functions from a signal handler. In general this 49 1.1 christos only applies to calls like backtrace and backtrace_pcinfo. It does 50 1.1 christos not apply to backtrace_simple, which never calls malloc. It does 51 1.1 christos not apply to backtrace_print, which always calls fprintf and 52 1.1 christos therefore malloc. */ 53 1.1 christos 54 1.1 christos #define BACKTRACE_USES_MALLOC @BACKTRACE_USES_MALLOC@ 55 1.1 christos 56 1.1 christos /* BACKTRACE_SUPPORTS_THREADS will be #define'd as 1 if the backtrace 57 1.1 christos library is configured with threading support, 0 if not. If this is 58 1.1 christos 0, the threaded parameter to backtrace_create_state must be passed 59 1.1 christos as 0. */ 60 1.1 christos 61 1.1 christos #define BACKTRACE_SUPPORTS_THREADS @BACKTRACE_SUPPORTS_THREADS@ 62 1.1 christos 63 1.1 christos /* BACKTRACE_SUPPORTS_DATA will be #defined'd as 1 if the backtrace_syminfo 64 1.1 christos will work for variables. It will always work for functions. */ 65 1.1 christos 66 1.1 christos #define BACKTRACE_SUPPORTS_DATA @BACKTRACE_SUPPORTS_DATA@ 67