diff options
Diffstat (limited to 'sql/stacktrace.c')
-rw-r--r-- | sql/stacktrace.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/stacktrace.c b/sql/stacktrace.c index d5711bcd78e..f5c0a59b572 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -14,7 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <global.h> +#include <my_global.h> #include "stacktrace.h" #include <signal.h> #include <my_pthread.h> @@ -122,8 +122,8 @@ terribly wrong...\n"); return; } #endif /* __alpha__ */ - - if (!stack_bottom) + + if (!stack_bottom || (gptr) stack_bottom > (gptr) &fp) { ulong tmp= min(0x10000,thread_stack); /* Assume that the stack starts at the previous even 65K */ @@ -145,12 +145,12 @@ terribly wrong...\n"); fprintf(stderr, "Warning: Alpha stacks are difficult -\ will be taking some wild guesses, stack trace may be incorrect or \ terminate abruptly\n"); - // On Alpha, we need to get pc + /* On Alpha, we need to get pc */ __asm __volatile__ ("bsr %0, do_next; do_next: " :"=r"(pc) :"r"(pc)); #endif /* __alpha__ */ - + while (fp < (uchar**) stack_bottom) { #ifdef __i386__ @@ -165,7 +165,7 @@ terribly wrong...\n"); { new_fp += 90; } - + if (fp && pc) { pc = find_prev_pc(pc, fp); @@ -195,7 +195,7 @@ terribly wrong...\n"); } fprintf(stderr, "Stack trace seems successful - bottom reached\n"); - + end: fprintf(stderr, "Please read http://www.mysql.com/doc/U/s/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved\n\ stack trace is much more helpful in diagnosing the problem, so please do \n\ @@ -210,8 +210,8 @@ resolve it\n"); void write_core(int sig) { signal(sig, SIG_DFL); - if (fork() != 0) exit(1); // Abort main program - // Core will be written at exit + if (fork() != 0) exit(1); /* Abort main program */ + /* Core will be written at exit */ } #else void write_core(int sig) |