add CRASHREPORT directly to browser

add CRASHREPORT for Windows
add ^P info to report (via DUMPLOG)

new options: crash_email, crash_name, crash_urlmax
new game command: #bugreport
new config option: CRASHREPORT_EXEC_NOSTDERR
new command line option: --bidshow

deleted helper scripts:
    NetHackCrashReport.Javascript
    nhcrashreport.lua

misc:
    update CRASHREPORTURL (will need to be updated before release)
    update bitrot in winchain
    winchain for Windows
    add missing synch_wait for NetHackW --showpaths
    add PANICTRACE (and CRASHREPORT) in mdlib.c:build_opts

missing:
    packaging (Windows needs the pdb file)
    no testing with MSVC command line build

port status:
    linux: working, but glibc's backtrace doesn't show static functions
    Windows VS: working.  pdb file is large - looking into options
    MacOS: working
    msdos: not supported
    VMS: not supported
    MSVC: planned, but not attempted
    MSYS2: working, but libbacktrace not showing symbols (yet?)
This commit is contained in:
nhkeni
2024-02-06 18:33:59 -05:00
parent cf3cbcf832
commit dbe5c98dca
37 changed files with 1001 additions and 315 deletions

View File

@@ -52,9 +52,10 @@ SOUND_LIBRARIES = windsound
#
#---------------------------------------------------------------
# Do you want debug information in the executable?
# Required for CRASHREPORT.
#
DEBUGINFO = N
DEBUGINFO = Y
#
#---------------------------------------------------------------
@@ -243,6 +244,7 @@ NHV=$(subst ",,$(NHV1))
# TTY - window port files (tty)
# MSWIN - window port files (win32)
# WCURSES - window port files (curses)
# WCHAIN - window port files (chain)
# WSHR - Tile support files
# SNDSYS - sound suppport files for win32
# QT - QT window support files
@@ -257,6 +259,7 @@ SNDSYS =../sound/windsound
MSWSYS =../sys/windows
TTY =../win/tty
MSWIN =../win/win32
WCHAIN =../win/chain
WCURSES =../win/curses
WSHR =../win/share
QT =../win/Qt
@@ -357,7 +360,7 @@ $(OBJ):
CLEAN_DIR = $(GAMEDIR) $(OBJ)
#===============-=================================================
#=================================================================
# LUA library
# Source from http://www.lua.org/ftp/lua-5.4.6.tar.gz
#=================================================================
@@ -987,6 +990,15 @@ CFLAGSW += $(NHCURSESFLAGS)
NHWONLY += $(addsuffix .o, cursdial cursinit cursinvt cursmain cursmesg cursmisc cursstat curswins guitty)
endif
# uncomment for WINCHAIN
#COREOBJS += $(addsuffix .o, wc_chainin wc_chainout wc_trace)
# XXX mess for testing libbacktrace
ifeq "$(DEBUGINFO)" "Y"
CFLAGS += -I/mingw64/include -g -static -gdwarf
LIBS += -L/mingw64/lib -lbacktrace
endif
nethackw: $(NHWTARGETS)
$(GAMEDIR)/NetHackW.exe: $(NHWOBJS) $(NHWRES) $(DATEW_O) $(LUALIB) $(PDCWLIB) | $(GAMEDIR)
@@ -1028,6 +1040,9 @@ $(ONHW)/%.o: $(MSWSYS)/%.c $(NHLUAH) | $(ONHW)
$(ONHW)/%.o: $(MSWIN)/%.c $(NHLUAH) | $(ONHW)
$(cc) $(CFLAGSW) $< -o$@
$(ONHW)/%.o: $(WCHAIN)/%.c $(NHLUAH) | $(ONHW)
$(cc) $(CFLAGSW) $< -o$@
$(ONHW)/%.o: $(WSHR)/%.c $(NHLUAH) | $(ONHW)
$(cc) $(CFLAGSW) $< -o$@
@@ -1068,6 +1083,7 @@ NHCURSESFLAGS = -DCURSES_GRAPHICS -DCURSES_UNICODE $(PDCURSESFLAGS) -DPDC_NCMOUS
CFLAGSNH += $(NHCURSESFLAGS)
NHONLY += $(addsuffix .o, cursdial cursinit cursinvt cursmain cursmesg cursmisc cursstat curswins)
endif
DATE_O = $(addsuffix .o, $(addprefix $(ONH)/, date))
NHOBJS = $(addprefix $(ONH)/, $(COREOBJS) $(NHONLY))
@@ -1115,6 +1131,9 @@ $(ONH)/%.o: $(MSWSYS)/%.c $(NHLUAH) | $(ONH)
$(ONH)/%.o: $(MSWIN)/%.c $(NHLUAH) | $(ONH)
$(cc) $(CFLAGSNH) $< -o$@
$(ONH)/%.o: $(WCHAIN)/%.c $(NHLUAH) | $(ONH)
$(cc) $(CFLAGSNH) $< -o$@
$(ONH)/%.o: $(WSHR)/%.c $(NHLUAH) | $(ONH)
$(cc) $(CFLAGSNH) $< -o$@
@@ -1148,8 +1167,9 @@ CLEAN_FILE += $(NHTARGET) $(NHOBJS) $(NHRES)
all: install
TO_INSTALL = $(GAMEDIR)/NetHack.exe $(RTARGETS) $(GAMEDIRDLLS) \
$(addprefix $(GAMEDIR)/, $(addsuffix .template, sysconf .nethackrc) \
Guidebook.txt NetHack.txt license opthelp record symbols)
$(addprefix $(GAMEDIR)/, \
$(addsuffix .template, sysconf .nethackrc symbols) \
Guidebook.txt NetHack.txt license opthelp record)
ifeq "$(HAVE_SOUNDLIB)" "Y"
TO_INSTALL += $(addprefix $(GAMEDIR)/, $(addsuffix .wav, $(WAVLIST)))
@@ -1183,7 +1203,7 @@ $(GAMEDIR)/$(FMODLIBDLL): $(FMODLIBDIR)/$(FMODLIBDLL)
cp $< $@
endif
$(GAMEDIR)/symbols: $(DAT)/symbols
$(GAMEDIR)/symbols.template: $(DAT)/symbols
cp $< $@
$(GAMEDIR)/NetHack.txt: $(DOC)/nethack.txt