17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-05 21:49:10 +01:00

Add small crash reports with crash details, CPU preflight check and eu07_starter

This commit is contained in:
2026-11-01 16:41:03 +01:00
parent 60f34fd6bf
commit b151898071
14 changed files with 1818 additions and 54 deletions

22
utilities/crashdump.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
// the crash report of the simulator (WITHDUMPGEN, windows): a small minidump, a text description of the crash with the recent log lines
// and copies of the log files, written to crashdumps/. when the simulator runs under eu07_starter, the starter writes the minidump
#include <cstddef>
#include <string>
enum class crashdump_log_file
{
log,
errors
};
// sets up the reporting, at the start of main
void crashdump_install();
// a named value for the description of the crash: the renderer, the scenario, the graphics card...
void crashdump_set_info(char const *Name, std::string const &Value);
// a line of the log, the last ones go into the description of the crash
void crashdump_note_log(char const *Text, std::size_t Length);
// a log file, copied next to the dump when the simulator crashes
void crashdump_set_log_file(crashdump_log_file File, std::string const &Path);