00001 /* Copyright (C) 2000 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00021 #ifdef TARGET_OS_LINUX 00022 #if defined(HAVE_STACKTRACE) || (defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) 00023 #undef HAVE_STACKTRACE 00024 #define HAVE_STACKTRACE 00025 00026 extern char* __bss_start; 00027 extern char* heap_start; 00028 00029 #define init_stacktrace() { heap_start = (char*) &__bss_start; } 00030 void print_stacktrace(gptr stack_bottom, ulong thread_stack); 00031 void safe_print_str(const char* name, const char* val, int max_len); 00032 #endif /* (defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) */ 00033 #endif /* TARGET_OS_LINUX */ 00034 00035 /* Define empty prototypes for functions that are not implemented */ 00036 #ifndef HAVE_STACKTRACE 00037 #define init_stacktrace() {} 00038 #define print_stacktrace(A,B) {} 00039 #define safe_print_str(A,B,C) {} 00040 #endif /* HAVE_STACKTRACE */ 00041 00042 void write_core(int sig); 00043 00044 #ifdef __cplusplus 00045 } 00046 #endif
1.4.7

