and finally add crash file output

This commit is contained in:
tildearrow 2022-05-24 13:23:23 -05:00
parent 652edb18b7
commit 3a1b66957b

View file

@ -4252,10 +4252,19 @@ public:
st.load_here(32, reinterpret_cast<void *>(uctx), info->si_addr);
}
FILE* crashDump=fopen("furnace_crash.txt","w");
Printer printer;
printer.address = true;
printer.print(st, stderr);
if (crashDump!=NULL) {
Printer printer;
printer.address = true;
printer.print(st, crashDump);
fclose(crashDump);
}
#if (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) || \
(defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L)
psiginfo(info, nullptr);