1 | /* $Id: exception.cpp,v 1.2 1999-11-30 20:20:31 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
5 | * Win32 NT Runtime / NTDLL for OS/2
|
---|
6 | *
|
---|
7 | * Copyright 1999 Turchanov Sergey
|
---|
8 | * Copyright 1999 Alexandre Julliard
|
---|
9 | * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
|
---|
10 | *
|
---|
11 | * NT basis DLL
|
---|
12 | *
|
---|
13 | */
|
---|
14 |
|
---|
15 | /*
|
---|
16 | * Note: All exception handling in ODIN has to be done in the KERNEL32 DLL.
|
---|
17 | * Therefore, we're just putting forwarders in here.
|
---|
18 | */
|
---|
19 |
|
---|
20 | #include <stdlib.h>
|
---|
21 | #include <string.h>
|
---|
22 |
|
---|
23 | #include "ntdll.h"
|
---|
24 |
|
---|
25 | #include "winuser.h"
|
---|
26 | #include "winerror.h"
|
---|
27 | #include "winreg.h"
|
---|
28 |
|
---|
29 | /*
|
---|
30 | #include "winnt.h"
|
---|
31 | #include "ntddk.h"
|
---|
32 | #include "process.h"
|
---|
33 | #include "global.h"
|
---|
34 | #include "wine/exception.h"
|
---|
35 | #include "stackframe.h"
|
---|
36 | #include "sig_context.h"
|
---|
37 | #include "miscemu.h"
|
---|
38 | #include "debugtools.h"
|
---|
39 |
|
---|
40 | DEFAULT_DEBUG_CHANNEL(seh)
|
---|
41 | */
|
---|
42 |
|
---|
43 |
|
---|
44 | /***********************************************************************
|
---|
45 | * RtlRaiseException (NTDLL.464)
|
---|
46 | */
|
---|
47 | void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *context )
|
---|
48 | {
|
---|
49 | dprintf(("NTDLL: RtlRaiseException (%08xh,%08xh) not implemented.\n",
|
---|
50 | rec,
|
---|
51 | context));
|
---|
52 |
|
---|
53 | // forward to handler in KERNEL32
|
---|
54 | }
|
---|
55 |
|
---|
56 |
|
---|
57 | /*******************************************************************
|
---|
58 | * RtlUnwind (KERNEL32.590) (NTDLL.518)
|
---|
59 | */
|
---|
60 | void WINAPI REGS_FUNC(RtlUnwind)( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
|
---|
61 | PEXCEPTION_RECORD pRecord, DWORD returnEax,
|
---|
62 | CONTEXT *context )
|
---|
63 | {
|
---|
64 | dprintf(("NTDLL: RtlUnwind(%08xh, %08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
65 | pEndFrame,
|
---|
66 | unusedEip,
|
---|
67 | pRecord,
|
---|
68 | returnEax,
|
---|
69 | context));
|
---|
70 |
|
---|
71 | // forward to handler in KERNEL32
|
---|
72 | }
|
---|
73 |
|
---|
74 |
|
---|
75 | /*******************************************************************
|
---|
76 | * NtRaiseException (NTDLL.175)
|
---|
77 | *
|
---|
78 | * Real prototype:
|
---|
79 | * DWORD WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *ctx, BOOL first );
|
---|
80 | */
|
---|
81 | void WINAPI REGS_FUNC(NtRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *ctx,
|
---|
82 | BOOL first, CONTEXT *context )
|
---|
83 | {
|
---|
84 | dprintf(("NTDLL: NtRaiseException(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
85 | rec,
|
---|
86 | ctx,
|
---|
87 | first,
|
---|
88 | context));
|
---|
89 |
|
---|
90 |
|
---|
91 | //REGS_FUNC(RtlRaiseException)( rec, ctx );
|
---|
92 | *context = *ctx;
|
---|
93 | }
|
---|
94 |
|
---|
95 |
|
---|
96 | /***********************************************************************
|
---|
97 | * RtlRaiseStatus (NTDLL.465)
|
---|
98 | *
|
---|
99 | * Raise an exception with ExceptionCode = status
|
---|
100 | */
|
---|
101 | void WINAPI RtlRaiseStatus( NTSTATUS status )
|
---|
102 | {
|
---|
103 | EXCEPTION_RECORD ExceptionRec;
|
---|
104 |
|
---|
105 | dprintf(("NTDLL: RtlRaiseStatus(%08xh) not implemented.\n",
|
---|
106 | status));
|
---|
107 |
|
---|
108 | ExceptionRec.ExceptionCode = status;
|
---|
109 | ExceptionRec.ExceptionFlags = EH_NONCONTINUABLE;
|
---|
110 | ExceptionRec.ExceptionRecord = NULL;
|
---|
111 | ExceptionRec.NumberParameters = 0;
|
---|
112 | //RtlRaiseException( &ExceptionRec );
|
---|
113 | }
|
---|
114 |
|
---|
115 |
|
---|
116 | /***********************************************************************
|
---|
117 | * DebugBreak (KERNEL32.181)
|
---|
118 | */
|
---|
119 | void WINAPI REGS_FUNC(DebugBreak)( CONTEXT *context )
|
---|
120 | {
|
---|
121 | EXCEPTION_RECORD rec;
|
---|
122 |
|
---|
123 | rec.ExceptionCode = EXCEPTION_BREAKPOINT;
|
---|
124 | rec.ExceptionFlags = EH_NONCONTINUABLE;
|
---|
125 | rec.ExceptionRecord = NULL;
|
---|
126 | rec.NumberParameters = 0;
|
---|
127 | //REGS_FUNC(RtlRaiseException)( &rec, context );
|
---|
128 | }
|
---|