mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
rename the crash reporter off its Chromium origins
Nothing Chromium-derived is left in either file - the stack tracer that came from base/debug_util was the last of it - so the copyright header credited Google for code it did not write and pointed at a LICENSE file this repository does not have. Rename to what the files actually are. While in there: say what the exception code's customer bit does and does not guarantee, and note next to it how to stop a debugger breaking on every assertion, which is what someone will be looking for when they grep that number. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 5
parent
7624daa904
commit
86b23474cf
+1
-1
@@ -5,7 +5,7 @@ set(sgpSrc
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/crash_telemetry.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/crash_telemetry.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/Cursor Control.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/Cursor Control.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/DEBUG.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/DEBUG.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/debug_win_util.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/crash_report.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/DirectDraw Calls.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/DirectDraw Calls.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/DirectX Common.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/DirectX Common.cpp"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/English.cpp"
|
"${CMAKE_CURRENT_SOURCE_DIR}/English.cpp"
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@
|
|||||||
#include "GameVersion.h"
|
#include "GameVersion.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
|
||||||
#include "debug_util.h"
|
#include "crash_report.h"
|
||||||
|
|
||||||
BOOLEAN gfRecordToFile = FALSE;
|
BOOLEAN gfRecordToFile = FALSE;
|
||||||
BOOLEAN gfRecordToDebugger = TRUE;
|
BOOLEAN gfRecordToDebugger = TRUE;
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
#include "debug_util.h"
|
#include "crash_report.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// Crash reporting: capture a fault (or an assertion) as a report file, and hand
|
// Crash reporting: capture a fault (or an assertion) as a report file, and hand
|
||||||
// the pending reports to the telemetry uploader at startup.
|
// the pending reports to the telemetry uploader at startup.
|
||||||
|
|
||||||
#ifndef BASE_DEBUG_UTIL_H_
|
#ifndef SGP_CRASH_REPORT_H_
|
||||||
#define BASE_DEBUG_UTIL_H_
|
#define SGP_CRASH_REPORT_H_
|
||||||
|
|
||||||
struct _EXCEPTION_POINTERS;
|
struct _EXCEPTION_POINTERS;
|
||||||
|
|
||||||
// Assertion failures raise this software exception so they get the same crash
|
// Assertion failures raise this software exception so they get the same crash
|
||||||
// report as a real fault. Bit 29 set marks it customer-defined, so it can never
|
// report as a real fault. Bit 29 set marks it customer-defined, which keeps it out
|
||||||
// collide with a system code; the top two bits mark it an error.
|
// of the system's own codes; the top two bits mark it an error. Other user-mode
|
||||||
|
// producers set that bit too (MSVC's C++ exception is 0xE06D7363), so it is the
|
||||||
|
// whole value that makes this code ours, not the bit alone.
|
||||||
|
// A debugger sees this first-chance on every assert; `sxi e1a55e27` in WinDbg
|
||||||
|
// (Debug > Exceptions in Visual Studio) stops it breaking.
|
||||||
#define SGP_EXCEPTION_ASSERT 0xE1A55E27
|
#define SGP_EXCEPTION_ASSERT 0xE1A55E27
|
||||||
|
|
||||||
namespace sgp
|
namespace sgp
|
||||||
@@ -49,4 +49,4 @@ namespace sgp
|
|||||||
void processCrashTelemetry(const wchar_t* url);
|
void processCrashTelemetry(const wchar_t* url);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BASE_DEBUG_UTIL_H_
|
#endif // SGP_CRASH_REPORT_H_
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
// Crash telemetry: upload the crash_report_*.txt files the crash handler left
|
// Crash telemetry: upload the crash_report_*.txt files the crash handler left
|
||||||
// behind, on the next launch.
|
// behind, on the next launch.
|
||||||
//
|
//
|
||||||
// Deliberately a separate translation unit from debug_win_util.cpp. Everything in
|
// Deliberately a separate translation unit from crash_report.cpp. Everything in
|
||||||
// there runs inside a faulting thread and may not allocate; everything here runs at
|
// there runs inside a faulting thread and may not allocate; everything here runs at
|
||||||
// startup with a healthy heap and is ordinary code. Keeping the two apart keeps the
|
// startup with a healthy heap and is ordinary code. Keeping the two apart keeps the
|
||||||
// no-heap rule easy to see and easy to hold.
|
// no-heap rule easy to see and easy to hold.
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
#include "debug_util.h"
|
#include "crash_report.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winhttp.h>
|
#include <winhttp.h>
|
||||||
|
|||||||
+1
-1
@@ -629,7 +629,7 @@ static vfs::String getGameID()
|
|||||||
return _id;
|
return _id;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "debug_util.h"
|
#include "crash_report.h"
|
||||||
#include "GameVersion.h" // czVersionString, stamped into crash reports
|
#include "GameVersion.h" // czVersionString, stamped into crash reports
|
||||||
#include <vfs/Aspects/vfs_logging.h>
|
#include <vfs/Aspects/vfs_logging.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user