mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
delete the stack tracer that never captured a frame
ENABLE_STACK_TRACE has been 0 for as long as the file has been here, so StackTrace's constructor captured nothing and every line it ever wrote to stack_trace.log was a bare message with an empty frame list behind it. The DbgHelp singleton underneath it resolved symbols for that empty list, and the game linked dbghelp.lib to do it. The crash reports cover what this was meant to cover, and the VFS errors that were its only real content are already in vfs.log and game_log.log. Drop the tracer, the log, and the dbghelp dependency. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 5
parent
40bf6326c8
commit
7624daa904
+2
-42
@@ -2,50 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// This is a cross platform interface for helper functions related to debuggers.
|
||||
// You should use this to test if you're running under a debugger, and if you
|
||||
// would like to yield (breakpoint) into the debugger.
|
||||
// Crash reporting: capture a fault (or an assertion) as a report file, and hand
|
||||
// the pending reports to the telemetry uploader at startup.
|
||||
|
||||
#ifndef BASE_DEBUG_UTIL_H_
|
||||
#define BASE_DEBUG_UTIL_H_
|
||||
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
|
||||
#include "sgp_logger.h"
|
||||
|
||||
// A macro to disallow the copy constructor and operator= functions
|
||||
// This should be used in the private: declarations for a class
|
||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
TypeName(const TypeName&); \
|
||||
void operator=(const TypeName&)
|
||||
|
||||
// An older, deprecated, politically incorrect name for the above.
|
||||
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
|
||||
// A stacktrace can be helpful in debugging. For example, you can include a
|
||||
// stacktrace member in a object (probably around #ifndef NDEBUG) so that you
|
||||
// can later see where the given object was created from.
|
||||
class StackTrace {
|
||||
public:
|
||||
// Create a stacktrace from the current location
|
||||
StackTrace();
|
||||
// Get an array of instruction pointer values.
|
||||
// count: (output) the number of elements in the returned array
|
||||
const void *const *Addresses(size_t* count);
|
||||
// Print a backtrace to stderr
|
||||
void PrintBacktrace(const char* msg);
|
||||
|
||||
// Resolve backtrace to symbols and write to stream.
|
||||
void OutputToStream(const char* msg, sgp::Logger::LogInstance* os);
|
||||
|
||||
private:
|
||||
std::vector<void*> trace_;
|
||||
int count_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StackTrace);
|
||||
};
|
||||
|
||||
struct _EXCEPTION_POINTERS;
|
||||
|
||||
// Assertion failures raise this software exception so they get the same crash
|
||||
@@ -55,8 +17,6 @@ struct _EXCEPTION_POINTERS;
|
||||
|
||||
namespace sgp
|
||||
{
|
||||
void dumpStackTrace(vfs::String const& msg);
|
||||
|
||||
// Raise SGP_EXCEPTION_ASSERT and swallow it again, so the vectored crash
|
||||
// handler writes a report for an assertion that never faults. Carries the
|
||||
// assert's line, file and message (NULL for a plain Assert) as exception
|
||||
|
||||
Reference in New Issue
Block a user