]> git.sur5r.net Git - bacula/bacula/commitdiff
More debug info when aborting
authorKern Sibbald <kern@sibbald.com>
Mon, 11 Jan 2016 06:26:37 +0000 (07:26 +0100)
committerKern Sibbald <kern@sibbald.com>
Mon, 11 Jan 2016 06:26:52 +0000 (07:26 +0100)
bacula/src/lib/message.c

index 07a75b3563f00798c7e1fdeb4c3b2eb33ee7341b..ead4ca0fd9b216c9dd646ff6bcf36323aae2740a 100644 (file)
@@ -1327,6 +1327,7 @@ e_msg(const char *file, int line, int type, int level, const char *fmt,...)
     dispatch_message(NULL, type, 0, buf);
 
     if (type == M_ABORT) {
+       assert_msg = bstrdup(buf);
        char *p = 0;
        p[0] = 0;                      /* generate segmentation violation */
     }
@@ -1446,6 +1447,7 @@ Jmsg(JCR *jcr, int type, utime_t mtime, const char *fmt,...)
        char *p = 0;
        printf("Bacula forced SEG FAULT to obtain traceback.\n");
        syslog(LOG_DAEMON|LOG_ERR, "Bacula forced SEG FAULT to obtain traceback.\n");
+       assert_msg = bstrdup(rbuf);
        p[0] = 0;                      /* generate segmentation violation */
     }
     if (type == M_ERROR_TERM) {