Planeshift

minidump_exception_win32.h

Go to the documentation of this file.
00001 /* Copyright (c) 2006, Google Inc.
00002  * All rights reserved.
00003  *
00004  * Redistribution and use in source and binary forms, with or without
00005  * modification, are permitted provided that the following conditions are
00006  * met:
00007  *
00008  *     * Redistributions of source code must retain the above copyright
00009  * notice, this list of conditions and the following disclaimer.
00010  *     * Redistributions in binary form must reproduce the above
00011  * copyright notice, this list of conditions and the following disclaimer
00012  * in the documentation and/or other materials provided with the
00013  * distribution.
00014  *     * Neither the name of Google Inc. nor the names of its
00015  * contributors may be used to endorse or promote products derived from
00016  * this software without specific prior written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00019  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00020  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00021  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00022  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00023  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00024  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00025  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00026  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00027  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00028  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
00029 
00030 /* minidump_exception_win32.h: Definitions of exception codes for
00031  * Win32 platform
00032  *
00033  * (This is C99 source, please don't corrupt it with C++.)
00034  *
00035  * Author: Mark Mentovai
00036  * Split into its own file: Neal Sidhwaney */
00037 
00038 
00039 #ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__
00040 #define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__
00041 
00042 #include <stddef.h>
00043 
00044 #include "google_breakpad/common/breakpad_types.h"
00045 
00046 
00047 /* For (MDException).exception_code.  These values come from WinBase.h
00048  * and WinNT.h (names beginning with EXCEPTION_ are in WinBase.h,
00049  * they are STATUS_ in WinNT.h). */
00050 typedef enum {
00051   MD_EXCEPTION_CODE_WIN_CONTROL_C                = 0x40010005,
00052       /* DBG_CONTROL_C */
00053   MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION     = 0x80000001,
00054       /* EXCEPTION_GUARD_PAGE */
00055   MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT    = 0x80000002,
00056       /* EXCEPTION_DATATYPE_MISALIGNMENT */
00057   MD_EXCEPTION_CODE_WIN_BREAKPOINT               = 0x80000003,
00058       /* EXCEPTION_BREAKPOINT */
00059   MD_EXCEPTION_CODE_WIN_SINGLE_STEP              = 0x80000004,
00060       /* EXCEPTION_SINGLE_STEP */
00061   MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION         = 0xc0000005,
00062       /* EXCEPTION_ACCESS_VIOLATION */
00063   MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR            = 0xc0000006,
00064       /* EXCEPTION_IN_PAGE_ERROR */
00065   MD_EXCEPTION_CODE_WIN_INVALID_HANDLE           = 0xc0000008,
00066       /* EXCEPTION_INVALID_HANDLE */
00067   MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION      = 0xc000001d,
00068       /* EXCEPTION_ILLEGAL_INSTRUCTION */
00069   MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION = 0xc0000025,
00070       /* EXCEPTION_NONCONTINUABLE_EXCEPTION */
00071   MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION      = 0xc0000026,
00072       /* EXCEPTION_INVALID_DISPOSITION */
00073   MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED    = 0xc000008c,
00074       /* EXCEPTION_BOUNDS_EXCEEDED */
00075   MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND   = 0xc000008d,
00076       /* EXCEPTION_FLT_DENORMAL_OPERAND */
00077   MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO     = 0xc000008e,
00078       /* EXCEPTION_FLT_DIVIDE_BY_ZERO */
00079   MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT     = 0xc000008f,
00080       /* EXCEPTION_FLT_INEXACT_RESULT */
00081   MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION  = 0xc0000090,
00082       /* EXCEPTION_FLT_INVALID_OPERATION */
00083   MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW           = 0xc0000091,
00084       /* EXCEPTION_FLT_OVERFLOW */
00085   MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK        = 0xc0000092,
00086       /* EXCEPTION_FLT_STACK_CHECK */
00087   MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW          = 0xc0000093,
00088       /* EXCEPTION_FLT_UNDERFLOW */
00089   MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO   = 0xc0000094,
00090       /* EXCEPTION_INT_DIVIDE_BY_ZERO */
00091   MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW         = 0xc0000095,
00092       /* EXCEPTION_INT_OVERFLOW */
00093   MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION   = 0xc0000096,
00094       /* EXCEPTION_PRIV_INSTRUCTION */
00095   MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW           = 0xc00000fd,
00096       /* EXCEPTION_STACK_OVERFLOW */
00097   MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK        = 0xc0000194,
00098       /* EXCEPTION_POSSIBLE_DEADLOCK */
00099   MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN     = 0xc0000409,
00100       /* STATUS_STACK_BUFFER_OVERRUN */
00101   MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION          = 0xc0000374,
00102       /* STATUS_HEAP_CORRUPTION */
00103   MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION  = 0xe06d7363
00104       /* Per http://support.microsoft.com/kb/185294,
00105          generated by Visual C++ compiler */
00106 } MDExceptionCodeWin;
00107 
00108 // These constants are defined in the MSDN documentation of
00109 // the EXCEPTION_RECORD structure.
00110 typedef enum {
00111   MD_ACCESS_VIOLATION_WIN_READ  = 0,
00112   MD_ACCESS_VIOLATION_WIN_WRITE = 1,
00113   MD_ACCESS_VIOLATION_WIN_EXEC  = 8
00114 } MDAccessViolationTypeWin;
00115 
00116 #endif  /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ */