PANICTRACE (stacktrace on panic or signal) + bits

On crash signal or panic(), use a configurable method to get a stacktrace
the user can easily report to us.  Currently only for Unix/Linux and only
ifdef BETA.  Hopefully ports can add additional methods.

Bits:
- linux hints file had PREFIX definition in the wrong place
- sample sysconf file used wrong delimiter for WIZARDS
- fix grammar error in support message when using sysconf.wizards
- options.c comment typo
- capitalize "Crash test" output from #panic command
This commit is contained in:
keni
2010-01-15 19:54:37 +00:00
parent f6e40b8bf8
commit d80fcaada4
14 changed files with 277 additions and 19 deletions

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 decl.h $Date$ $Revision$ */
/* SCCS Id: @(#)decl.h 3.5 2008/07/20 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -390,6 +389,10 @@ struct autopickup_exception {
};
#endif /* AUTOPICKUP_EXCEPTIONS */
#ifdef PANICTRACE
E char *ARGV0;
#endif
#undef E
#endif /* DECL_H */

View File

@@ -643,6 +643,9 @@ E void FDECL(dealloc_killer, (struct kinfo*));
E void FDECL(save_killers, (int,int));
E void FDECL(restore_killers, (int));
E char *FDECL(build_english_list, (char *));
#if defined(PANICTRACE) && !defined(NO_SIGNAL)
E void FDECL(panictrace_setsignals, (boolean));
#endif
/* ### engrave.c ### */

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 global.h $Date$ $Revision$ */
/* SCCS Id: @(#)global.h 3.5 2007/01/12 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -366,4 +365,18 @@ struct savefile_info {
#define MAXMONNO 120 /* extinct monst after this number created */
#define MHPMAX 500 /* maximum monster hp */
#ifdef BETA
/* see end.c */
# ifndef PANICTRACE
# define PANICTRACE
# endif
#endif
/* The following are meaningless if PANICTRACE is not defined: */
#if defined(__linux__) && defined(__GLIBC__) && (__GLIBC__ >= 2)
# define PANICTRACE_GLIBC
#endif
#ifdef UNIX
# define PANICTRACE_GDB
#endif
#endif /* GLOBAL_H */

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 sys.h $Date$ $Revision$ */
/* SCCS Id: @(#)sys.h 3.5 2008/01/30 */
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
/* NetHack may be freely redistributed. See license for details. */
@@ -21,6 +20,14 @@ struct sysopt {
int pers_is_uid;
int entrymax;
int pointsmin;
#ifdef PANICTRACE
/* panic options */
char *gdbpath;
int panictrace_gdb;
# ifdef PANICTRACE_GLIBC
int panictrace_glibc;
# endif
#endif
};
E struct sysopt sysopt;