X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRtsMessages.c;h=6e75abc8a5b24ff95c3e43b40d72e8a52b1741a4;hb=d108044bef62f6a0d579c92ced5e8188f72edc2d;hp=c263a2cf579d2612e43c76bb0c695ca28b6a69fe;hpb=63d753d105f0e0c4849631d0494fea69f82c8a41;p=ghc-hetmet.git diff --git a/rts/RtsMessages.c b/rts/RtsMessages.c index c263a2c..6e75abc 100644 --- a/rts/RtsMessages.c +++ b/rts/RtsMessages.c @@ -9,6 +9,8 @@ #include "PosixSource.h" #include "Rts.h" +#include "eventlog/EventLog.h" + #include #include #include @@ -128,7 +130,7 @@ isGUIApp(void) #define xstr(s) str(s) #define str(s) #s -void +void GNU_ATTRIBUTE(__noreturn__) rtsFatalInternalErrorFn(const char *s, va_list ap) { #if defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS) @@ -161,6 +163,10 @@ rtsFatalInternalErrorFn(const char *s, va_list ap) fflush(stderr); } +#ifdef TRACING + if (RtsFlags.TraceFlags.tracing == TRACE_EVENTLOG) endEventLogging(); +#endif + abort(); // stg_exit(EXIT_INTERNAL_ERROR); } @@ -187,7 +193,7 @@ rtsErrorMsgFn(const char *s, va_list ap) #endif { /* don't fflush(stdout); WORKAROUND bug in Linux glibc */ - if (prog_argv != NULL && prog_name != NULL) { + if (prog_name != NULL) { fprintf(stderr, "%s: ", prog_name); } vfprintf(stderr, s, ap);