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

@@ -545,7 +545,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
if (getcwd(orgdir, sizeof orgdir) == (char *) 0)
error("NetHack: current directory path too long");
#endif
initoptions_init(); // This allows OPTIONS in syscf on Windows.
set_default_prefix_locations(argv[0]);
#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
@@ -638,6 +638,9 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
if (WINDOWPORT(tty))
consoletty_open(1);
#endif
#ifdef WINCHAIN
commit_windowchain();
#endif
init_nhwindows(&argc, argv);
@@ -812,6 +815,11 @@ process_options(int argc, char * argv[])
argc--;
argv++;
}
#if defined(CRASHREPORT)
if (argcheck(argc, argv, ARG_BIDSHOW) == 2) {
nethack_exit(EXIT_SUCCESS);
}
#endif
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
/* avoid matching "-dec" for DECgraphics; since the man page
* says -d directory, hope nobody's using -desomething_else