Crash log: Checkpoint each line of decoded stack trace
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "../../screenshot.h"
|
||||
#include "../../debug.h"
|
||||
#include "../../video/video_driver.hpp"
|
||||
#include "../../scope.h"
|
||||
#include "macos.h"
|
||||
|
||||
#include <errno.h>
|
||||
@@ -235,6 +236,10 @@ class CrashLogOSX : public CrashLog {
|
||||
#endif
|
||||
|
||||
for (; frame != nullptr && i < MAX_STACK_FRAMES; i++) {
|
||||
auto guard = scope_guard([&]() {
|
||||
this->CrashLogFaultSectionCheckpoint(buffer);
|
||||
});
|
||||
|
||||
/* Get IP for current stack frame. */
|
||||
#if defined(__ppc__) || defined(__ppc64__)
|
||||
void *ip = frame[2];
|
||||
|
@@ -13,6 +13,7 @@
|
||||
#include "../../string_func.h"
|
||||
#include "../../gamelog.h"
|
||||
#include "../../sl/saveload.h"
|
||||
#include "../../scope.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
@@ -526,6 +527,9 @@ class CrashLogUnix : public CrashLog {
|
||||
#endif /* WITH_BFD */
|
||||
|
||||
for (int i = 0; i < trace_size; i++) {
|
||||
auto guard = scope_guard([&]() {
|
||||
this->CrashLogFaultSectionCheckpoint(buffer);
|
||||
});
|
||||
#if defined(WITH_DL)
|
||||
Dl_info info;
|
||||
#if defined(WITH_DL2)
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "../../settings_type.h"
|
||||
#include "../../thread.h"
|
||||
#include "../../walltime_func.h"
|
||||
#include "../../scope.h"
|
||||
#if defined(WITH_DEMANGLE)
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
@@ -515,6 +516,9 @@ char *CrashLogWindows::AppendDecodedStacktrace(char *buffer, const char *last) c
|
||||
|
||||
/* Walk stack at most MAX_FRAMES deep in case the stack is corrupt. */
|
||||
for (uint num = 0; num < MAX_FRAMES; num++) {
|
||||
auto guard = scope_guard([&]() {
|
||||
this->CrashLogFaultSectionCheckpoint(buffer);
|
||||
});
|
||||
if (!proc.pStackWalk64(
|
||||
#ifdef _M_AMD64
|
||||
IMAGE_FILE_MACHINE_AMD64,
|
||||
|
Reference in New Issue
Block a user