better bug report info on crash (backported from unstable)

This commit is contained in:
antirez
2011-11-24 15:47:26 +01:00
parent f4e2abfcd4
commit 8a82ee0f3c
3 changed files with 49 additions and 8 deletions

View File

@ -236,6 +236,7 @@
#define redisPanic(_e) _redisPanic(#_e,__FILE__,__LINE__),_exit(1)
void _redisAssert(char *estr, char *file, int line);
void _redisPanic(char *msg, char *file, int line);
void bugReportStart(void);
/*-----------------------------------------------------------------------------
* Data types
@ -534,6 +535,11 @@ struct redisServer {
/* Misc */
unsigned lruclock:22; /* clock incrementing every minute, for LRU */
unsigned lruclock_padding:10;
/* Assert & bug reportign */
char *assert_failed;
char *assert_file;
int assert_line;
int bug_report_start; /* True if bug report header already logged. */
};
typedef struct pubsubPattern {