1 ; Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 ; Use of this source code is governed by a BSD-style license that can be
3 ; found in the LICENSE file.
5 ; Tag the exception handler as an SEH handler in case the executable
6 ; is linked with /SAFESEH (which is the default).
8 ; MASM 8.0 inserts an additional leading underscore in front of names
9 ; and this is an attempted fix until we understand why.
10 ; MASM 10.0 fixed this.
11 IF
@version LT 800 OR @version GE 1000
12 _ExceptionBarrierHandler PROTO
13 .SAFESEH _ExceptionBarrierHandler
14 _ExceptionBarrierReportOnlyModuleHandler PROTO
15 .SAFESEH _ExceptionBarrierReportOnlyModuleHandler
16 _ExceptionBarrierCallCustomHandler PROTO
17 .SAFESEH _ExceptionBarrierCallCustomHandler
19 ExceptionBarrierHandler PROTO
20 .SAFESEH ExceptionBarrierHandler
21 ExceptionBarrierReportOnlyModuleHandler PROTO
22 .SAFESEH ExceptionBarrierReportOnlyModuleHandler
23 ExceptionBarrierCallCustomHandler PROTO
24 .SAFESEH ExceptionBarrierCallCustomHandler
32 ; extern "C" void WINAPI RegisterExceptionRecord(
33 ; EXCEPTION_REGISTRATION *registration,
34 ; ExceptionHandlerFunc func);
35 RegisterExceptionRecord
PROC registration:DWORD, func:DWORD
38 mov edx, DWORD PTR [esp + 4] ; edx is registration
39 mov eax, DWORD PTR [esp + 8] ; eax is func
40 mov DWORD PTR [edx + 4], eax
42 mov DWORD PTR [edx], eax
46 RegisterExceptionRecord
ENDP
48 ; extern "C" void UnregisterExceptionRecord(
49 ; EXCEPTION_REGISTRATION *registration);
50 UnregisterExceptionRecord
PROC registration:DWORD
54 mov edx, DWORD PTR [esp + 4]
59 UnregisterExceptionRecord
ENDP