duke@435: /* trims@1907: * Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved. duke@435: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: * duke@435: * This code is free software; you can redistribute it and/or modify it duke@435: * under the terms of the GNU General Public License version 2 only, as duke@435: * published by the Free Software Foundation. duke@435: * duke@435: * This code is distributed in the hope that it will be useful, but WITHOUT duke@435: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: * version 2 for more details (a copy is included in the LICENSE file that duke@435: * accompanied this code). duke@435: * duke@435: * You should have received a copy of the GNU General Public License version duke@435: * 2 along with this work; if not, write to the Free Software Foundation, duke@435: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: * trims@1907: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: * or visit www.oracle.com if you need additional information or have any trims@1907: * questions. duke@435: * duke@435: */ duke@435: duke@435: duke@435: #ifdef AMD64 duke@435: typedef unsigned char UBYTE; duke@435: duke@435: #define UNW_FLAG_EHANDLER 0x01 duke@435: #define UNW_FLAG_UHANDLER 0x02 duke@435: #define UNW_FLAG_CHAININFO 0x04 duke@435: duke@435: // This structure is used to define an UNWIND_INFO that duke@435: // only has an ExceptionHandler. There are no UnwindCodes duke@435: // declared. duke@435: typedef struct _UNWIND_INFO_EH_ONLY { duke@435: UBYTE Version : 3; duke@435: UBYTE Flags : 5; duke@435: UBYTE SizeOfProlog; duke@435: UBYTE CountOfCodes; duke@435: UBYTE FrameRegister : 4; duke@435: UBYTE FrameOffset : 4; duke@435: union { duke@435: OPTIONAL ULONG ExceptionHandler; duke@435: OPTIONAL ULONG FunctionEntry; duke@435: }; duke@435: OPTIONAL ULONG ExceptionData[1]; duke@435: } UNWIND_INFO_EH_ONLY, *PUNWIND_INFO_EH_ONLY; duke@435: duke@435: duke@435: /* duke@435: typedef struct _RUNTIME_FUNCTION { duke@435: ULONG BeginAddress; duke@435: ULONG EndAddress; duke@435: ULONG UnwindData; duke@435: } RUNTIME_FUNCTION, *PRUNTIME_FUNCTION; duke@435: */ duke@435: duke@435: typedef struct _DISPATCHER_CONTEXT { duke@435: ULONG64 ControlPc; duke@435: ULONG64 ImageBase; duke@435: PRUNTIME_FUNCTION FunctionEntry; duke@435: ULONG64 EstablisherFrame; duke@435: ULONG64 TargetIp; duke@435: PCONTEXT ContextRecord; duke@435: // PEXCEPTION_ROUTINE LanguageHandler; duke@435: char * LanguageHandler; // double dependency problem duke@435: PVOID HandlerData; duke@435: } DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT; duke@435: kvn@1080: #if MSC_VER < 1500 kvn@1080: kvn@1080: /* Not needed for VS2008 compiler, comes from winnt.h. */ duke@435: typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) ( duke@435: IN PEXCEPTION_RECORD ExceptionRecord, duke@435: IN ULONG64 EstablisherFrame, duke@435: IN OUT PCONTEXT ContextRecord, duke@435: IN OUT PDISPATCHER_CONTEXT DispatcherContext duke@435: ); duke@435: kvn@1080: #endif kvn@1080: duke@435: #endif // AMD64