more CI build fixes
This commit is contained in:
+4
-2
@@ -2522,22 +2522,24 @@ extern void region_safety(void);
|
|||||||
/* ### report.c ### */
|
/* ### report.c ### */
|
||||||
|
|
||||||
#ifdef CRASHREPORT
|
#ifdef CRASHREPORT
|
||||||
extern const char *get_saved_pline(int);
|
|
||||||
extern boolean submit_web_report(int, const char *, const char *);
|
extern boolean submit_web_report(int, const char *, const char *);
|
||||||
extern boolean submit_web_report(int, const char *, const char *);
|
extern boolean submit_web_report(int, const char *, const char *);
|
||||||
extern void crashreport_init(int, char *[]);
|
extern void crashreport_init(int, char *[]);
|
||||||
extern void crashreport_bidshow(void);
|
extern void crashreport_bidshow(void);
|
||||||
extern boolean swr_add_uricoded(const char *, char **, int *, char *);
|
extern boolean swr_add_uricoded(const char *, char **, int *, char *);
|
||||||
extern int dobugreport(void);
|
extern int dobugreport(void);
|
||||||
|
#endif /* CRASHREPORT */
|
||||||
# ifndef NO_SIGNAL
|
# ifndef NO_SIGNAL
|
||||||
extern void panictrace_handler(int);
|
extern void panictrace_handler(int);
|
||||||
# endif
|
# endif
|
||||||
|
#ifdef PANICTRACE
|
||||||
|
extern const char *get_saved_pline(int);
|
||||||
extern boolean NH_panictrace_libc(void);
|
extern boolean NH_panictrace_libc(void);
|
||||||
extern boolean NH_panictrace_gdb(void);
|
extern boolean NH_panictrace_gdb(void);
|
||||||
#endif
|
|
||||||
#if defined(PANICTRACE) && !defined(NO_SIGNAL)
|
#if defined(PANICTRACE) && !defined(NO_SIGNAL)
|
||||||
extern void panictrace_setsignals(boolean);
|
extern void panictrace_setsignals(boolean);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* PANICTRACE */
|
||||||
|
|
||||||
/* ### restore.c ### */
|
/* ### restore.c ### */
|
||||||
|
|
||||||
|
|||||||
@@ -1898,10 +1898,8 @@ build_english_list(char *in)
|
|||||||
void
|
void
|
||||||
NH_abort(char *why USED_FOR_CRASHREPORT)
|
NH_abort(char *why USED_FOR_CRASHREPORT)
|
||||||
{
|
{
|
||||||
#ifdef PANICTRACE
|
|
||||||
int gdb_prio = SYSOPT_PANICTRACE_GDB;
|
int gdb_prio = SYSOPT_PANICTRACE_GDB;
|
||||||
int libc_prio = SYSOPT_PANICTRACE_LIBC;
|
int libc_prio = SYSOPT_PANICTRACE_LIBC;
|
||||||
#endif
|
|
||||||
static volatile boolean aborting = FALSE;
|
static volatile boolean aborting = FALSE;
|
||||||
|
|
||||||
/* don't execute this code recursively if a second abort is requested
|
/* don't execute this code recursively if a second abort is requested
|
||||||
@@ -1910,7 +1908,6 @@ NH_abort(char *why USED_FOR_CRASHREPORT)
|
|||||||
return;
|
return;
|
||||||
aborting = TRUE;
|
aborting = TRUE;
|
||||||
|
|
||||||
#ifdef PANICTRACE
|
|
||||||
#ifdef CRASHREPORT
|
#ifdef CRASHREPORT
|
||||||
if(!submit_web_report(1, "Panic", why))
|
if(!submit_web_report(1, "Panic", why))
|
||||||
#endif
|
#endif
|
||||||
@@ -1938,7 +1935,6 @@ NH_abort(char *why USED_FOR_CRASHREPORT)
|
|||||||
#ifndef NO_SIGNAL
|
#ifndef NO_SIGNAL
|
||||||
panictrace_setsignals(FALSE);
|
panictrace_setsignals(FALSE);
|
||||||
#endif
|
#endif
|
||||||
#endif /* PANICTRACE */
|
|
||||||
NH_abort_;
|
NH_abort_;
|
||||||
}
|
}
|
||||||
#undef USED_FOR_CRASHREPORT
|
#undef USED_FOR_CRASHREPORT
|
||||||
|
|||||||
+70
-68
@@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
/* NB: CRASHREPORT implies PANICTRACE */
|
/* NB: CRASHREPORT implies PANICTRACE */
|
||||||
|
|
||||||
#ifdef CRASHREPORT
|
|
||||||
|
|
||||||
# ifndef NO_SIGNAL
|
# ifndef NO_SIGNAL
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
# endif
|
# endif
|
||||||
@@ -23,70 +21,7 @@
|
|||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifndef NO_SIGNAL
|
#ifdef CRASHREPORT
|
||||||
/* called as signal() handler, so sent at least one arg */
|
|
||||||
/*ARGUSED*/
|
|
||||||
void
|
|
||||||
panictrace_handler(int sig_unused UNUSED)
|
|
||||||
{
|
|
||||||
#define SIG_MSG "\nSignal received.\n"
|
|
||||||
int f2;
|
|
||||||
|
|
||||||
# ifdef CURSES_GRAPHICS
|
|
||||||
if (iflags.window_inited && WINDOWPORT(curses)) {
|
|
||||||
extern void curses_uncurse_terminal(void); /* wincurs.h */
|
|
||||||
|
|
||||||
/* it is risky calling this during a program-terminating signal,
|
|
||||||
but without it the subsequent backtrace is useless because
|
|
||||||
that ends up being scrawled all over the screen; call is
|
|
||||||
here rather than in NH_abort() because panic() calls both
|
|
||||||
exit_nhwindows(), which makes this same call under curses,
|
|
||||||
then NH_abort() and we don't want to call this twice */
|
|
||||||
curses_uncurse_terminal();
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
f2 = (int) write(2, SIG_MSG, sizeof SIG_MSG - 1);
|
|
||||||
nhUse(f2); /* what could we do if write to fd#2 (stderr) fails */
|
|
||||||
NH_abort(NULL); /* ... and we're already in the process of quitting? */
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
panictrace_setsignals(boolean set)
|
|
||||||
{
|
|
||||||
#define SETSIGNAL(sig) \
|
|
||||||
(void) signal(sig, set ? (SIG_RET_TYPE) panictrace_handler : SIG_DFL);
|
|
||||||
# ifdef SIGILL
|
|
||||||
SETSIGNAL(SIGILL);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGTRAP
|
|
||||||
SETSIGNAL(SIGTRAP);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGIOT
|
|
||||||
SETSIGNAL(SIGIOT);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGBUS
|
|
||||||
SETSIGNAL(SIGBUS);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGFPE
|
|
||||||
SETSIGNAL(SIGFPE);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGSEGV
|
|
||||||
SETSIGNAL(SIGSEGV);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGSTKFLT
|
|
||||||
SETSIGNAL(SIGSTKFLT);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGSYS
|
|
||||||
SETSIGNAL(SIGSYS);
|
|
||||||
# endif
|
|
||||||
# ifdef SIGEMT
|
|
||||||
SETSIGNAL(SIGEMT);
|
|
||||||
# endif
|
|
||||||
#undef SETSIGNAL
|
|
||||||
}
|
|
||||||
# endif /* NO_SIGNAL */
|
|
||||||
|
|
||||||
# ifdef WIN32
|
# ifdef WIN32
|
||||||
# define HASH_PRAGMA_START
|
# define HASH_PRAGMA_START
|
||||||
# define HASH_PRAGMA_END
|
# define HASH_PRAGMA_END
|
||||||
@@ -516,6 +451,10 @@ dobugreport(void)
|
|||||||
#undef SWR_HDR
|
#undef SWR_HDR
|
||||||
#undef SWR_LINES
|
#undef SWR_LINES
|
||||||
|
|
||||||
|
#endif /* CRASHREPORT */
|
||||||
|
|
||||||
|
#ifdef PANICTRACE
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
boolean
|
boolean
|
||||||
NH_panictrace_libc(void)
|
NH_panictrace_libc(void)
|
||||||
@@ -618,6 +557,69 @@ get_saved_pline(int lineno)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CRASHREPORT */
|
# ifndef NO_SIGNAL
|
||||||
|
/* called as signal() handler, so sent at least one arg */
|
||||||
|
/*ARGUSED*/
|
||||||
|
void
|
||||||
|
panictrace_handler(int sig_unused UNUSED)
|
||||||
|
{
|
||||||
|
#define SIG_MSG "\nSignal received.\n"
|
||||||
|
int f2;
|
||||||
|
|
||||||
/*report.c*/
|
# ifdef CURSES_GRAPHICS
|
||||||
|
if (iflags.window_inited && WINDOWPORT(curses)) {
|
||||||
|
extern void curses_uncurse_terminal(void); /* wincurs.h */
|
||||||
|
|
||||||
|
/* it is risky calling this during a program-terminating signal,
|
||||||
|
but without it the subsequent backtrace is useless because
|
||||||
|
that ends up being scrawled all over the screen; call is
|
||||||
|
here rather than in NH_abort() because panic() calls both
|
||||||
|
exit_nhwindows(), which makes this same call under curses,
|
||||||
|
then NH_abort() and we don't want to call this twice */
|
||||||
|
curses_uncurse_terminal();
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
f2 = (int) write(2, SIG_MSG, sizeof SIG_MSG - 1);
|
||||||
|
nhUse(f2); /* what could we do if write to fd#2 (stderr) fails */
|
||||||
|
NH_abort(NULL); /* ... and we're already in the process of quitting? */
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
panictrace_setsignals(boolean set)
|
||||||
|
{
|
||||||
|
#define SETSIGNAL(sig) \
|
||||||
|
(void) signal(sig, set ? (SIG_RET_TYPE) panictrace_handler : SIG_DFL);
|
||||||
|
# ifdef SIGILL
|
||||||
|
SETSIGNAL(SIGILL);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGTRAP
|
||||||
|
SETSIGNAL(SIGTRAP);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGIOT
|
||||||
|
SETSIGNAL(SIGIOT);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGBUS
|
||||||
|
SETSIGNAL(SIGBUS);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGFPE
|
||||||
|
SETSIGNAL(SIGFPE);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGSEGV
|
||||||
|
SETSIGNAL(SIGSEGV);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGSTKFLT
|
||||||
|
SETSIGNAL(SIGSTKFLT);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGSYS
|
||||||
|
SETSIGNAL(SIGSYS);
|
||||||
|
# endif
|
||||||
|
# ifdef SIGEMT
|
||||||
|
SETSIGNAL(SIGEMT);
|
||||||
|
# endif
|
||||||
|
#undef SETSIGNAL
|
||||||
|
}
|
||||||
|
# endif /* NO_SIGNAL */
|
||||||
|
#endif /* PANICTRACE */
|
||||||
|
|
||||||
|
/*report.c*/
|
||||||
|
|||||||
Reference in New Issue
Block a user