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:
@@ -9,15 +9,19 @@
|
||||
# for Ubuntu dapper.
|
||||
|
||||
|
||||
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
||||
SHELLDIR = $(PREFIX)/games
|
||||
#PREFIX=/usr
|
||||
PREFIX=$(wildcard ~)/nh/install
|
||||
HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
|
||||
SHELLDIR = $(PREFIX)/games
|
||||
|
||||
CFLAGS=-O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB
|
||||
CFLAGS=-g -O -I../include -DNOTPARMDECL $(CFLAGS1) -DDLB
|
||||
CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
|
||||
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
|
||||
CFLAGS+=-DHACKDIR=\"$(HACKDIR)\"
|
||||
|
||||
LINK=$(CC)
|
||||
# Only needed for GLIBC stack trace:
|
||||
LFLAGS=-rdynamic
|
||||
|
||||
WINSRC = $(WINTTYSRC)
|
||||
WINOBJ = $(WINTTYOBJ)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
# Which users can use WIZARD (debugging) mode (the -D flag).
|
||||
# A value of * allows anyone to enter debugging mode.
|
||||
WIZARDS=root,games
|
||||
WIZARDS=root games
|
||||
|
||||
# Users allowed to use the ! (shell escape) command or to suspend the game.
|
||||
# Uses the same syntax as the WIZARDS option above.
|
||||
@@ -35,3 +35,14 @@ MAXPLAYERS=10
|
||||
# Determine identity of "person" in the score file with name (0) or
|
||||
# numeric (1) user id.
|
||||
#PERS_IS_UID=1
|
||||
|
||||
# Try to get more info in case of a program bug or crash. Using GDB can
|
||||
# get more information and works on more systems but requires gdb be available;
|
||||
# using GLIBC only works if NetHack is linked with glibc. Both require
|
||||
# certain compilation options. See src/end.c and sys/unix/hints/* for
|
||||
# more information.
|
||||
GDBPATH=/usr/bin/gdb
|
||||
# Values are priorities: 0 - do not use this method, 1 - low priority,
|
||||
# 2 - high priority. Non-zero priority methods are tried in order.
|
||||
PANICTRACE_GDB=1
|
||||
PANICTRACE_GLIBC=2
|
||||
|
||||
@@ -139,6 +139,12 @@ char *argv[];
|
||||
initoptions_init();
|
||||
read_config_file(SYSCF_FILE, SET_IN_SYS);
|
||||
initoptions_finish();
|
||||
#endif
|
||||
#ifdef PANICTRACE
|
||||
ARGV0 = argv[0]; /* save for possible stack trace */
|
||||
# ifndef NO_SIGNAL
|
||||
panictrace_setsignals(TRUE);
|
||||
# endif
|
||||
#endif
|
||||
prscore(argc, argv);
|
||||
exit(EXIT_SUCCESS);
|
||||
@@ -164,6 +170,12 @@ char *argv[];
|
||||
read_config_file(SYSCF_FILE, SET_IN_SYS);
|
||||
#endif
|
||||
initoptions_finish();
|
||||
#ifdef PANICTRACE
|
||||
ARGV0 = argv[0]; /* save for possible stack trace */
|
||||
# ifndef NO_SIGNAL
|
||||
panictrace_setsignals(TRUE);
|
||||
# endif
|
||||
#endif
|
||||
exact_username = whoami();
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user