2003-07-13 02:28:11 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2003-07-13 21:18:04 +00:00
|
|
|
// Name: wx/msw/crashrpt.h
|
2003-07-13 02:28:11 +00:00
|
|
|
// Purpose: helpers for the structured exception handling (SEH) under Win32
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 13.07.2003
|
|
|
|
// RCS-ID: $Id$
|
2004-05-23 14:56:36 +00:00
|
|
|
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2003-07-13 02:28:11 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_MSW_SEH_H_
|
|
|
|
#define _WX_MSW_SEH_H_
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_ON_FATAL_EXCEPTION
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2003-07-13 21:18:04 +00:00
|
|
|
// report generation flags
|
2003-07-13 02:28:11 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2003-07-13 21:18:04 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
// we always report where the crash occured
|
|
|
|
wxCRASH_REPORT_LOCATION = 0,
|
|
|
|
|
|
|
|
// if this flag is given, the call stack is dumped
|
2003-09-29 17:14:52 +00:00
|
|
|
//
|
|
|
|
// this results in dump/crash report as small as possible, this is the
|
|
|
|
// default flag
|
2003-07-13 21:18:04 +00:00
|
|
|
wxCRASH_REPORT_STACK = 1,
|
|
|
|
|
|
|
|
// if this flag is given, the values of the local variables are dumped
|
2003-09-29 17:14:52 +00:00
|
|
|
//
|
|
|
|
// note that this will result in huge file containing the dump of the
|
|
|
|
// entire process memory space when using mini dumps!
|
2003-07-13 21:18:04 +00:00
|
|
|
wxCRASH_REPORT_LOCALS = 2,
|
|
|
|
|
|
|
|
// if this flag is given, the values of all global variables are dumped
|
|
|
|
//
|
2003-09-29 17:14:52 +00:00
|
|
|
// this creates a much larger mini dump and also takes more time to
|
|
|
|
// generate if our own crash reporting code is used
|
2003-07-13 21:18:04 +00:00
|
|
|
wxCRASH_REPORT_GLOBALS = 4
|
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxCrashReport: this class is used to create crash reports
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct WXDLLIMPEXP_BASE wxCrashReport
|
2003-07-13 02:28:11 +00:00
|
|
|
{
|
|
|
|
// set the name of the file to which the report is written, it is
|
|
|
|
// constructed from the .exe name by default
|
|
|
|
static void SetFileName(const wxChar *filename);
|
|
|
|
|
|
|
|
// return the current file name
|
|
|
|
static const wxChar *GetFileName();
|
|
|
|
|
|
|
|
// write the exception report to the file, return true if it could be done
|
|
|
|
// or false otherwise
|
2003-07-13 21:18:04 +00:00
|
|
|
static bool Generate(int flags = wxCRASH_REPORT_LOCATION |
|
2003-09-29 17:14:52 +00:00
|
|
|
wxCRASH_REPORT_STACK);
|
2003-07-13 02:28:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_ON_FATAL_EXCEPTION
|
|
|
|
|
|
|
|
#endif // _WX_MSW_SEH_H_
|
|
|
|
|