Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
94e21789
Commit
94e21789
authored
Jul 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exception.h: Make the RtlUnwind wrapper available separately.
Also avoid dependency on winternl.h.
parent
1894d708
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
25 deletions
+30
-25
thread.c
dlls/kernel32/thread.c
+1
-0
sec.c
dlls/ntdll/sec.c
+1
-1
exception.h
include/wine/exception.h
+28
-24
No files found.
dlls/kernel32/thread.c
View file @
94e21789
...
...
@@ -34,6 +34,7 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winternl.h"
#include "wine/winbase16.h"
#include "wine/exception.h"
#include "wine/library.h"
...
...
dlls/ntdll/sec.c
View file @
94e21789
...
...
@@ -35,8 +35,8 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "wine/exception.h"
#include "ntdll_misc.h"
#include "wine/exception.h"
#include "wine/library.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
include/wine/exception.h
View file @
94e21789
...
...
@@ -23,7 +23,6 @@
#include <setjmp.h>
#include <windef.h>
#include <winternl.h>
#include <excpt.h>
/* The following definitions allow using exceptions in Wine and Winelib code
...
...
@@ -187,8 +186,8 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGIST
return
prev
;
#else
NT_TIB
*
teb
=
(
NT_TIB
*
)
NtCurrentTeb
();
frame
->
Prev
=
(
void
*
)
teb
->
ExceptionList
;
teb
->
ExceptionList
=
(
void
*
)
frame
;
frame
->
Prev
=
teb
->
ExceptionList
;
teb
->
ExceptionList
=
frame
;
return
frame
->
Prev
;
#endif
}
...
...
@@ -202,7 +201,7 @@ static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTR
#else
NT_TIB
*
teb
=
(
NT_TIB
*
)
NtCurrentTeb
();
teb
->
ExceptionList
=
(
void
*
)
frame
->
Prev
;
teb
->
ExceptionList
=
frame
->
Prev
;
return
frame
->
Prev
;
#endif
}
...
...
@@ -230,6 +229,30 @@ extern void __wine_enter_vm86( CONTEXT *context );
#ifndef USE_COMPILER_EXCEPTIONS
extern
void
WINAPI
RtlUnwind
(
PVOID
,
PVOID
,
PEXCEPTION_RECORD
,
PVOID
);
/* wrapper for RtlUnwind since it clobbers registers on Windows */
static
inline
void
__wine_rtl_unwind
(
EXCEPTION_REGISTRATION_RECORD
*
frame
,
EXCEPTION_RECORD
*
record
)
{
#if defined(__GNUC__) && defined(__i386__)
int
dummy1
,
dummy2
,
dummy3
;
__asm__
__volatile__
(
"pushl %%ebp
\n\t
"
"pushl %%ebx
\n\t
"
"pushl $0
\n\t
"
"pushl %2
\n\t
"
"pushl $0
\n\t
"
"pushl %1
\n\t
"
"call *%0
\n\t
"
"popl %%ebx
\n\t
"
"popl %%ebp"
:
"=a"
(
dummy1
),
"=S"
(
dummy2
),
"=D"
(
dummy3
)
:
"0"
(
RtlUnwind
),
"1"
(
frame
),
"2"
(
record
)
:
"ecx"
,
"edx"
,
"memory"
);
#else
RtlUnwind
(
frame
,
0
,
record
,
0
);
#endif
}
static
inline
void
DECLSPEC_NORETURN
__wine_unwind_frame
(
EXCEPTION_RECORD
*
record
,
EXCEPTION_REGISTRATION_RECORD
*
frame
)
{
...
...
@@ -239,26 +262,7 @@ static inline void DECLSPEC_NORETURN __wine_unwind_frame( EXCEPTION_RECORD *reco
wine_frame
->
ExceptionCode
=
record
->
ExceptionCode
;
wine_frame
->
ExceptionRecord
=
wine_frame
;
#if defined(__GNUC__) && defined(__i386__)
{
/* RtlUnwind clobbers registers on Windows */
int
dummy1
,
dummy2
,
dummy3
;
__asm__
__volatile__
(
"pushl %%ebp
\n\t
"
"pushl %%ebx
\n\t
"
"pushl $0
\n\t
"
"pushl %2
\n\t
"
"pushl $0
\n\t
"
"pushl %1
\n\t
"
"call *%0
\n\t
"
"popl %%ebx
\n\t
"
"popl %%ebp"
:
"=a"
(
dummy1
),
"=S"
(
dummy2
),
"=D"
(
dummy3
)
:
"0"
(
RtlUnwind
),
"1"
(
frame
),
"2"
(
record
)
:
"ecx"
,
"edx"
,
"memory"
);
}
#else
RtlUnwind
(
frame
,
0
,
record
,
0
);
#endif
__wine_rtl_unwind
(
frame
,
record
);
__wine_pop_frame
(
frame
);
siglongjmp
(
wine_frame
->
jmp
,
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment