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