Path: blob/master/src/hotspot/os_cpu/windows_x86/unwind_windows_x86.hpp
40930 views
/*1* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef OS_CPU_WINDOWS_X86_UNWIND_WINDOWS_X86_HPP25#define OS_CPU_WINDOWS_X86_UNWIND_WINDOWS_X86_HPP262728#ifdef AMD6429typedef unsigned char UBYTE;3031#if _MSC_VER < 17003233/* Not needed for VS2012 compiler, comes from winnt.h. */34#define UNW_FLAG_EHANDLER 0x0135#define UNW_FLAG_UHANDLER 0x0236#define UNW_FLAG_CHAININFO 0x043738#endif3940// This structure is used to define an UNWIND_INFO that41// only has an ExceptionHandler. There are no UnwindCodes42// declared.43typedef struct _UNWIND_INFO_EH_ONLY {44UBYTE Version : 3;45UBYTE Flags : 5;46UBYTE SizeOfProlog;47UBYTE CountOfCodes;48UBYTE FrameRegister : 4;49UBYTE FrameOffset : 4;50union {51OPTIONAL ULONG ExceptionHandler;52OPTIONAL ULONG FunctionEntry;53};54OPTIONAL ULONG ExceptionData[1];55} UNWIND_INFO_EH_ONLY, *PUNWIND_INFO_EH_ONLY;565758/*59typedef struct _RUNTIME_FUNCTION {60ULONG BeginAddress;61ULONG EndAddress;62ULONG UnwindData;63} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;64*/6566#if _MSC_VER < 17006768/* Not needed for VS2012 compiler, comes from winnt.h. */69typedef struct _DISPATCHER_CONTEXT {70ULONG64 ControlPc;71ULONG64 ImageBase;72PRUNTIME_FUNCTION FunctionEntry;73ULONG64 EstablisherFrame;74ULONG64 TargetIp;75PCONTEXT ContextRecord;76// PEXCEPTION_ROUTINE LanguageHandler;77char * LanguageHandler; // double dependency problem78PVOID HandlerData;79} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;8081#endif8283#if _MSC_VER < 15008485/* Not needed for VS2008 compiler, comes from winnt.h. */86typedef EXCEPTION_DISPOSITION (*PEXCEPTION_ROUTINE) (87IN PEXCEPTION_RECORD ExceptionRecord,88IN ULONG64 EstablisherFrame,89IN OUT PCONTEXT ContextRecord,90IN OUT PDISPATCHER_CONTEXT DispatcherContext91);9293#endif9495#endif // AMD649697#endif // OS_CPU_WINDOWS_X86_UNWIND_WINDOWS_X86_HPP9899100