From fa64103aa87a8f0f2a3351bb4a54e93e8ade1082 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 27 Dec 2010 14:34:17 +0200 Subject: better debug output in segfaults and stack overflows in windows --- src/debug.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/debug.cpp') diff --git a/src/debug.cpp b/src/debug.cpp index df8cbeb22..9fbdf7a39 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -194,3 +194,33 @@ DebugStacker::~DebugStacker() } } + +#ifdef _WIN32 +void se_trans_func(unsigned int u, EXCEPTION_POINTERS* pExp) +{ + dstream<<"In trans_func.\n"; + if(u == EXCEPTION_ACCESS_VIOLATION) + { + PEXCEPTION_RECORD r = pExp->ExceptionRecord; + dstream<<"Access violation at "<ExceptionAddress + <<" write?="<ExceptionInformation[0] + <<" address="<ExceptionInformation[1] + <